Commit 8596c106 authored by Chad Versace's avatar Chad Versace
Browse files

glsl-1.xx: Test that operator '%=' is reserved

For langauage versions:
1.00
1.10
1.20
parent 942b979e
// [config]
// expect_result: fail
// glsl_version: 1.00
// [end config]
//
// The modulus assignment operator '%=' is reserved.
//
// From section 5.8 of the GLSL ES 1.00 spec:
// The assignments remainder into (%=), left shift by (<<=), right shift
// by (>>=), inclusive or into ( |=), and exclusive or into ( ^=) are
// reserved for future use.
#version 100
int
f() {
int x = 19;
x %= 4;
return x;
}
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
//
// The modulus assignment operator '%=' is reserved.
//
// From section 5.8 of the GLSL 1.10 spec:
// The assignments modulus into (%=), left shift by (<<=), right shift by
// (>>=), inclusive or into ( |=), and exclusive or into ( ^=). These
// operators are reserved for future use.
#version 110
int
f() {
int x = 19;
x %= 4;
return x;
}
// [config]
// expect_result: fail
// glsl_version: 1.20
// [end config]
//
// The modulus assignment operator '%=' is reserved.
//
// From section 5.8 of the GLSL 1.20 spec:
// The assignments modulus into (%=), left shift by (<<=), right shift by
// (>>=), inclusive or into ( |=), and exclusive or into ( ^=). These
// operators are reserved for future use.
#version 120
int
f() {
int x = 19;
x %= 4;
return x;
}
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