mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-28 14:15:42 +00:00
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.
This commit is contained in:
parent
7e2bcf04b4
commit
ee81fb94cd
|
@ -43,8 +43,9 @@ bool Device::TestVariableAoffi() {
|
||||||
// This is a unit test, please ignore me on apitrace bug reports.
|
// This is a unit test, please ignore me on apitrace bug reports.
|
||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
uniform ivec2 variable_offset;
|
uniform ivec2 variable_offset;
|
||||||
|
out vec4 output_attribute;
|
||||||
void main() {
|
void main() {
|
||||||
gl_Position = textureOffset(tex, vec2(0), variable_offset);
|
output_attribute = textureOffset(tex, vec2(0), variable_offset);
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
const GLuint shader{glCreateShaderProgramv(GL_VERTEX_SHADER, 1, &AOFFI_TEST)};
|
const GLuint shader{glCreateShaderProgramv(GL_VERTEX_SHADER, 1, &AOFFI_TEST)};
|
||||||
|
|
Loading…
Reference in a new issue