diff options
| author | Stenzek <stenzek@gmail.com> | 2019-02-28 20:35:48 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-02-28 20:43:50 +1000 |
| commit | 8192c0dd48c9dd5afe835ebc94ed45e477c3b12e (patch) | |
| tree | 701b3fa58835b5b59895fa2fff562510fa572b45 /Source/Core/VideoCommon/TextureConversionShader.cpp | |
| parent | 21d81f99ff9d51cb1dd845260e8655753bf0db4b (diff) | |
TextureConversionShader: Fix XFB decoding shader for D3D
D3D has no mix() equivalent with a bool parameter. Compilers should be
able to optimize the ternary into a select anyway.
Diffstat (limited to 'Source/Core/VideoCommon/TextureConversionShader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureConversionShader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index 7359c2aea3..da900ff72a 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -1345,7 +1345,7 @@ static const std::map<TextureFormat, DecodingShaderInfo> s_decoding_shader_info{ int buffer_pos = int(u_src_offset + (uv.y * u_src_row_stride) + (uv.x / 2u)); float4 yuyv = float4(texelFetch(s_input_buffer, buffer_pos)); - float y = mix(yuyv.r, yuyv.b, (uv.x & 1u) == 1u); + float y = (uv.x & 1u) != 0u ? yuyv.r : yuyv.g; float yComp = 1.164 * (y - 16.0); float uComp = yuyv.g - 128.0; |
