summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-04-21 13:27:05 +1000
committerGitHub <noreply@github.com>2019-04-21 13:27:05 +1000
commit5b4ebccf6bf45a614cd2a5031607743b482ff776 (patch)
tree49de06f81815973680811a3ee9f853dde1b15bbd /Source/Core/VideoCommon/PixelShaderGen.cpp
parent18589e50ab44957f4955596ac238d900f28959c3 (diff)
parentc6b45c5ca9ea80a4190db98858e186996d4827af (diff)
Merge pull request #8012 from stenzek/bounding-box-shaders
PixelShaderGen: Don't emit bounding box shader code for old UIDs when disabled
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 7064552e7d..c5d7086ef7 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -347,6 +347,10 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host
// uint output when logic op is not supported (i.e. driver/device does not support D3D11.1).
if (ApiType != APIType::D3D || !host_config.backend_logic_op)
uid_data->uint_output = 0;
+
+ // If bounding box is enabled when a UID cache is created, then later disabled, we shouldn't
+ // emit the bounding box portion of the shader.
+ uid_data->bounding_box &= host_config.bounding_box;
}
void WritePixelShaderCommonHeader(ShaderCode& out, APIType ApiType, u32 num_texgens,