Skip to content
Permalink
Browse files

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.
  • Loading branch information...
stenzek committed Feb 28, 2019
1 parent 21d81f9 commit 8192c0dd48c9dd5afe835ebc94ed45e477c3b12e
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 8192c0d

Please sign in to comment.
You can’t perform that action at this time.