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
cd6b2382
Commit
cd6b2382
authored
Jun 15, 2021
by
Greg Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove output variables from compute regression tests
Output variables in GLCompute shaders is not supported in Vulkan. Recent upgrade of spirv-tools revealed this problem.
parent
a23e1436
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
203 additions
and
339 deletions
+203
-339
hlsl.attribute.expression.comp.out
Test/baseResults/hlsl.attribute.expression.comp.out
+46
-75
hlsl.intrinsics.barriers.comp.out
Test/baseResults/hlsl.intrinsics.barriers.comp.out
+23
-44
hlsl.intrinsics.negative.comp.out
Test/baseResults/hlsl.intrinsics.negative.comp.out
+127
-199
hlsl.attribute.expression.comp
Test/hlsl.attribute.expression.comp
+1
-3
hlsl.intrinsics.barriers.comp
Test/hlsl.intrinsics.barriers.comp
+1
-3
hlsl.intrinsics.negative.comp
Test/hlsl.intrinsics.negative.comp
+5
-15
No files found.
Test/baseResults/hlsl.attribute.expression.comp.out
View file @
cd6b2382
...
@@ -2,7 +2,7 @@ hlsl.attribute.expression.comp
...
@@ -2,7 +2,7 @@ hlsl.attribute.expression.comp
Shader version: 500
Shader version: 500
local_size = (4, 6, 8)
local_size = (4, 6, 8)
0:? Sequence
0:? Sequence
0:9 Function Definition: @main( ( temp
4-component vector of float
)
0:9 Function Definition: @main( ( temp
void
)
0:9 Function Parameters:
0:9 Function Parameters:
0:? Sequence
0:? Sequence
0:11 Sequence
0:11 Sequence
...
@@ -22,21 +22,12 @@ local_size = (4, 6, 8)
...
@@ -22,21 +22,12 @@ local_size = (4, 6, 8)
0:11 Loop Terminal Expression
0:11 Loop Terminal Expression
0:11 Pre-Increment ( temp int)
0:11 Pre-Increment ( temp int)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
0:14 Branch: Return with expression
0:14 Constant:
0:14 0.000000
0:14 0.000000
0:14 0.000000
0:14 0.000000
0:9 Function Definition: main( ( temp void)
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:9 Function Parameters:
0:? Sequence
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 Function Call: @main( ( temp void)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:9 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
Linked compute stage:
Linked compute stage:
...
@@ -45,7 +36,7 @@ Linked compute stage:
...
@@ -45,7 +36,7 @@ Linked compute stage:
Shader version: 500
Shader version: 500
local_size = (4, 6, 8)
local_size = (4, 6, 8)
0:? Sequence
0:? Sequence
0:9 Function Definition: @main( ( temp
4-component vector of float
)
0:9 Function Definition: @main( ( temp
void
)
0:9 Function Parameters:
0:9 Function Parameters:
0:? Sequence
0:? Sequence
0:11 Sequence
0:11 Sequence
...
@@ -65,90 +56,70 @@ local_size = (4, 6, 8)
...
@@ -65,90 +56,70 @@ local_size = (4, 6, 8)
0:11 Loop Terminal Expression
0:11 Loop Terminal Expression
0:11 Pre-Increment ( temp int)
0:11 Pre-Increment ( temp int)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
0:14 Branch: Return with expression
0:14 Constant:
0:14 0.000000
0:14 0.000000
0:14 0.000000
0:14 0.000000
0:9 Function Definition: main( ( temp void)
0:9 Function Definition: main( ( temp void)
0:9 Function Parameters:
0:9 Function Parameters:
0:? Sequence
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 Function Call: @main( ( temp void)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:9 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
Validation failed
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 8000a
// Generated by (magic number): 8000a
// Id's are bound by 3
9
// Id's are bound by 3
0
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
37
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 4 6 8
ExecutionMode 4 LocalSize 4 6 8
Source HLSL 500
Source HLSL 500
Name 4 "main"
Name 4 "main"
Name 9 "@main("
Name 6 "@main("
Name 13 "x"
Name 10 "x"
Name 21 "$Global"
Name 18 "$Global"
MemberName 21($Global) 0 "bound"
MemberName 18($Global) 0 "bound"
Name 23 ""
Name 20 ""
Name 37 "@entryPointOutput"
MemberDecorate 18($Global) 0 Offset 0
MemberDecorate 21($Global) 0 Offset 0
Decorate 18($Global) Block
Decorate 21($Global) Block
Decorate 20 DescriptorSet 0
Decorate 23 DescriptorSet 0
Decorate 20 Binding 0
Decorate 23 Binding 0
Decorate 37(@entryPointOutput) Location 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
8: TypeInt 32 1
7: TypeVector 6(float) 4
9: TypePointer Function 8(int)
8: TypeFunction 7(fvec4)
11: 8(int) Constant 0
11: TypeInt 32 1
18($Global): TypeStruct 8(int)
12: TypePointer Function 11(int)
19: TypePointer Uniform 18($Global)
14: 11(int) Constant 0
20: 19(ptr) Variable Uniform
21($Global): TypeStruct 11(int)
21: TypePointer Uniform 8(int)
22: TypePointer Uniform 21($Global)
24: TypeBool
23: 22(ptr) Variable Uniform
27: 8(int) Constant 1
24: TypePointer Uniform 11(int)
27: TypeBool
30: 11(int) Constant 1
32: 6(float) Constant 0
33: 7(fvec4) ConstantComposite 32 32 32 32
36: TypePointer Output 7(fvec4)
37(@entryPointOutput): 36(ptr) Variable Output
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
38: 7(fvec4) FunctionCall 9(@main()
29: 2 FunctionCall 6(@main()
Store 37(@entryPointOutput) 38
Return
Return
FunctionEnd
FunctionEnd
9(@main(): 7(fvec4) Function None 8
6(@main(): 2 Function None 3
10: Label
7: Label
13(x): 12(ptr) Variable Function
10(x): 9(ptr) Variable Function
Store 13(x) 14
Store 10(x) 11
Branch 15
Branch 12
15: Label
12: Label
LoopMerge 17 18 Unroll
LoopMerge 14 15 Unroll
Branch 19
Branch 16
19: Label
20: 11(int) Load 13(x)
25: 24(ptr) AccessChain 23 14
26: 11(int) Load 25
28: 27(bool) SLessThan 20 26
BranchConditional 28 16 17
16: Label
16: Label
Branch 18
17: 8(int) Load 10(x)
18: Label
22: 21(ptr) AccessChain 20 11
29: 11(int) Load 13(x)
23: 8(int) Load 22
31: 11(int) IAdd 29 30
25: 24(bool) SLessThan 17 23
Store 13(x) 31
BranchConditional 25 13 14
13: Label
Branch 15
Branch 15
17: Label
15: Label
ReturnValue 33
26: 8(int) Load 10(x)
28: 8(int) IAdd 26 27
Store 10(x) 28
Branch 12
14: Label
Return
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.intrinsics.barriers.comp.out
View file @
cd6b2382
...
@@ -2,7 +2,7 @@ hlsl.intrinsics.barriers.comp
...
@@ -2,7 +2,7 @@ hlsl.intrinsics.barriers.comp
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:3 Function Definition: @ComputeShaderFunction( ( temp
float
)
0:3 Function Definition: @ComputeShaderFunction( ( temp
void
)
0:3 Function Parameters:
0:3 Function Parameters:
0:? Sequence
0:? Sequence
0:4 MemoryBarrier ( temp void)
0:4 MemoryBarrier ( temp void)
...
@@ -11,17 +11,11 @@ local_size = (1, 1, 1)
...
@@ -11,17 +11,11 @@ local_size = (1, 1, 1)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:8 WorkgroupMemoryBarrier ( temp void)
0:8 WorkgroupMemoryBarrier ( temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
0:11 Branch: Return with expression
0:11 Constant:
0:11 0.000000
0:3 Function Definition: ComputeShaderFunction( ( temp void)
0:3 Function Definition: ComputeShaderFunction( ( temp void)
0:3 Function Parameters:
0:3 Function Parameters:
0:? Sequence
0:? Sequence
0:3 move second child to first child ( temp float)
0:3 Function Call: @ComputeShaderFunction( ( temp void)
0:? '@entryPointOutput' (layout( location=0) out float)
0:3 Function Call: @ComputeShaderFunction( ( temp float)
0:? Linker Objects
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out float)
Linked compute stage:
Linked compute stage:
...
@@ -30,7 +24,7 @@ Linked compute stage:
...
@@ -30,7 +24,7 @@ Linked compute stage:
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:3 Function Definition: @ComputeShaderFunction( ( temp
float
)
0:3 Function Definition: @ComputeShaderFunction( ( temp
void
)
0:3 Function Parameters:
0:3 Function Parameters:
0:? Sequence
0:? Sequence
0:4 MemoryBarrier ( temp void)
0:4 MemoryBarrier ( temp void)
...
@@ -39,59 +33,44 @@ local_size = (1, 1, 1)
...
@@ -39,59 +33,44 @@ local_size = (1, 1, 1)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:8 WorkgroupMemoryBarrier ( temp void)
0:8 WorkgroupMemoryBarrier ( temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
0:11 Branch: Return with expression
0:11 Constant:
0:11 0.000000
0:3 Function Definition: ComputeShaderFunction( ( temp void)
0:3 Function Definition: ComputeShaderFunction( ( temp void)
0:3 Function Parameters:
0:3 Function Parameters:
0:? Sequence
0:? Sequence
0:3 move second child to first child ( temp float)
0:3 Function Call: @ComputeShaderFunction( ( temp void)
0:? '@entryPointOutput' (layout( location=0) out float)
0:3 Function Call: @ComputeShaderFunction( ( temp float)
0:? Linker Objects
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out float)
Validation failed
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 8000a
// Generated by (magic number): 8000a
// Id's are bound by
22
// Id's are bound by
15
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction"
20
EntryPoint GLCompute 4 "ComputeShaderFunction"
ExecutionMode 4 LocalSize 1 1 1
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Source HLSL 500
Name 4 "ComputeShaderFunction"
Name 4 "ComputeShaderFunction"
Name 8 "@ComputeShaderFunction("
Name 6 "@ComputeShaderFunction("
Name 20 "@entryPointOutput"
Decorate 20(@entryPointOutput) Location 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
8: TypeInt 32 0
7: TypeFunction 6(float)
9: 8(int) Constant 1
10: TypeInt 32 0
10: 8(int) Constant 3400
11: 10(int) Constant 1
11: 8(int) Constant 2
12: 10(int) Constant 3400
12: 8(int) Constant 2120
13: 10(int) Constant 2
13: 8(int) Constant 264
14: 10(int) Constant 2120
15: 10(int) Constant 264
16: 6(float) Constant 0
19: TypePointer Output 6(float)
20(@entryPointOutput): 19(ptr) Variable Output
4(ComputeShaderFunction): 2 Function None 3
4(ComputeShaderFunction): 2 Function None 3
5: Label
5: Label
21: 6(float) FunctionCall 8(@ComputeShaderFunction()
14: 2 FunctionCall 6(@ComputeShaderFunction()
Store 20(@entryPointOutput) 21
Return
Return
FunctionEnd
FunctionEnd
8(@ComputeShaderFunction(): 6(float) Function None 7
6(@ComputeShaderFunction(): 2 Function None 3
9
: Label
7
: Label
MemoryBarrier
11 12
MemoryBarrier
9 10
ControlBarrier 1
3 11 12
ControlBarrier 1
1 9 10
MemoryBarrier
11 14
MemoryBarrier
9 12
ControlBarrier 1
3 11 14
ControlBarrier 1
1 9 12
MemoryBarrier 1
3 15
MemoryBarrier 1
1 13
ControlBarrier 1
3 13 15
ControlBarrier 1
1 11 13
Return
Value 16
Return
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.intrinsics.negative.comp.out
View file @
cd6b2382
...
@@ -2,86 +2,57 @@ hlsl.intrinsics.negative.comp
...
@@ -2,86 +2,57 @@ hlsl.intrinsics.negative.comp
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp
float
)
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp
void
)
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'inF0' ( in float)
0:2 'inF0' ( in float)
0:2 'inF1' ( in float)
0:2 'inF1' ( in float)
0:2 'inF2' ( in float)
0:2 'inF2' ( in float)
0:2 'inI0' ( in int)
0:2 'inI0' ( in int)
0:55 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp void)
0:55 Function Parameters:
0:55 'inF0' ( in 1-component vector of float)
0:55 'inF1' ( in 1-component vector of float)
0:55 'inF2' ( in 1-component vector of float)
0:55 'inI0' ( in 1-component vector of int)
0:62 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp void)
0:62 Function Parameters:
0:62 'inF0' ( in 2-component vector of float)
0:62 'inF1' ( in 2-component vector of float)
0:62 'inF2' ( in 2-component vector of float)
0:62 'inI0' ( in 2-component vector of int)
0:107 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp void)
0:107 Function Parameters:
0:107 'inF0' ( in 3-component vector of float)
0:107 'inF1' ( in 3-component vector of float)
0:107 'inF2' ( in 3-component vector of float)
0:107 'inI0' ( in 3-component vector of int)
0:150 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
0:150 Function Parameters:
0:150 'inF0' ( in 4-component vector of float)
0:150 'inF1' ( in 4-component vector of float)
0:150 'inF2' ( in 4-component vector of float)
0:150 'inI0' ( in 4-component vector of int)
0:150 Function Definition: ComputeShaderFunction( ( temp void)
0:150 Function Parameters:
0:? Sequence
0:? Sequence
0:53 Branch: Return with expression
0:150 move second child to first child ( temp 4-component vector of float)
0:53 Constant:
0:53 0.000000
0:57 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp 1-component vector of float)
0:57 Function Parameters:
0:57 'inF0' ( in 1-component vector of float)
0:57 'inF1' ( in 1-component vector of float)
0:57 'inF2' ( in 1-component vector of float)
0:57 'inI0' ( in 1-component vector of int)
0:? Sequence
0:62 Branch: Return with expression
0:62 Constant:
0:62 0.000000
0:66 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp 2-component vector of float)
0:66 Function Parameters:
0:66 'inF0' ( in 2-component vector of float)
0:66 'inF1' ( in 2-component vector of float)
0:66 'inF2' ( in 2-component vector of float)
0:66 'inI0' ( in 2-component vector of int)
0:? Sequence
0:109 Branch: Return with expression
0:109 Constant:
0:109 1.000000
0:109 2.000000
0:113 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp 3-component vector of float)
0:113 Function Parameters:
0:113 'inF0' ( in 3-component vector of float)
0:113 'inF1' ( in 3-component vector of float)
0:113 'inF2' ( in 3-component vector of float)
0:113 'inI0' ( in 3-component vector of int)
0:? Sequence
0:154 Branch: Return with expression
0:154 Constant:
0:154 1.000000
0:154 2.000000
0:154 3.000000
0:158 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
0:158 Function Parameters:
0:158 'inF0' ( in 4-component vector of float)
0:158 'inF1' ( in 4-component vector of float)
0:158 'inF2' ( in 4-component vector of float)
0:158 'inI0' ( in 4-component vector of int)
0:? Sequence
0:199 Branch: Return with expression
0:199 Constant:
0:199 1.000000
0:199 2.000000
0:199 3.000000
0:199 4.000000
0:158 Function Definition: ComputeShaderFunction( ( temp void)
0:158 Function Parameters:
0:? Sequence
0:158 move second child to first child ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of float)
0:15
0
move second child to first child ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of float)
0:15
0
move second child to first child ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of int)
0:15
0
move second child to first child ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
0:158 move second child to first child ( temp 4-component vector of float)
0:150 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:158 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? Linker Objects
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
...
@@ -94,100 +65,70 @@ Linked compute stage:
...
@@ -94,100 +65,70 @@ Linked compute stage:
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp
float
)
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp
void
)
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'inF0' ( in float)
0:2 'inF0' ( in float)
0:2 'inF1' ( in float)
0:2 'inF1' ( in float)
0:2 'inF2' ( in float)
0:2 'inF2' ( in float)
0:2 'inI0' ( in int)
0:2 'inI0' ( in int)
0:55 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp void)
0:55 Function Parameters:
0:55 'inF0' ( in 1-component vector of float)
0:55 'inF1' ( in 1-component vector of float)
0:55 'inF2' ( in 1-component vector of float)
0:55 'inI0' ( in 1-component vector of int)
0:62 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp void)
0:62 Function Parameters:
0:62 'inF0' ( in 2-component vector of float)
0:62 'inF1' ( in 2-component vector of float)
0:62 'inF2' ( in 2-component vector of float)
0:62 'inI0' ( in 2-component vector of int)
0:107 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp void)
0:107 Function Parameters:
0:107 'inF0' ( in 3-component vector of float)
0:107 'inF1' ( in 3-component vector of float)
0:107 'inF2' ( in 3-component vector of float)
0:107 'inI0' ( in 3-component vector of int)
0:150 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
0:150 Function Parameters:
0:150 'inF0' ( in 4-component vector of float)
0:150 'inF1' ( in 4-component vector of float)
0:150 'inF2' ( in 4-component vector of float)
0:150 'inI0' ( in 4-component vector of int)
0:150 Function Definition: ComputeShaderFunction( ( temp void)
0:150 Function Parameters:
0:? Sequence
0:? Sequence
0:53 Branch: Return with expression
0:150 move second child to first child ( temp 4-component vector of float)
0:53 Constant:
0:53 0.000000
0:57 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp 1-component vector of float)
0:57 Function Parameters:
0:57 'inF0' ( in 1-component vector of float)
0:57 'inF1' ( in 1-component vector of float)
0:57 'inF2' ( in 1-component vector of float)
0:57 'inI0' ( in 1-component vector of int)
0:? Sequence
0:62 Branch: Return with expression
0:62 Constant:
0:62 0.000000
0:66 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp 2-component vector of float)
0:66 Function Parameters:
0:66 'inF0' ( in 2-component vector of float)
0:66 'inF1' ( in 2-component vector of float)
0:66 'inF2' ( in 2-component vector of float)
0:66 'inI0' ( in 2-component vector of int)
0:? Sequence
0:109 Branch: Return with expression
0:109 Constant:
0:109 1.000000
0:109 2.000000
0:113 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp 3-component vector of float)
0:113 Function Parameters:
0:113 'inF0' ( in 3-component vector of float)
0:113 'inF1' ( in 3-component vector of float)
0:113 'inF2' ( in 3-component vector of float)
0:113 'inI0' ( in 3-component vector of int)
0:? Sequence
0:154 Branch: Return with expression
0:154 Constant:
0:154 1.000000
0:154 2.000000
0:154 3.000000
0:158 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
0:158 Function Parameters:
0:158 'inF0' ( in 4-component vector of float)
0:158 'inF1' ( in 4-component vector of float)
0:158 'inF2' ( in 4-component vector of float)
0:158 'inI0' ( in 4-component vector of int)
0:? Sequence
0:199 Branch: Return with expression
0:199 Constant:
0:199 1.000000
0:199 2.000000
0:199 3.000000
0:199 4.000000
0:158 Function Definition: ComputeShaderFunction( ( temp void)
0:158 Function Parameters:
0:? Sequence
0:158 move second child to first child ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of float)
0:15
0
move second child to first child ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of float)
0:15
0
move second child to first child ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:15
8
move second child to first child ( temp 4-component vector of int)
0:15
0
move second child to first child ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
0:158 move second child to first child ( temp 4-component vector of float)
0:150 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:158 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF0' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF1' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inF2' ( temp 4-component vector of float)
0:? 'inI0' ( temp 4-component vector of int)
0:? 'inI0' ( temp 4-component vector of int)
0:? Linker Objects
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF0' (layout( location=0) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF1' (layout( location=1) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:? 'inF2' (layout( location=2) in 4-component vector of float)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
0:? 'inI0' (layout( location=3) in 4-component vector of int)
Validation failed
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 8000a
// Generated by (magic number): 8000a
// Id's are bound by
9
9
// Id's are bound by
7
9
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction"
76 79 82 86 89
EntryPoint GLCompute 4 "ComputeShaderFunction"
58 61 64 68
ExecutionMode 4 LocalSize 1 1 1
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Source HLSL 500
Name 4 "ComputeShaderFunction"
Name 4 "ComputeShaderFunction"
...
@@ -216,129 +157,116 @@ Validation failed
...
@@ -216,129 +157,116 @@ Validation failed
Name 51 "inF1"
Name 51 "inF1"
Name 52 "inF2"
Name 52 "inF2"
Name 53 "inI0"
Name 53 "inI0"
Name 74 "inF0"
Name 56 "inF0"
Name 76 "inF0"
Name 58 "inF0"
Name 78 "inF1"
Name 60 "inF1"
Name 79 "inF1"
Name 61 "inF1"
Name 81 "inF2"
Name 63 "inF2"
Name 82 "inF2"
Name 64 "inF2"
Name 84 "inI0"
Name 66 "inI0"
Name 86 "inI0"
Name 68 "inI0"
Name 89 "@entryPointOutput"
Name 70 "param"
Name 90 "param"
Name 72 "param"
Name 92 "param"
Name 74 "param"
Name 94 "param"
Name 76 "param"
Name 96 "param"
Decorate 58(inF0) Location 0
Decorate 76(inF0) Location 0
Decorate 61(inF1) Location 1
Decorate 79(inF1) Location 1
Decorate 64(inF2) Location 2
Decorate 82(inF2) Location 2
Decorate 68(inI0) Location 3
Decorate 86(inI0) Location 3
Decorate 89(@entryPointOutput) Location 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
7: TypePointer Function 6(float)
7: TypePointer Function 6(float)
8: TypeInt 32 1
8: TypeInt 32 1
9: TypePointer Function 8(int)
9: TypePointer Function 8(int)
10: TypeFunction
6(float)
7(ptr) 7(ptr) 7(ptr) 9(ptr)
10: TypeFunction
2
7(ptr) 7(ptr) 7(ptr) 9(ptr)
23: TypeVector 6(float) 2
23: TypeVector 6(float) 2
24: TypePointer Function 23(fvec2)
24: TypePointer Function 23(fvec2)
25: TypeVector 8(int) 2
25: TypeVector 8(int) 2
26: TypePointer Function 25(ivec2)
26: TypePointer Function 25(ivec2)
27: TypeFunction 2
3(fvec2)
24(ptr) 24(ptr) 24(ptr) 26(ptr)
27: TypeFunction 2 24(ptr) 24(ptr) 24(ptr) 26(ptr)
34: TypeVector 6(float) 3
34: TypeVector 6(float) 3
35: TypePointer Function 34(fvec3)
35: TypePointer Function 34(fvec3)
36: TypeVector 8(int) 3
36: TypeVector 8(int) 3
37: TypePointer Function 36(ivec3)
37: TypePointer Function 36(ivec3)
38: TypeFunction
34(fvec3)
35(ptr) 35(ptr) 35(ptr) 37(ptr)
38: TypeFunction
2
35(ptr) 35(ptr) 35(ptr) 37(ptr)
45: TypeVector 6(float) 4
45: TypeVector 6(float) 4
46: TypePointer Function 45(fvec4)
46: TypePointer Function 45(fvec4)
47: TypeVector 8(int) 4
47: TypeVector 8(int) 4
48: TypePointer Function 47(ivec4)
48: TypePointer Function 47(ivec4)
49: TypeFunction 45(fvec4) 46(ptr) 46(ptr) 46(ptr) 48(ptr)
49: TypeFunction 2 46(ptr) 46(ptr) 46(ptr) 48(ptr)
56: 6(float) Constant 0
57: TypePointer Input 45(fvec4)
61: 6(float) Constant 1065353216
58(inF0): 57(ptr) Variable Input
62: 6(float) Constant 1073741824
61(inF1): 57(ptr) Variable Input
63: 23(fvec2) ConstantComposite 61 62
64(inF2): 57(ptr) Variable Input
66: 6(float) Constant 1077936128
67: TypePointer Input 47(ivec4)
67: 34(fvec3) ConstantComposite 61 62 66
68(inI0): 67(ptr) Variable Input
70: 6(float) Constant 1082130432
71: 45(fvec4) ConstantComposite 61 62 66 70
75: TypePointer Input 45(fvec4)
76(inF0): 75(ptr) Variable Input
79(inF1): 75(ptr) Variable Input
82(inF2): 75(ptr) Variable Input
85: TypePointer Input 47(ivec4)
86(inI0): 85(ptr) Variable Input
88: TypePointer Output 45(fvec4)
89(@entryPointOutput): 88(ptr) Variable Output
4(ComputeShaderFunction): 2 Function None 3
4(ComputeShaderFunction): 2 Function None 3
5: Label
5: Label
74(inF0): 46(ptr) Variable Function
56(inF0): 46(ptr) Variable Function
78(inF1): 46(ptr) Variable Function
60(inF1): 46(ptr) Variable Function
81(inF2): 46(ptr) Variable Function
63(inF2): 46(ptr) Variable Function
84(inI0): 48(ptr) Variable Function
66(inI0): 48(ptr) Variable Function
90(param): 46(ptr) Variable Function
70(param): 46(ptr) Variable Function
92(param): 46(ptr) Variable Function
72(param): 46(ptr) Variable Function
94(param): 46(ptr) Variable Function
74(param): 46(ptr) Variable Function
96(param): 48(ptr) Variable Function
76(param): 48(ptr) Variable Function
77: 45(fvec4) Load 76(inF0)
59: 45(fvec4) Load 58(inF0)
Store 74(inF0) 77
Store 56(inF0) 59
80: 45(fvec4) Load 79(inF1)
62: 45(fvec4) Load 61(inF1)
Store 78(inF1) 80
Store 60(inF1) 62
83: 45(fvec4) Load 82(inF2)
65: 45(fvec4) Load 64(inF2)
Store 81(inF2) 83
Store 63(inF2) 65
87: 47(ivec4) Load 86(inI0)
69: 47(ivec4) Load 68(inI0)
Store 84(inI0) 87
Store 66(inI0) 69
91: 45(fvec4) Load 74(inF0)
71: 45(fvec4) Load 56(inF0)
Store 90(param) 91
Store 70(param) 71
93: 45(fvec4) Load 78(inF1)
73: 45(fvec4) Load 60(inF1)
Store 92(param) 93
Store 72(param) 73
95: 45(fvec4) Load 81(inF2)
75: 45(fvec4) Load 63(inF2)
Store 94(param) 95
Store 74(param) 75
97: 47(ivec4) Load 84(inI0)
77: 47(ivec4) Load 66(inI0)
Store 96(param) 97
Store 76(param) 77
98: 45(fvec4) FunctionCall 54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;) 90(param) 92(param) 94(param) 96(param)
78: 2 FunctionCall 54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;) 70(param) 72(param) 74(param) 76(param)
Store 89(@entryPointOutput) 98
Return
Return
FunctionEnd
FunctionEnd
15(ComputeShaderFunctionS(f1;f1;f1;i1;):
6(float)
Function None 10
15(ComputeShaderFunctionS(f1;f1;f1;i1;):
2
Function None 10
11(inF0): 7(ptr) FunctionParameter
11(inF0): 7(ptr) FunctionParameter
12(inF1): 7(ptr) FunctionParameter
12(inF1): 7(ptr) FunctionParameter
13(inF2): 7(ptr) FunctionParameter
13(inF2): 7(ptr) FunctionParameter
14(inI0): 9(ptr) FunctionParameter
14(inI0): 9(ptr) FunctionParameter
16: Label
16: Label
Return
Value 56
Return
FunctionEnd
FunctionEnd
21(ComputeShaderFunction1(vf1;vf1;vf1;vi1;):
6(float)
Function None 10
21(ComputeShaderFunction1(vf1;vf1;vf1;vi1;):
2
Function None 10
17(inF0): 7(ptr) FunctionParameter
17(inF0): 7(ptr) FunctionParameter
18(inF1): 7(ptr) FunctionParameter
18(inF1): 7(ptr) FunctionParameter
19(inF2): 7(ptr) FunctionParameter
19(inF2): 7(ptr) FunctionParameter
20(inI0): 9(ptr) FunctionParameter
20(inI0): 9(ptr) FunctionParameter
22: Label
22: Label
Return
Value 56
Return
FunctionEnd
FunctionEnd
32(ComputeShaderFunction2(vf2;vf2;vf2;vi2;):
23(fvec2)
Function None 27
32(ComputeShaderFunction2(vf2;vf2;vf2;vi2;):
2
Function None 27
28(inF0): 24(ptr) FunctionParameter
28(inF0): 24(ptr) FunctionParameter
29(inF1): 24(ptr) FunctionParameter
29(inF1): 24(ptr) FunctionParameter
30(inF2): 24(ptr) FunctionParameter
30(inF2): 24(ptr) FunctionParameter
31(inI0): 26(ptr) FunctionParameter
31(inI0): 26(ptr) FunctionParameter
33: Label
33: Label
Return
Value 63
Return
FunctionEnd
FunctionEnd
43(ComputeShaderFunction3(vf3;vf3;vf3;vi3;):
34(fvec3)
Function None 38
43(ComputeShaderFunction3(vf3;vf3;vf3;vi3;):
2
Function None 38
39(inF0): 35(ptr) FunctionParameter
39(inF0): 35(ptr) FunctionParameter
40(inF1): 35(ptr) FunctionParameter
40(inF1): 35(ptr) FunctionParameter
41(inF2): 35(ptr) FunctionParameter
41(inF2): 35(ptr) FunctionParameter
42(inI0): 37(ptr) FunctionParameter
42(inI0): 37(ptr) FunctionParameter
44: Label
44: Label
Return
Value 67
Return
FunctionEnd
FunctionEnd
54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;):
45(fvec4)
Function None 49
54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;):
2
Function None 49
50(inF0): 46(ptr) FunctionParameter
50(inF0): 46(ptr) FunctionParameter
51(inF1): 46(ptr) FunctionParameter
51(inF1): 46(ptr) FunctionParameter
52(inF2): 46(ptr) FunctionParameter
52(inF2): 46(ptr) FunctionParameter
53(inI0): 48(ptr) FunctionParameter
53(inI0): 48(ptr) FunctionParameter
55: Label
55: Label
Return
Value 71
Return
FunctionEnd
FunctionEnd
Test/hlsl.attribute.expression.comp
View file @
cd6b2382
...
@@ -5,11 +5,9 @@ uniform int bound;
...
@@ -5,11 +5,9 @@ uniform int bound;
#define BAR 2
#define BAR 2
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
float4 main() : SV_TARGET
void main()
{
{
[unroll(5*2 + 1) ]
[unroll(5*2 + 1) ]
for (int x=0; x<bound; ++x)
for (int x=0; x<bound; ++x)
;
;
return float4(0,0,0,0);
}
}
Test/hlsl.intrinsics.barriers.comp
View file @
cd6b2382
float
ComputeShaderFunction()
void
ComputeShaderFunction()
{
{
AllMemoryBarrier();
AllMemoryBarrier();
AllMemoryBarrierWithGroupSync();
AllMemoryBarrierWithGroupSync();
...
@@ -7,7 +7,5 @@ float ComputeShaderFunction()
...
@@ -7,7 +7,5 @@ float ComputeShaderFunction()
DeviceMemoryBarrierWithGroupSync();
DeviceMemoryBarrierWithGroupSync();
GroupMemoryBarrier();
GroupMemoryBarrier();
GroupMemoryBarrierWithGroupSync();
GroupMemoryBarrierWithGroupSync();
return 0.0;
}
}
Test/hlsl.intrinsics.negative.comp
View file @
cd6b2382
float
ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
void
ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
{
{
uint out_u1;
uint out_u1;
...
@@ -49,20 +49,16 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
...
@@ -49,20 +49,16 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
// transpose(inF0); // expect error: only valid on mats
// transpose(inF0); // expect error: only valid on mats
// TODO: texture intrinsics, when we can declare samplers.
// TODO: texture intrinsics, when we can declare samplers.
return 0.0;
}
}
float1
ComputeShaderFunction1(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
void
ComputeShaderFunction1(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
{
{
// TODO: ... add when float1 prototypes are generated
// TODO: ... add when float1 prototypes are generated
// GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
// GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
return 0.0;
}
}
float2
ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
void
ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
{
{
uint2 out_u2;
uint2 out_u2;
...
@@ -105,11 +101,9 @@ float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
...
@@ -105,11 +101,9 @@ float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
// transpose(inF0); // expect error: only valid on mats
// transpose(inF0); // expect error: only valid on mats
// TODO: texture intrinsics, when we can declare samplers.
// TODO: texture intrinsics, when we can declare samplers.
return float2(1,2);
}
}
float3
ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
void
ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
{
{
uint3 out_u3;
uint3 out_u3;
...
@@ -150,11 +144,9 @@ float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
...
@@ -150,11 +144,9 @@ float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
// transpose(inF0); // expect error: only valid on mats
// transpose(inF0); // expect error: only valid on mats
// TODO: texture intrinsics, when we can declare samplers.
// TODO: texture intrinsics, when we can declare samplers.
return float3(1,2,3);
}
}
float4
ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
void
ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
{
{
uint4 out_u4;
uint4 out_u4;
...
@@ -195,7 +187,5 @@ float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
...
@@ -195,7 +187,5 @@ float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
// transpose(inF0); // expect error: only valid on mats
// transpose(inF0); // expect error: only valid on mats
// TODO: texture intrinsics, when we can declare samplers.
// TODO: texture intrinsics, when we can declare samplers.
return float4(1,2,3,4);
}
}
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