Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
bd4603e0
Commit
bd4603e0
authored
Mar 12, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: Update nonuniform tests, based on spec. clarification discussion.
parent
acc10498
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
87 deletions
+142
-87
nonuniform.frag.out
Test/baseResults/nonuniform.frag.out
+46
-32
spv.nonuniform.frag.out
Test/baseResults/spv.nonuniform.frag.out
+82
-47
nonuniform.frag
Test/nonuniform.frag
+7
-4
spv.nonuniform.frag
Test/spv.nonuniform.frag
+7
-4
No files found.
Test/baseResults/nonuniform.frag.out
View file @
bd4603e0
...
@@ -2,34 +2,39 @@ nonuniform.frag
...
@@ -2,34 +2,39 @@ nonuniform.frag
ERROR: 0:6: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
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: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: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:18: 'nonuniformEXT' : for non-parameter, can only apply to 'in' or no storage qualifier
ERROR: 0:23: 'constructor' : too many arguments
ERROR: 0:24: '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:24: 'assign' : cannot convert from ' const float' to ' nonuniform temp int'
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.
ERROR: 8 compilation errors. No code generated.
Shader version: 450
Shader version: 450
ERROR: node is still EOpNull!
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 Function Parameters:
0:10 'nupi' ( nonuniform in int)
0:10 'nupi' ( nonuniform in int)
0:14 Function Definition: main( ( global void)
0:10 'f' ( nonuniform out int)
0:14 Function Parameters:
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:? Sequence
0:
19 Function Call: foo(i1; ( global void
)
0:
20 Function Call: foo(i1;i1; ( nonuniform temp int
)
0:
19
'nu_li' ( nonuniform temp int)
0:
20
'nu_li' ( nonuniform temp int)
0:2
2 move second child to first child (
temp int)
0:2
0 'nu_li' ( nonuniform
temp int)
0:2
2 'nu_li' ( nonuniform
temp int)
0:2
3 move second child to first child (
temp int)
0:2
2 add (
temp int)
0:2
3 'nu_li' ( nonuniform
temp int)
0:2
2 'a' ( nonuniform
temp int)
0:2
3 add (
temp int)
0:2
2 component-wise multiply
( nonuniform temp int)
0:2
3 'a'
( nonuniform temp int)
0:2
2 'a' (
temp int)
0:2
3 component-wise multiply ( nonuniform
temp int)
0:2
2 Constant:
0:2
3 'a' ( temp int)
0:2
2 2 (const int)
0:2
3 Constant:
0:23
'nu_li' ( nonuniform temp
int)
0:23
2 (const
int)
0:24 'nu_li' ( nonuniform temp int)
0:24 'nu_li' ( nonuniform temp int)
0:25 'nu_li' ( nonuniform temp int)
0:? Linker Objects
0:? Linker Objects
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_gf' ( nonuniform temp float)
0:? 'nu_gf' ( nonuniform temp float)
...
@@ -37,6 +42,8 @@ ERROR: node is still EOpNull!
...
@@ -37,6 +42,8 @@ ERROR: node is still EOpNull!
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_constf' ( nonuniform const float)
0:? 'nu_constf' ( nonuniform const float)
0:? 1.000000
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:
Linked fragment stage:
...
@@ -44,24 +51,29 @@ Linked fragment stage:
...
@@ -44,24 +51,29 @@ Linked fragment stage:
Shader version: 450
Shader version: 450
ERROR: node is still EOpNull!
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 Function Parameters:
0:10 'nupi' ( nonuniform in int)
0:10 'nupi' ( nonuniform in int)
0:14 Function Definition: main( ( global void)
0:10 'f' ( nonuniform out int)
0:14 Function Parameters:
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:? Sequence
0:
19 Function Call: foo(i1; ( global void
)
0:
20 Function Call: foo(i1;i1; ( nonuniform temp int
)
0:
19
'nu_li' ( nonuniform temp int)
0:
20
'nu_li' ( nonuniform temp int)
0:2
2 move second child to first child (
temp int)
0:2
0 'nu_li' ( nonuniform
temp int)
0:2
2 'nu_li' ( nonuniform
temp int)
0:2
3 move second child to first child (
temp int)
0:2
2 add (
temp int)
0:2
3 'nu_li' ( nonuniform
temp int)
0:2
2 'a' ( nonuniform
temp int)
0:2
3 add (
temp int)
0:2
2 component-wise multiply
( nonuniform temp int)
0:2
3 'a'
( nonuniform temp int)
0:2
2 'a' (
temp int)
0:2
3 component-wise multiply ( nonuniform
temp int)
0:2
2 Constant:
0:2
3 'a' ( temp int)
0:2
2 2 (const int)
0:2
3 Constant:
0:23
'nu_li' ( nonuniform temp
int)
0:23
2 (const
int)
0:24 'nu_li' ( nonuniform temp int)
0:24 'nu_li' ( nonuniform temp int)
0:25 'nu_li' ( nonuniform temp int)
0:? Linker Objects
0:? Linker Objects
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_inv4' ( smooth nonuniform in 4-component vector of float)
0:? 'nu_gf' ( nonuniform temp float)
0:? 'nu_gf' ( nonuniform temp float)
...
@@ -69,4 +81,6 @@ ERROR: node is still EOpNull!
...
@@ -69,4 +81,6 @@ ERROR: node is still EOpNull!
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_uv4' ( nonuniform uniform 4-component vector of float)
0:? 'nu_constf' ( nonuniform const float)
0:? 'nu_constf' ( nonuniform const float)
0:? 1.000000
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})
Test/baseResults/spv.nonuniform.frag.out
View file @
bd4603e0
spv.nonuniform.frag
spv.nonuniform.frag
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80005
// Generated by (magic number): 80005
// Id's are bound by
36
// Id's are bound by
54
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
27
EntryPoint Fragment 4 "main"
33 44 50
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Source GLSL 450
Name 4 "main"
Name 4 "main"
Name 1
0 "foo(
i1;"
Name 1
1 "foo(i1;
i1;"
Name 9 "nupi"
Name 9 "nupi"
Name 12 "nu_li"
Name 10 "f"
Name 13 "param"
Name 16 "a"
Name 16 "a"
Name 24 "b"
Name 17 "nu_li"
Name 27 "nu_inv4"
Name 18 "param"
Name 33 "nu_gf"
Name 20 "param"
Decorate 12(nu_li) DecorationNonUniformEXT
Name 30 "b"
Decorate 14 DecorationNonUniformEXT
Name 33 "nu_inv4"
Decorate 16(a) DecorationNonUniformEXT
Name 39 "nu_gf"
Decorate 17 DecorationNonUniformEXT
Name 42 "S"
Decorate 20 DecorationNonUniformEXT
MemberName 42(S) 0 "a"
Decorate 27(nu_inv4) Location 0
MemberName 42(S) 1 "b"
Decorate 27(nu_inv4) DecorationNonUniformEXT
Name 44 "ins"
Decorate 33(nu_gf) DecorationNonUniformEXT
Name 48 "inbName"
Decorate 34 DecorationNonUniformEXT
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
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
8: TypeFunction 2 7(ptr)
8: TypeFunction 6(int) 7(ptr) 7(ptr)
19: 6(int) Constant 2
25: 6(int) Constant 2
22: TypeFloat 32
28: TypeFloat 32
23: TypePointer Function 22(float)
29: TypePointer Function 28(float)
25: TypeVector 22(float) 4
31: TypeVector 28(float) 4
26: TypePointer Input 25(fvec4)
32: TypePointer Input 31(fvec4)
27(nu_inv4): 26(ptr) Variable Input
33(nu_inv4): 32(ptr) Variable Input
28: TypeInt 32 0
34: TypeInt 32 0
29: 28(int) Constant 0
35: 34(int) Constant 0
30: TypePointer Input 22(float)
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
4(main): 2 Function None 3
5: Label
5: Label
12(nu_li): 7(ptr) Variable Function
13(param): 7(ptr) Variable Function
16(a): 7(ptr) Variable Function
16(a): 7(ptr) Variable Function
24(b): 23(ptr) Variable Function
17(nu_li): 7(ptr) Variable Function
33(nu_gf): 23(ptr) Variable Function
18(param): 7(ptr) Variable Function
14: 6(int) Load 12(nu_li)
20(param): 7(ptr) Variable Function
Store 13(param) 14
30(b): 29(ptr) Variable Function
15: 2 FunctionCall 10(foo(i1;) 13(param)
39(nu_gf): 29(ptr) Variable Function
17: 6(int) Load 16(a)
19: 6(int) Load 17(nu_li)
18: 6(int) Load 16(a)
Store 18(param) 19
20: 6(int) IMul 18 19
21: 6(int) FunctionCall 11(foo(i1;i1;) 18(param) 20(param)
21: 6(int) IAdd 17 20
22: 6(int) Load 20(param)
Store 12(nu_li) 21
Store 17(nu_li) 22
31: 30(ptr) AccessChain 27(nu_inv4) 29
Store 16(a) 21
32: 22(float) Load 31
23: 6(int) Load 16(a)
34: 22(float) Load 33(nu_gf)
24: 6(int) Load 16(a)
35: 22(float) FMul 32 34
26: 6(int) IMul 24 25
Store 24(b) 35
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
Return
FunctionEnd
FunctionEnd
10(foo(i1;): 2
Function None 8
11(foo(i1;i1;): 6(int)
Function None 8
9(nupi): 7(ptr) FunctionParameter
9(nupi): 7(ptr) FunctionParameter
11: Label
10(f): 7(ptr) FunctionParameter
Return
12: Label
13: 6(int) Load 9(nupi)
ReturnValue 13
FunctionEnd
FunctionEnd
Test/nonuniform.frag
View file @
bd4603e0
...
@@ -7,8 +7,9 @@ nonuniformEXT out vec4 nu_outv4; // ERROR, out
...
@@ -7,8 +7,9 @@ nonuniformEXT out vec4 nu_outv4; // ERROR, out
nonuniformEXT
uniform
vec4
nu_uv4
;
// ERROR, uniform
nonuniformEXT
uniform
vec4
nu_uv4
;
// ERROR, uniform
nonuniformEXT
const
float
nu_constf
=
1
.
0
;
// ERROR, const
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
()
void
main
()
...
@@ -16,10 +17,13 @@ void main()
...
@@ -16,10 +17,13 @@ void main()
nonuniformEXT
int
nu_li
;
nonuniformEXT
int
nu_li
;
nonuniformEXT
const
int
nu_ci
=
2
;
// ERROR, const
nonuniformEXT
const
int
nu_ci
=
2
;
// ERROR, const
foo
(
nu_li
);
foo
(
nu_li
,
nu_li
);
int
a
;
int
a
;
nu_li
=
nonuniformEXT
(
a
)
+
nonuniformEXT
(
a
*
2
);
nu_li
=
nonuniformEXT
(
a
)
+
nonuniformEXT
(
a
*
2
);
nu_li
=
nonuniformEXT
(
a
,
a
);
// ERROR, too many arguments
nu_li
=
nonuniformEXT
(
a
,
a
);
// ERROR, too many arguments
nu_li
=
nonuniformEXT
();
// ERROR, no 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
;
Test/spv.nonuniform.frag
View file @
bd4603e0
...
@@ -2,20 +2,22 @@
...
@@ -2,20 +2,22 @@
layout
(
location
=
0
)
nonuniformEXT
in
vec4
nu_inv4
;
layout
(
location
=
0
)
nonuniformEXT
in
vec4
nu_inv4
;
nonuniformEXT
float
nu_gf
;
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
()
void
main
()
{
{
nonuniformEXT
int
nu_li
;
nonuniformEXT
int
nu_li
;
foo
(
nu_li
);
int
a
=
foo
(
nu_li
,
nu_li
);
int
a
;
nu_li
=
nonuniformEXT
(
a
)
+
nonuniformEXT
(
a
*
2
);
nu_li
=
nonuniformEXT
(
a
)
+
nonuniformEXT
(
a
*
2
);
float
b
;
float
b
;
b
=
nu_inv4
.
x
*
nu_gf
;
b
=
nu_inv4
.
x
*
nu_gf
;
b
=
ins
.
a
+
inb
.
a
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment