Skip to content

Commit

Permalink
GPU: Set display parameters even when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Aug 24, 2021
1 parent 461e6aa commit 1e88d04
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions src/core/gpu_hw_d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,11 @@ void GPU_HW_D3D11::UpdateDisplay()
}
else
{
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

const u32 resolution_scale = m_GPUSTAT.display_area_color_depth_24 ? 1 : m_resolution_scale;
const u32 vram_offset_x = m_crtc_state.display_vram_left;
const u32 vram_offset_y = m_crtc_state.display_vram_top;
Expand Down Expand Up @@ -923,11 +928,6 @@ void GPU_HW_D3D11::UpdateDisplay()

RestoreGraphicsAPIState();
}

m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/gpu_hw_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,11 @@ void GPU_HW_D3D12::UpdateDisplay()
}
else
{
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

const u32 resolution_scale = m_GPUSTAT.display_area_color_depth_24 ? 1 : m_resolution_scale;
const u32 vram_offset_x = m_crtc_state.display_vram_left;
const u32 vram_offset_y = m_crtc_state.display_vram_top;
Expand Down Expand Up @@ -939,11 +944,6 @@ void GPU_HW_D3D12::UpdateDisplay()

RestoreGraphicsAPIState();
}

m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/gpu_hw_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,11 @@ void GPU_HW_OpenGL::UpdateDisplay()
}
else
{
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

const u32 resolution_scale = m_GPUSTAT.display_area_color_depth_24 ? 1 : m_resolution_scale;
const u32 vram_offset_x = m_crtc_state.display_vram_left;
const u32 vram_offset_y = m_crtc_state.display_vram_top;
Expand Down Expand Up @@ -971,11 +976,6 @@ void GPU_HW_OpenGL::UpdateDisplay()
SetBlendMode();
SetDepthFunc();
}

m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/gpu_hw_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,11 @@ void GPU_HW_Vulkan::UpdateDisplay()
}
else
{
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

const u32 resolution_scale = m_GPUSTAT.display_area_color_depth_24 ? 1 : m_resolution_scale;
const u32 vram_offset_x = m_crtc_state.display_vram_left;
const u32 vram_offset_y = m_crtc_state.display_vram_top;
Expand Down Expand Up @@ -1529,11 +1534,6 @@ void GPU_HW_Vulkan::UpdateDisplay()
RestoreGraphicsAPIState();
}
}

m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/gpu_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,17 @@ void GPU_SW::UpdateDisplay()

if (!g_settings.debugging.show_vram)
{
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

if (IsDisplayDisabled())
{
m_host_display->ClearDisplayTexture();
return;
}

m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
GetDisplayAspectRatio());

const u32 vram_offset_y = m_crtc_state.display_vram_top;
const u32 display_width = m_crtc_state.display_vram_width;
const u32 display_height = m_crtc_state.display_vram_height;
Expand Down

0 comments on commit 1e88d04

Please sign in to comment.