summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2018-05-28 09:52:07 +0200
committerGitHub <noreply@github.com>2018-05-28 09:52:07 +0200
commitcddc2d52c22b42773bbb65a9255cceb90982f531 (patch)
treef8ae69202fcf8fe3d77f571ad2f98115392b0a3a /Source/Core/VideoCommon/PixelShaderGen.cpp
parent9e102e15843e6c28f27771fcaadb0ec5dcb7f65d (diff)
parent57976c947b26d59551ff53fcb1c264af14a0548a (diff)
Merge pull request #6965 from stenzek/d3d-feature-level-10
D3D: Don't emit uint outputs when logic op is unsupported
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index aae881a0f1..da648b3ba6 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -338,13 +338,15 @@ PixelShaderUid GetPixelShaderUid()
return out;
}
-void ClearUnusedPixelShaderUidBits(APIType ApiType, PixelShaderUid* uid)
+void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config,
+ PixelShaderUid* uid)
{
pixel_shader_uid_data* uid_data = uid->GetUidData<pixel_shader_uid_data>();
// OpenGL and Vulkan convert implicitly normalized color outputs to their uint representation.
- // Therefore, it is not necessary to use a uint output on these backends.
- if (ApiType != APIType::D3D)
+ // Therefore, it is not necessary to use a uint output on these backends. We also disable the
+ // 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;
}