ShaderCache: Don't create invalid logic op pipelines
uint_output will never be set unless logic ops are enabled. Also clears the bits so we're not compiling unused pixel shaders on the other backends.
This commit is contained in:
parent
5732769a3c
commit
e9cfcf4632
|
@ -970,6 +970,12 @@ void ShaderCache::QueueUberShaderPipelines()
|
||||||
static_cast<PrimitiveType>(gs_uid.GetUidData()->primitive_type));
|
static_cast<PrimitiveType>(gs_uid.GetUidData()->primitive_type));
|
||||||
config.depth_state = RenderState::GetNoDepthTestingDepthState();
|
config.depth_state = RenderState::GetNoDepthTestingDepthState();
|
||||||
config.blending_state = RenderState::GetNoBlendingBlendState();
|
config.blending_state = RenderState::GetNoBlendingBlendState();
|
||||||
|
if (ps_uid.GetUidData()->uint_output)
|
||||||
|
{
|
||||||
|
// uint_output is only ever enabled when logic ops are enabled.
|
||||||
|
config.blending_state.logicopenable = true;
|
||||||
|
config.blending_state.logicmode = BlendMode::AND;
|
||||||
|
}
|
||||||
|
|
||||||
auto iter = m_gx_uber_pipeline_cache.find(config);
|
auto iter = m_gx_uber_pipeline_cache.find(config);
|
||||||
if (iter != m_gx_uber_pipeline_cache.end())
|
if (iter != m_gx_uber_pipeline_cache.end())
|
||||||
|
@ -986,13 +992,15 @@ void ShaderCache::QueueUberShaderPipelines()
|
||||||
if (vuid.GetUidData()->num_texgens != puid.GetUidData()->num_texgens)
|
if (vuid.GetUidData()->num_texgens != puid.GetUidData()->num_texgens)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
UberShader::PixelShaderUid cleared_puid = puid;
|
||||||
|
UberShader::ClearUnusedPixelShaderUidBits(m_api_type, m_host_config, &cleared_puid);
|
||||||
EnumerateGeometryShaderUids([&](const GeometryShaderUid& guid) {
|
EnumerateGeometryShaderUids([&](const GeometryShaderUid& guid) {
|
||||||
if (guid.GetUidData()->numTexGens != vuid.GetUidData()->num_texgens ||
|
if (guid.GetUidData()->numTexGens != vuid.GetUidData()->num_texgens ||
|
||||||
(!guid.GetUidData()->IsPassthrough() && !m_host_config.backend_geometry_shaders))
|
(!guid.GetUidData()->IsPassthrough() && !m_host_config.backend_geometry_shaders))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QueueDummyPipeline(vuid, guid, puid);
|
QueueDummyPipeline(vuid, guid, cleared_puid);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue