diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-05-23 20:27:54 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-05-24 02:47:56 -0300 |
commit | d8827b07b5c823903609e00b8f0e1c27fa34fb91 (patch) | |
tree | b170468a3bd2e56f367a999561ea0e6b705a2f81 /src/yuzu/configuration/configure_debug.cpp | |
parent | 46177901b8d76f16223ac2716abcd6393faae25a (diff) |
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/yuzu/configuration/configure_debug.cpp')
0 files changed, 0 insertions, 0 deletions