summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-05-23 20:27:54 -0300
committerGravatar ReinUsesLisp2019-05-24 02:47:56 -0300
commitd8827b07b5c823903609e00b8f0e1c27fa34fb91 (patch)
treeb170468a3bd2e56f367a999561ea0e6b705a2f81 /src/video_core/gpu_thread.cpp
parentgl_device: Add test to detect broken component indexing (diff)
downloadyuzu-d8827b07b5c823903609e00b8f0e1c27fa34fb91.tar.gz
yuzu-d8827b07b5c823903609e00b8f0e1c27fa34fb91.tar.xz
yuzu-d8827b07b5c823903609e00b8f0e1c27fa34fb91.zip
gl_shader_decompiler: Use an if based cbuf indexing for broken drivers
The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ```
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
0 files changed, 0 insertions, 0 deletions