summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/ShaderCache.cpp
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-03-29 20:40:06 +1000
committerGitHub <noreply@github.com>2019-03-29 20:40:06 +1000
commitf3fadd730218429a5f6472283d16d30d7e276f8d (patch)
treed1d6577cd52b2d3b3d7872aef4fac80dbd0ce563 /Source/Core/VideoCommon/ShaderCache.cpp
parentfbe57e8dbef17e583f0ba0208af7bf414a3716bf (diff)
parentd0d010f8549cc902829f567b3b5127d9a0556ca5 (diff)
Merge pull request #7869 from stenzek/d3dcommon
D3D: Move sharable D3D11/D3D12 code to common library
Diffstat (limited to 'Source/Core/VideoCommon/ShaderCache.cpp')
-rw-r--r--Source/Core/VideoCommon/ShaderCache.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/ShaderCache.cpp b/Source/Core/VideoCommon/ShaderCache.cpp
index b42587a2d4..8f9c99d39d 100644
--- a/Source/Core/VideoCommon/ShaderCache.cpp
+++ b/Source/Core/VideoCommon/ShaderCache.cpp
@@ -966,10 +966,16 @@ void ShaderCache::QueueUberShaderPipelines()
config.vs_uid = vs_uid;
config.gs_uid = gs_uid;
config.ps_uid = ps_uid;
- config.rasterization_state =
- RenderState::GetCullBackFaceRasterizationState(PrimitiveType::TriangleStrip);
+ config.rasterization_state = RenderState::GetCullBackFaceRasterizationState(
+ static_cast<PrimitiveType>(gs_uid.GetUidData()->primitive_type));
config.depth_state = RenderState::GetNoDepthTestingDepthState();
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);
if (iter != m_gx_uber_pipeline_cache.end())
@@ -986,13 +992,15 @@ void ShaderCache::QueueUberShaderPipelines()
if (vuid.GetUidData()->num_texgens != puid.GetUidData()->num_texgens)
return;
+ UberShader::PixelShaderUid cleared_puid = puid;
+ UberShader::ClearUnusedPixelShaderUidBits(m_api_type, m_host_config, &cleared_puid);
EnumerateGeometryShaderUids([&](const GeometryShaderUid& guid) {
if (guid.GetUidData()->numTexGens != vuid.GetUidData()->num_texgens ||
(!guid.GetUidData()->IsPassthrough() && !m_host_config.backend_geometry_shaders))
{
return;
}
- QueueDummyPipeline(vuid, guid, puid);
+ QueueDummyPipeline(vuid, guid, cleared_puid);
});
});
});