glslang/Test/460.vert
Chow 44e842cd9c Add constant expression with mod
Purpose:
glsl spec allows to define array with the length of the result of  constant expression, the arithmetic operation of "mod(float (7.1), float (4.0))" should be generate the array length at the shader compile time,

but glslang didn't support mod operation for the constant expression in previous implementation;

An example is as following:

###########
#version 460
flat out highp int vtx_out_out0;
void main (void)
{
     float array[int(mod(float (7.1), float (4.0)))];
     vtx_out_out0 =  array.length();
}
###########
2019-12-23 11:29:52 +08:00

17 lines
262 B
GLSL

#version 460 core
int i;
; // extraneous semicolon okay
float f;;;
void main()
{
bool b1;
float array[int(mod(float (7.1), float (4.0)))];
b1 = anyInvocation(b1);
b1 = allInvocations(b1);
b1 = allInvocationsEqual(b1);
}
;
;