diff options
| author | 2019-06-11 23:02:50 -0300 | |
|---|---|---|
| committer | 2019-06-11 23:02:50 -0300 | |
| commit | ee81fb94cd5da48c83a42ce236be5c2d215e54cc (patch) | |
| tree | bbfe10d86301ebf96a31b97f871a91d958d3c165 /src | |
| parent | Merge pull request #2578 from lioncash/cnmt (diff) | |
| download | yuzu-ee81fb94cd5da48c83a42ce236be5c2d215e54cc.tar.gz yuzu-ee81fb94cd5da48c83a42ce236be5c2d215e54cc.tar.xz yuzu-ee81fb94cd5da48c83a42ce236be5c2d215e54cc.zip | |
gl_device: Fix TestVariableAoffi test
This test is intended to be invalid GLSL, but it was being invalid in
two points instead of one. The intention is to use a non-immediate
parameter in a textureOffset like function.
The problem is that this shader was being compiled as a separable
shader object and the text was writting to gl_Position without a
redeclaration, being invalid GLSL.
Address that issue by using a user-defined output attribute.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 65a88b06c..a48e14d2e 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -43,8 +43,9 @@ bool Device::TestVariableAoffi() { | |||
| 43 | // This is a unit test, please ignore me on apitrace bug reports. | 43 | // This is a unit test, please ignore me on apitrace bug reports. |
| 44 | uniform sampler2D tex; | 44 | uniform sampler2D tex; |
| 45 | uniform ivec2 variable_offset; | 45 | uniform ivec2 variable_offset; |
| 46 | out vec4 output_attribute; | ||
| 46 | void main() { | 47 | void main() { |
| 47 | gl_Position = textureOffset(tex, vec2(0), variable_offset); | 48 | output_attribute = textureOffset(tex, vec2(0), variable_offset); |
| 48 | } | 49 | } |
| 49 | )"; | 50 | )"; |
| 50 | const GLuint shader{glCreateShaderProgramv(GL_VERTEX_SHADER, 1, &AOFFI_TEST)}; | 51 | const GLuint shader{glCreateShaderProgramv(GL_VERTEX_SHADER, 1, &AOFFI_TEST)}; |