Permalink
Browse files

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.
  • Loading branch information...
stenzek committed May 25, 2018
1 parent 9a5c211 commit 57976c947b26d59551ff53fcb1c264af14a0548a
Showing with 6 additions and 4 deletions.
  1. +3 −2 Source/Core/VideoCommon/PixelShaderGen.cpp
  2. +3 −2 Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -344,8 +344,9 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host
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;
}
@@ -35,8 +35,9 @@ void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host
pixel_ubershader_uid_data* uid_data = uid->GetUidData<pixel_ubershader_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;
}

0 comments on commit 57976c9

Please sign in to comment.