From 6bb6249e86cbf1132031f49e030dc23fcb898fae Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 7 Mar 2020 12:54:15 +1000 Subject: [PATCH] GPU/HW: Print capabilities to log --- src/core/gpu_hw.cpp | 12 ++++++++++++ src/core/gpu_hw.h | 2 ++ src/core/gpu_hw_d3d11.cpp | 3 --- src/core/gpu_hw_opengl.cpp | 1 - src/core/gpu_hw_opengl_es.cpp | 2 -- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 1750e291f..a0bd8a9d7 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -38,6 +38,7 @@ bool GPU_HW::Initialize(HostDisplay* host_display, System* system, DMA* dma, Int m_resolution_scale = std::clamp(m_resolution_scale, 1u, m_max_resolution_scale); } + PrintSettingsToLog(); return true; } @@ -75,6 +76,17 @@ void GPU_HW::UpdateSettings() m_true_color = settings.gpu_true_color; m_scaled_dithering = settings.gpu_scaled_dithering; m_texture_filtering = settings.gpu_texture_filtering; + PrintSettingsToLog(); +} + +void GPU_HW::PrintSettingsToLog() +{ + Log_InfoPrintf("Resolution Scale: %u (%ux%u), maximum %u", m_resolution_scale, VRAM_WIDTH * m_resolution_scale, + VRAM_HEIGHT * m_resolution_scale, m_max_resolution_scale); + Log_InfoPrintf("Dithering: %s%s", m_true_color ? "Disabled" : "Enabled", + (!m_true_color && m_scaled_dithering) ? " (Scaled)" : ""); + Log_InfoPrintf("Texture Filtering: %s", m_texture_filtering ? "Enabled" : "Disabled"); + Log_InfoPrintf("Dual-source blending: %s", m_supports_dual_source_blend ? "Supported" : "Not supported"); } void GPU_HW::LoadVertices(RenderCommand rc, u32 num_vertices, const u32* command_ptr) diff --git a/src/core/gpu_hw.h b/src/core/gpu_hw.h index 48c857d65..c3eb3db28 100644 --- a/src/core/gpu_hw.h +++ b/src/core/gpu_hw.h @@ -202,4 +202,6 @@ private: m_batch_current_vertex_ptr->Set(std::forward(args)...); m_batch_current_vertex_ptr++; } + + void PrintSettingsToLog(); }; diff --git a/src/core/gpu_hw_d3d11.cpp b/src/core/gpu_hw_d3d11.cpp index 14494f4a0..2ea9a1068 100644 --- a/src/core/gpu_hw_d3d11.cpp +++ b/src/core/gpu_hw_d3d11.cpp @@ -145,12 +145,9 @@ void GPU_HW_D3D11::MapBatchVertexPointer(u32 required_vertices) void GPU_HW_D3D11::SetCapabilities() { const u32 max_texture_size = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; - Log_InfoPrintf("Max texture size: %dx%d", max_texture_size, max_texture_size); const u32 max_texture_scale = max_texture_size / VRAM_WIDTH; m_max_resolution_scale = max_texture_scale; - Log_InfoPrintf("Maximum resolution scale is %u", m_max_resolution_scale); - m_supports_dual_source_blend = true; } diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index e079dbd68..4519843a2 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -153,7 +153,6 @@ void GPU_HW_OpenGL::SetCapabilities(HostDisplay* host_display) Log_InfoPrintf("Max line width: %d", line_width_range[1]); m_max_resolution_scale = std::min(max_texture_scale, line_width_range[1]); - Log_InfoPrintf("Maximum resolution scale is %u", m_max_resolution_scale); glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast(&m_uniform_buffer_alignment)); Log_InfoPrintf("Uniform buffer offset alignment: %u", m_uniform_buffer_alignment); diff --git a/src/core/gpu_hw_opengl_es.cpp b/src/core/gpu_hw_opengl_es.cpp index f715bfc1d..dfbf9e847 100644 --- a/src/core/gpu_hw_opengl_es.cpp +++ b/src/core/gpu_hw_opengl_es.cpp @@ -126,8 +126,6 @@ void GPU_HW_OpenGL_ES::SetCapabilities(HostDisplay* host_display) Log_InfoPrintf("Max line width: %d", line_width_range[1]); m_max_resolution_scale = std::min(max_texture_scale, line_width_range[1]); - Log_InfoPrintf("Maximum resolution scale is %u", m_max_resolution_scale); - m_supports_dual_source_blend = false; }