diff --git a/src/core/gpu_commands.cpp b/src/core/gpu_commands.cpp index b8cd1bc2..55bbd346 100644 --- a/src/core/gpu_commands.cpp +++ b/src/core/gpu_commands.cpp @@ -506,13 +506,6 @@ void GPU::FinishVRAMWrite() if (m_blit_remaining_words == 0) { - if (g_settings.debugging.dump_cpu_to_vram_copies) - { - DumpVRAMToFile(StringUtil::StdStringFromFormat("cpu_to_vram_copy_%u.png", s_cpu_to_vram_dump_id++).c_str(), - m_vram_transfer.width, m_vram_transfer.height, sizeof(u16) * m_vram_transfer.width, - m_blit_buffer.data(), true); - } - if (g_settings.texture_replacements.ShouldDumpVRAMWrite(m_vram_transfer.width, m_vram_transfer.height)) { g_texture_replacements.DumpVRAMWrite(m_vram_transfer.width, m_vram_transfer.height, @@ -575,13 +568,6 @@ bool GPU::HandleCopyRectangleVRAMToCPUCommand() // ensure VRAM shadow is up to date ReadVRAM(m_vram_transfer.x, m_vram_transfer.y, m_vram_transfer.width, m_vram_transfer.height); - if (g_settings.debugging.dump_vram_to_cpu_copies) - { - DumpVRAMToFile(StringUtil::StdStringFromFormat("vram_to_cpu_copy_%u.png", s_vram_to_cpu_dump_id++).c_str(), - m_vram_transfer.width, m_vram_transfer.height, sizeof(u16) * VRAM_WIDTH, - &m_vram_ptr[m_vram_transfer.y * VRAM_WIDTH + m_vram_transfer.x], true); - } - // switch to pixel-by-pixel read state m_stats.num_vram_reads++; m_blitter_state = BlitterState::ReadingVRAM; diff --git a/src/core/gpu_hw_d3d11.cpp b/src/core/gpu_hw_d3d11.cpp index 584ea253..c9bc9866 100644 --- a/src/core/gpu_hw_d3d11.cpp +++ b/src/core/gpu_hw_d3d11.cpp @@ -836,26 +836,6 @@ void GPU_HW_D3D11::UpdateDisplay() { GPU_HW::UpdateDisplay(); - if (g_settings.debugging.show_vram) - { - if (IsUsingMultisampling()) - { - UpdateVRAMReadTexture(); - m_host_display->SetDisplayTexture(m_vram_read_texture.GetD3DSRV(), HostDisplayPixelFormat::RGBA8, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight(), 0, 0, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight()); - } - else - { - m_host_display->SetDisplayTexture(m_vram_texture.GetD3DSRV(), HostDisplayPixelFormat::RGBA8, - m_vram_texture.GetWidth(), m_vram_texture.GetHeight(), 0, 0, - m_vram_texture.GetWidth(), m_vram_texture.GetHeight()); - } - - m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, - static_cast(VRAM_WIDTH) / static_cast(VRAM_HEIGHT)); - } - 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, diff --git a/src/core/gpu_hw_d3d12.cpp b/src/core/gpu_hw_d3d12.cpp index 27a44022..617c7726 100644 --- a/src/core/gpu_hw_d3d12.cpp +++ b/src/core/gpu_hw_d3d12.cpp @@ -864,26 +864,6 @@ void GPU_HW_D3D12::UpdateDisplay() { GPU_HW::UpdateDisplay(); - if (g_settings.debugging.show_vram) - { - if (IsUsingMultisampling()) - { - UpdateVRAMReadTexture(); - m_host_display->SetDisplayTexture(&m_vram_read_texture, HostDisplayPixelFormat::RGBA8, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight(), 0, 0, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight()); - } - else - { - m_vram_texture.TransitionToState(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); - m_host_display->SetDisplayTexture(&m_vram_texture, HostDisplayPixelFormat::RGBA8, m_vram_texture.GetWidth(), - m_vram_texture.GetHeight(), 0, 0, m_vram_texture.GetWidth(), - m_vram_texture.GetHeight()); - } - m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, - static_cast(VRAM_WIDTH) / static_cast(VRAM_HEIGHT)); - } - 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, diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index 64daba8c..d2296901 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -858,30 +858,6 @@ void GPU_HW_OpenGL::UpdateDisplay() { GPU_HW::UpdateDisplay(); - if (g_settings.debugging.show_vram) - { - if (IsUsingMultisampling()) - { - UpdateVRAMReadTexture(); - - m_host_display->SetDisplayTexture(reinterpret_cast(static_cast(m_vram_read_texture.GetGLId())), - HostDisplayPixelFormat::RGBA8, m_vram_read_texture.GetWidth(), - static_cast(m_vram_read_texture.GetHeight()), 0, - m_vram_read_texture.GetHeight(), m_vram_read_texture.GetWidth(), - -static_cast(m_vram_read_texture.GetHeight())); - } - else - { - m_host_display->SetDisplayTexture(reinterpret_cast(static_cast(m_vram_texture.GetGLId())), - HostDisplayPixelFormat::RGBA8, m_vram_texture.GetWidth(), - static_cast(m_vram_texture.GetHeight()), 0, m_vram_texture.GetHeight(), - m_vram_texture.GetWidth(), -static_cast(m_vram_texture.GetHeight())); - } - m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, - static_cast(VRAM_WIDTH) / static_cast(VRAM_HEIGHT)); - } - 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, @@ -976,7 +952,6 @@ void GPU_HW_OpenGL::UpdateDisplay() SetBlendMode(); SetDepthFunc(); } - } } void GPU_HW_OpenGL::ReadVRAM(u32 x, u32 y, u32 width, u32 height) diff --git a/src/core/gpu_hw_vulkan.cpp b/src/core/gpu_hw_vulkan.cpp index 5dd48a4b..d84bf3fa 100644 --- a/src/core/gpu_hw_vulkan.cpp +++ b/src/core/gpu_hw_vulkan.cpp @@ -1424,31 +1424,6 @@ void GPU_HW_Vulkan::UpdateDisplay() VkCommandBuffer cmdbuf = g_vulkan_context->GetCurrentCommandBuffer(); const Vulkan::Util::DebugScope debugScope(cmdbuf, "GPU_HW_Vulkan::UpdateDisplay"); - if (g_settings.debugging.show_vram) - { - if (IsUsingMultisampling()) - { - if (m_vram_dirty_rect.Intersects( - Common::Rectangle::FromExtents(m_crtc_state.display_vram_left, m_crtc_state.display_vram_top, - m_crtc_state.display_vram_width, m_crtc_state.display_vram_height))) - { - UpdateVRAMReadTexture(); - } - - m_host_display->SetDisplayTexture(&m_vram_read_texture, HostDisplayPixelFormat::RGBA8, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight(), 0, 0, - m_vram_read_texture.GetWidth(), m_vram_read_texture.GetHeight()); - } - else - { - m_host_display->SetDisplayTexture(&m_vram_texture, HostDisplayPixelFormat::RGBA8, m_vram_texture.GetWidth(), - m_vram_texture.GetHeight(), 0, 0, m_vram_texture.GetWidth(), - m_vram_texture.GetHeight()); - } - m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, - static_cast(VRAM_WIDTH) / static_cast(VRAM_HEIGHT)); - } - 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, diff --git a/src/core/gpu_sw.cpp b/src/core/gpu_sw.cpp index 5d8f14e1..e1363a56 100644 --- a/src/core/gpu_sw.cpp +++ b/src/core/gpu_sw.cpp @@ -484,7 +484,6 @@ void GPU_SW::UpdateDisplay() // fill display texture m_backend.Sync(true); - 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, @@ -531,12 +530,6 @@ void GPU_SW::UpdateDisplay() } } } - else - { - CopyOut15Bit(m_16bit_display_format, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, 0, false, false); - m_host_display->SetDisplayParameters(VRAM_WIDTH, VRAM_HEIGHT, 0, 0, VRAM_WIDTH, VRAM_HEIGHT, - static_cast(VRAM_WIDTH) / static_cast(VRAM_HEIGHT)); - } } void GPU_SW::FillBackendCommandParameters(GPUBackendCommand* cmd) const diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 2d2c27f6..a866012c 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -312,16 +312,6 @@ void Settings::Load(SettingsInterface& si) log_to_window = si.GetBoolValue("Logging", "LogToWindow", false); log_to_file = si.GetBoolValue("Logging", "LogToFile", false); - debugging.show_vram = si.GetBoolValue("Debug", "ShowVRAM"); - debugging.dump_cpu_to_vram_copies = si.GetBoolValue("Debug", "DumpCPUToVRAMCopies"); - debugging.dump_vram_to_cpu_copies = si.GetBoolValue("Debug", "DumpVRAMToCPUCopies"); - debugging.show_gpu_state = si.GetBoolValue("Debug", "ShowGPUState"); - debugging.show_cdrom_state = si.GetBoolValue("Debug", "ShowCDROMState"); - debugging.show_spu_state = si.GetBoolValue("Debug", "ShowSPUState"); - debugging.show_timers_state = si.GetBoolValue("Debug", "ShowTimersState"); - debugging.show_mdec_state = si.GetBoolValue("Debug", "ShowMDECState"); - debugging.show_dma_state = si.GetBoolValue("Debug", "ShowDMAState"); - texture_replacements.enable_vram_write_replacements = si.GetBoolValue("TextureReplacements", "EnableVRAMWriteReplacements", false); texture_replacements.preload_textures = si.GetBoolValue("TextureReplacements", "PreloadTextures", false); diff --git a/src/core/settings.h b/src/core/settings.h index 39f54361..814014c4 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -164,21 +164,6 @@ struct Settings u32 gpu_fifo_size = 128; TickCount gpu_max_run_ahead = 128; - struct DebugSettings - { - bool show_vram = false; - bool dump_cpu_to_vram_copies = false; - bool dump_vram_to_cpu_copies = false; - - // Mutable because the imgui window can close itself. - mutable bool show_gpu_state = false; - mutable bool show_cdrom_state = false; - mutable bool show_spu_state = false; - mutable bool show_timers_state = false; - mutable bool show_mdec_state = false; - mutable bool show_dma_state = false; - } debugging; - // texture replacements struct TextureReplacementSettings {