diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-03-07 14:43:39 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-03-09 01:42:45 -0600 |
| commit | c18c039089bdc27cbccf92a9053ed80bb161a9b9 (patch) | |
| tree | eaaaa442e14441bd678c0c433d5765fa84c549d4 /Source/Core/VideoCommon/VertexManagerBase.cpp | |
| parent | 99e686de34c2c862a01ee3859abb4b3256f04a63 (diff) | |
VideoCommon: Move backend_info out of VideoConfig struct.
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexManagerBase.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index 21e5905d95..7987887b86 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -156,7 +156,7 @@ DataReader VertexManagerBase::PrepareForAdditionalData(OpcodeDecoder::Primitive u32 const needed_vertex_bytes = count * stride + 4; // We can't merge different kinds of primitives, so we have to flush here - PrimitiveType new_primitive_type = g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? + PrimitiveType new_primitive_type = g_backend_info.bSupportsPrimitiveRestart ? primitive_from_gx_pr[primitive] : primitive_from_gx[primitive]; if (m_current_primitive_type != new_primitive_type) [[unlikely]] @@ -243,7 +243,7 @@ u32 VertexManagerBase::GetRemainingIndices(OpcodeDecoder::Primitive primitive) c { if (g_Config.UseVSForLinePointExpand()) { - if (g_Config.backend_info.bSupportsPrimitiveRestart) + if (g_backend_info.bSupportsPrimitiveRestart) { switch (primitive) { @@ -287,7 +287,7 @@ u32 VertexManagerBase::GetRemainingIndices(OpcodeDecoder::Primitive primitive) c } } } - else if (g_Config.backend_info.bSupportsPrimitiveRestart) + else if (g_backend_info.bSupportsPrimitiveRestart) { switch (primitive) { @@ -348,8 +348,7 @@ void VertexManagerBase::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 nu void VertexManagerBase::DrawCurrentBatch(u32 base_index, u32 num_indices, u32 base_vertex) { // If bounding box is enabled, we need to flush any changes first, then invalidate what we have. - if (g_bounding_box->IsEnabled() && g_ActiveConfig.bBBoxEnable && - g_ActiveConfig.backend_info.bSupportsBBox) + if (g_bounding_box->IsEnabled() && g_ActiveConfig.bBBoxEnable && g_backend_info.bSupportsBBox) { g_bounding_box->Flush(); } @@ -1090,8 +1089,7 @@ void VertexManagerBase::RenderDrawCall( VertexLoaderManager::GetCurrentVertexFormat()->GetVertexStride(), m_index_generator.GetIndexLen(), &base_vertex, &base_index); - if (g_ActiveConfig.backend_info.api_type != APIType::D3D && - g_ActiveConfig.UseVSForLinePointExpand() && + if (g_backend_info.api_type != APIType::D3D && g_ActiveConfig.UseVSForLinePointExpand() && (primitive_type == PrimitiveType::Points || primitive_type == PrimitiveType::Lines)) { // VS point/line expansion puts the vertex id at gl_VertexID << 2 @@ -1131,7 +1129,7 @@ const AbstractPipeline* VertexManagerBase::GetCustomPipeline( { // D3D has issues compiling large custom ubershaders // use specialized shaders instead - if (g_ActiveConfig.backend_info.api_type == APIType::D3D) + if (g_backend_info.api_type == APIType::D3D) { if (auto pipeline = m_custom_shader_cache->GetPipelineAsync( current_pipeline_config, custom_shaders, current_pipeline->m_config)) |
