summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-09-05 23:33:15 +1000
committerStenzek <stenzek@gmail.com>2017-09-05 23:49:42 +1000
commit84f8ebd95fc70bc3482a53f31d5ebcc5266bb4b7 (patch)
tree7deaef2585f54cb82f004abf0f9f8b5314888183 /Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
parent6d32cce2f5701a897ddd95bf702e5ae29ab1c546 (diff)
VideoBackends: Clear uid bits that are unused for the current backend
Currently, this is only the logic op bit, but this will be extended to the framebuffer fetch/blend modes. In the future, when/if we move to VideoCommon pipelines, this state will be part of the pipeline UID anyway, and we can mask it out in the backend by using a two-level map, so the shaders/programs are shared.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PixelShaderCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PixelShaderCache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
index 07270f0e2a..326f840db1 100644
--- a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
+++ b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
@@ -593,6 +593,7 @@ bool PixelShaderCache::SetShader()
return SetUberShader();
PixelShaderUid uid = GetPixelShaderUid();
+ ClearUnusedPixelShaderUidBits(APIType::D3D, &uid);
if (last_entry && uid == last_uid)
{
if (last_entry->pending)
@@ -656,6 +657,7 @@ bool PixelShaderCache::SetShader()
bool PixelShaderCache::SetUberShader()
{
UberShader::PixelShaderUid uid = UberShader::GetPixelShaderUid();
+ UberShader::ClearUnusedPixelShaderUidBits(APIType::D3D, &uid);
if (last_uber_entry && last_uber_uid == uid)
{