From 9a5c2119e51c27667ec857075b7cdcae737f05dc Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 26 May 2018 00:09:10 +1000 Subject: ShaderCache: Remove unused UID bits before inserting into shader map --- Source/Core/VideoCommon/UberShaderPixel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp') diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp index 4b680fee2e..8eff68f14b 100644 --- a/Source/Core/VideoCommon/UberShaderPixel.cpp +++ b/Source/Core/VideoCommon/UberShaderPixel.cpp @@ -29,7 +29,8 @@ PixelShaderUid GetPixelShaderUid() return out; } -void ClearUnusedPixelShaderUidBits(APIType ApiType, PixelShaderUid* uid) +void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config, + PixelShaderUid* uid) { pixel_ubershader_uid_data* uid_data = uid->GetUidData(); -- cgit v1.2.3 From 57976c947b26d59551ff53fcb1c264af14a0548a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 26 May 2018 00:09:29 +1000 Subject: ShaderGen: Don't emit integer outputs when logic op is unsupported This may have been causing issues for D3D10 hardware, where logic op was not supported. --- Source/Core/VideoCommon/UberShaderPixel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp') diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp index 8eff68f14b..9c9630886a 100644 --- a/Source/Core/VideoCommon/UberShaderPixel.cpp +++ b/Source/Core/VideoCommon/UberShaderPixel.cpp @@ -35,8 +35,9 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host pixel_ubershader_uid_data* uid_data = uid->GetUidData(); // 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; } -- cgit v1.2.3