Merge pull request #2028 from ShchchowAMD/constant_expressions_array_mod

GLSL: Support constant folding for mod
This commit is contained in:
John Kessenich
2020-02-06 02:56:37 -07:00
committed by GitHub
3 changed files with 23 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ 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);

View File

@@ -4,18 +4,18 @@ Shader version: 460
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 anyInvocation ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 allInvocations ( global bool)
0:12 'b1' ( temp bool)
0:13 move second child to first child ( temp bool)
0:13 'b1' ( temp bool)
0:13 allInvocationsEqual ( global bool)
0:13 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)
@@ -31,18 +31,18 @@ Shader version: 460
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:? Sequence
0:10 move second child to first child ( temp bool)
0:10 'b1' ( temp bool)
0:10 anyInvocation ( global bool)
0:10 'b1' ( temp bool)
0:11 move second child to first child ( temp bool)
0:11 'b1' ( temp bool)
0:11 allInvocations ( global bool)
0:11 anyInvocation ( global bool)
0:11 'b1' ( temp bool)
0:12 move second child to first child ( temp bool)
0:12 'b1' ( temp bool)
0:12 allInvocationsEqual ( global bool)
0:12 allInvocations ( global bool)
0:12 'b1' ( temp bool)
0:13 move second child to first child ( temp bool)
0:13 'b1' ( temp bool)
0:13 allInvocationsEqual ( global bool)
0:13 'b1' ( temp bool)
0:? Linker Objects
0:? 'i' ( global int)
0:? 'f' ( global float)