GPU/HW: Print capabilities to log

This commit is contained in:
Connor McLaughlin 2020-03-07 12:54:15 +10:00
parent b5b6a15e40
commit 6bb6249e86
5 changed files with 14 additions and 6 deletions

View file

@ -38,6 +38,7 @@ bool GPU_HW::Initialize(HostDisplay* host_display, System* system, DMA* dma, Int
m_resolution_scale = std::clamp<u32>(m_resolution_scale, 1u, m_max_resolution_scale); m_resolution_scale = std::clamp<u32>(m_resolution_scale, 1u, m_max_resolution_scale);
} }
PrintSettingsToLog();
return true; return true;
} }
@ -75,6 +76,17 @@ void GPU_HW::UpdateSettings()
m_true_color = settings.gpu_true_color; m_true_color = settings.gpu_true_color;
m_scaled_dithering = settings.gpu_scaled_dithering; m_scaled_dithering = settings.gpu_scaled_dithering;
m_texture_filtering = settings.gpu_texture_filtering; 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) void GPU_HW::LoadVertices(RenderCommand rc, u32 num_vertices, const u32* command_ptr)

View file

@ -202,4 +202,6 @@ private:
m_batch_current_vertex_ptr->Set(std::forward<Args>(args)...); m_batch_current_vertex_ptr->Set(std::forward<Args>(args)...);
m_batch_current_vertex_ptr++; m_batch_current_vertex_ptr++;
} }
void PrintSettingsToLog();
}; };

View file

@ -145,12 +145,9 @@ void GPU_HW_D3D11::MapBatchVertexPointer(u32 required_vertices)
void GPU_HW_D3D11::SetCapabilities() void GPU_HW_D3D11::SetCapabilities()
{ {
const u32 max_texture_size = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; 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; const u32 max_texture_scale = max_texture_size / VRAM_WIDTH;
m_max_resolution_scale = max_texture_scale; m_max_resolution_scale = max_texture_scale;
Log_InfoPrintf("Maximum resolution scale is %u", m_max_resolution_scale);
m_supports_dual_source_blend = true; m_supports_dual_source_blend = true;
} }

View file

@ -153,7 +153,6 @@ void GPU_HW_OpenGL::SetCapabilities(HostDisplay* host_display)
Log_InfoPrintf("Max line width: %d", line_width_range[1]); Log_InfoPrintf("Max line width: %d", line_width_range[1]);
m_max_resolution_scale = std::min(max_texture_scale, 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<GLint*>(&m_uniform_buffer_alignment)); glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast<GLint*>(&m_uniform_buffer_alignment));
Log_InfoPrintf("Uniform buffer offset alignment: %u", m_uniform_buffer_alignment); Log_InfoPrintf("Uniform buffer offset alignment: %u", m_uniform_buffer_alignment);

View file

@ -126,8 +126,6 @@ void GPU_HW_OpenGL_ES::SetCapabilities(HostDisplay* host_display)
Log_InfoPrintf("Max line width: %d", line_width_range[1]); Log_InfoPrintf("Max line width: %d", line_width_range[1]);
m_max_resolution_scale = std::min(max_texture_scale, 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; m_supports_dual_source_blend = false;
} }