summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-04-20 12:51:04 +1000
committerStenzek <stenzek@gmail.com>2019-04-20 23:16:14 +1000
commit96aa762d1ee5bd0294da80ac049a9fcd99032f2a (patch)
tree9039d8b3a5a56e968d49b1f142265cfe4d3738ae /Source/Core/VideoCommon/PixelShaderGen.cpp
parent4b1adab7856cb2dd28418a1d748a0e8cebf94a2f (diff)
PixelShaderGen: Don't emit bounding box shader code for old UIDs when disabled
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. Fixes pipeline creation errors on D3D12 backend for this case.
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,