Commit 4aa277c9 authored by Ian Romanick's avatar Ian Romanick
Browse files

Add serveral tests for a==b==c style invalid equality operator uses

invalid-equality-04.vert reproduces Mesa bugzilla #33303.
parent f8acec9f
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
uniform int a;
uniform int b;
uniform int c;
void main() {
if (a == b == c) {
gl_Position = vertex;
} else {
gl_Position = vec4(1.0) - vertex;
}
}
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
void main() {
if (0 == 1 == 2) {
gl_Position = vertex;
} else {
gl_Position = vec4(1.0) - vertex;
}
}
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
uniform int a;
uniform int b;
uniform int c;
vec4 A(bool flag) {
if (flag)
return vertex;
else
return vec4(1.0) - vertex;
}
void main() {
gl_Position = A(a == b == c);
}
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
#ifdef GL_ES
precision mediump float;
#endif
attribute vec4 vertex;
vec4 A(bool flag) {
if (flag)
return vertex;
else
return vec4(1.0) - vertex;
}
void main() {
gl_Position = A(0 == 1 == 2);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment