Commit bd4603e0 by John Kessenich

Tests: Update nonuniform tests, based on spec. clarification discussion.

parent acc10498
......@@ -2,34 +2,39 @@ nonuniform.frag
ERROR: 0:6: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:7: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:8: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:17: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:23: 'constructor' : too many arguments
ERROR: 0:23: 'assign' : cannot convert from ' const float' to ' nonuniform temp int'
ERROR: 0:24: 'constructor' : not enough data provided for construction
ERROR: 0:18: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:24: 'constructor' : too many arguments
ERROR: 0:24: 'assign' : cannot convert from ' const float' to ' nonuniform temp int'
ERROR: 0:25: 'constructor' : not enough data provided for construction
ERROR: 0:25: 'assign' : cannot convert from ' const float' to ' nonuniform temp int'
ERROR: 8 compilation errors. No code generated.
Shader version: 450
ERROR: node is still EOpNull!
0:10 Function Definition: foo(i1; ( global void)
0:10 Function Definition: foo(i1;i1; ( nonuniform temp int)
0:10 Function Parameters:
0:10 'nupi' ( nonuniform in int)
0:14 Function Definition: main( ( global void)
0:14 Function Parameters:
0:10 'f' ( nonuniform out int)
0:12 Sequence
0:12 Branch: Return with expression
0:12 'nupi' ( nonuniform in int)
0:15 Function Definition: main( ( global void)
0:15 Function Parameters:
0:? Sequence
0:19 Function Call: foo(i1; ( global void)
0:19 'nu_li' ( nonuniform temp int)
0:22 move second child to first child ( temp int)
0:22 'nu_li' ( nonuniform temp int)
0:22 add ( temp int)
0:22 'a' ( nonuniform temp int)
0:22 component-wise multiply ( nonuniform temp int)
0:22 'a' ( temp int)
0:22 Constant:
0:22 2 (const int)
0:23 'nu_li' ( nonuniform temp int)
0:20 Function Call: foo(i1;i1; ( nonuniform temp int)
0:20 'nu_li' ( nonuniform temp int)
0:20 'nu_li' ( nonuniform temp int)
0:23 move second child to first child ( temp int)
0:23 'nu_li' ( nonuniform temp int)
0:23 add ( temp int)
0:23 'a' ( nonuniform temp int)
0:23 component-wise multiply ( nonuniform temp int)
0:23 'a' ( temp int)
0:23 Constant:
0:23 2 (const int)
0:24 'nu_li' ( nonuniform temp int)
0:25 'nu_li' ( nonuniform temp int)
0:? Linker Objects
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_gf' ( nonuniform temp float)
......@@ -37,6 +42,8 @@ ERROR: node is still EOpNull!
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_constf' ( nonuniform const float)
0:? 1.000000
0:? 'ins' (layout( location=1) smooth in structure{ global float a, nonuniform temp float b})
0:? 'inb' (layout( location=3) in block{ in float a, nonuniform in float b})
Linked fragment stage:
......@@ -44,24 +51,29 @@ Linked fragment stage:
Shader version: 450
ERROR: node is still EOpNull!
0:10 Function Definition: foo(i1; ( global void)
0:10 Function Definition: foo(i1;i1; ( nonuniform temp int)
0:10 Function Parameters:
0:10 'nupi' ( nonuniform in int)
0:14 Function Definition: main( ( global void)
0:14 Function Parameters:
0:10 'f' ( nonuniform out int)
0:12 Sequence
0:12 Branch: Return with expression
0:12 'nupi' ( nonuniform in int)
0:15 Function Definition: main( ( global void)
0:15 Function Parameters:
0:? Sequence
0:19 Function Call: foo(i1; ( global void)
0:19 'nu_li' ( nonuniform temp int)
0:22 move second child to first child ( temp int)
0:22 'nu_li' ( nonuniform temp int)
0:22 add ( temp int)
0:22 'a' ( nonuniform temp int)
0:22 component-wise multiply ( nonuniform temp int)
0:22 'a' ( temp int)
0:22 Constant:
0:22 2 (const int)
0:23 'nu_li' ( nonuniform temp int)
0:20 Function Call: foo(i1;i1; ( nonuniform temp int)
0:20 'nu_li' ( nonuniform temp int)
0:20 'nu_li' ( nonuniform temp int)
0:23 move second child to first child ( temp int)
0:23 'nu_li' ( nonuniform temp int)
0:23 add ( temp int)
0:23 'a' ( nonuniform temp int)
0:23 component-wise multiply ( nonuniform temp int)
0:23 'a' ( temp int)
0:23 Constant:
0:23 2 (const int)
0:24 'nu_li' ( nonuniform temp int)
0:25 'nu_li' ( nonuniform temp int)
0:? Linker Objects
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_gf' ( nonuniform temp float)
......@@ -69,4 +81,6 @@ ERROR: node is still EOpNull!
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_constf' ( nonuniform const float)
0:? 1.000000
0:? 'ins' (layout( location=1) smooth in structure{ global float a, nonuniform temp float b})
0:? 'inb' (layout( location=3) in block{ in float a, nonuniform in float b})
spv.nonuniform.frag
// Module Version 10000
// Generated by (magic number): 80005
// Id's are bound by 36
// Id's are bound by 54
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 27
EntryPoint Fragment 4 "main" 33 44 50
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
Name 10 "foo(i1;"
Name 11 "foo(i1;i1;"
Name 9 "nupi"
Name 12 "nu_li"
Name 13 "param"
Name 10 "f"
Name 16 "a"
Name 24 "b"
Name 27 "nu_inv4"
Name 33 "nu_gf"
Decorate 12(nu_li) DecorationNonUniformEXT
Decorate 14 DecorationNonUniformEXT
Decorate 16(a) DecorationNonUniformEXT
Decorate 17 DecorationNonUniformEXT
Decorate 20 DecorationNonUniformEXT
Decorate 27(nu_inv4) Location 0
Decorate 27(nu_inv4) DecorationNonUniformEXT
Decorate 33(nu_gf) DecorationNonUniformEXT
Decorate 34 DecorationNonUniformEXT
Name 17 "nu_li"
Name 18 "param"
Name 20 "param"
Name 30 "b"
Name 33 "nu_inv4"
Name 39 "nu_gf"
Name 42 "S"
MemberName 42(S) 0 "a"
MemberName 42(S) 1 "b"
Name 44 "ins"
Name 48 "inbName"
MemberName 48(inbName) 0 "a"
MemberName 48(inbName) 1 "b"
Name 50 "inb"
Decorate 13 DecorationNonUniformEXT
Decorate 17(nu_li) DecorationNonUniformEXT
Decorate 19 DecorationNonUniformEXT
Decorate 23 DecorationNonUniformEXT
Decorate 26 DecorationNonUniformEXT
Decorate 33(nu_inv4) Location 0
Decorate 33(nu_inv4) DecorationNonUniformEXT
Decorate 39(nu_gf) DecorationNonUniformEXT
Decorate 40 DecorationNonUniformEXT
MemberDecorate 42(S) 1 DecorationNonUniformEXT
Decorate 44(ins) Location 1
MemberDecorate 48(inbName) 0 DecorationNonUniformEXT
Decorate 48(inbName) Block
Decorate 50(inb) Location 3
Decorate 52 DecorationNonUniformEXT
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
8: TypeFunction 2 7(ptr)
19: 6(int) Constant 2
22: TypeFloat 32
23: TypePointer Function 22(float)
25: TypeVector 22(float) 4
26: TypePointer Input 25(fvec4)
27(nu_inv4): 26(ptr) Variable Input
28: TypeInt 32 0
29: 28(int) Constant 0
30: TypePointer Input 22(float)
8: TypeFunction 6(int) 7(ptr) 7(ptr)
25: 6(int) Constant 2
28: TypeFloat 32
29: TypePointer Function 28(float)
31: TypeVector 28(float) 4
32: TypePointer Input 31(fvec4)
33(nu_inv4): 32(ptr) Variable Input
34: TypeInt 32 0
35: 34(int) Constant 0
36: TypePointer Input 28(float)
42(S): TypeStruct 28(float) 28(float)
43: TypePointer Input 42(S)
44(ins): 43(ptr) Variable Input
45: 6(int) Constant 0
48(inbName): TypeStruct 28(float) 28(float)
49: TypePointer Input 48(inbName)
50(inb): 49(ptr) Variable Input
4(main): 2 Function None 3
5: Label
12(nu_li): 7(ptr) Variable Function
13(param): 7(ptr) Variable Function
16(a): 7(ptr) Variable Function
24(b): 23(ptr) Variable Function
33(nu_gf): 23(ptr) Variable Function
14: 6(int) Load 12(nu_li)
Store 13(param) 14
15: 2 FunctionCall 10(foo(i1;) 13(param)
17: 6(int) Load 16(a)
18: 6(int) Load 16(a)
20: 6(int) IMul 18 19
21: 6(int) IAdd 17 20
Store 12(nu_li) 21
31: 30(ptr) AccessChain 27(nu_inv4) 29
32: 22(float) Load 31
34: 22(float) Load 33(nu_gf)
35: 22(float) FMul 32 34
Store 24(b) 35
17(nu_li): 7(ptr) Variable Function
18(param): 7(ptr) Variable Function
20(param): 7(ptr) Variable Function
30(b): 29(ptr) Variable Function
39(nu_gf): 29(ptr) Variable Function
19: 6(int) Load 17(nu_li)
Store 18(param) 19
21: 6(int) FunctionCall 11(foo(i1;i1;) 18(param) 20(param)
22: 6(int) Load 20(param)
Store 17(nu_li) 22
Store 16(a) 21
23: 6(int) Load 16(a)
24: 6(int) Load 16(a)
26: 6(int) IMul 24 25
27: 6(int) IAdd 23 26
Store 17(nu_li) 27
37: 36(ptr) AccessChain 33(nu_inv4) 35
38: 28(float) Load 37
40: 28(float) Load 39(nu_gf)
41: 28(float) FMul 38 40
Store 30(b) 41
46: 36(ptr) AccessChain 44(ins) 45
47: 28(float) Load 46
51: 36(ptr) AccessChain 50(inb) 45
52: 28(float) Load 51
53: 28(float) FAdd 47 52
Store 30(b) 53
Return
FunctionEnd
10(foo(i1;): 2 Function None 8
11(foo(i1;i1;): 6(int) Function None 8
9(nupi): 7(ptr) FunctionParameter
11: Label
Return
10(f): 7(ptr) FunctionParameter
12: Label
13: 6(int) Load 9(nupi)
ReturnValue 13
FunctionEnd
......@@ -7,8 +7,9 @@ nonuniformEXT out vec4 nu_outv4; // ERROR, out
nonuniformEXT uniform vec4 nu_uv4; // ERROR, uniform
nonuniformEXT const float nu_constf = 1.0; // ERROR, const
void foo(nonuniformEXT int nupi)
nonuniformEXT int foo(nonuniformEXT int nupi, nonuniformEXT out int f)
{
return nupi;
}
void main()
......@@ -16,10 +17,13 @@ void main()
nonuniformEXT int nu_li;
nonuniformEXT const int nu_ci = 2; // ERROR, const
foo(nu_li);
foo(nu_li, nu_li);
int a;
nu_li = nonuniformEXT(a) + nonuniformEXT(a * 2);
nu_li = nonuniformEXT(a, a); // ERROR, too many arguments
nu_li = nonuniformEXT(); // ERROR, no arguments
}
\ No newline at end of file
}
layout(location=1) in struct S { float a; nonuniformEXT float b; } ins;
layout(location=3) in inbName { float a; nonuniformEXT float b; } inb;
......@@ -2,20 +2,22 @@
layout(location=0) nonuniformEXT in vec4 nu_inv4;
nonuniformEXT float nu_gf;
layout(location=1) in struct S { float a; nonuniformEXT float b; } ins;
layout(location=3) in inbName { nonuniformEXT float a; float b; } inb;
void foo(nonuniformEXT int nupi)
nonuniformEXT int foo(nonuniformEXT int nupi, nonuniformEXT out int f)
{
return nupi;
}
void main()
{
nonuniformEXT int nu_li;
foo(nu_li);
int a;
int a = foo(nu_li, nu_li);
nu_li = nonuniformEXT(a) + nonuniformEXT(a * 2);
float b;
b = nu_inv4.x * nu_gf;
b = ins.a + inb.a;
}
\ No newline at end of file
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