Commit cd6b2382 by Greg Fischer

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
......@@ -2,7 +2,7 @@ hlsl.attribute.expression.comp
Shader version: 500
local_size = (4, 6, 8)
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:? Sequence
0:11 Sequence
......@@ -22,21 +22,12 @@ local_size = (4, 6, 8)
0:11 Loop Terminal Expression
0:11 Pre-Increment ( 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 Parameters:
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:9 Function Call: @main( ( temp 4-component vector of float)
0:9 Function Call: @main( ( temp void)
0:? Linker Objects
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:
......@@ -45,7 +36,7 @@ Linked compute stage:
Shader version: 500
local_size = (4, 6, 8)
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:? Sequence
0:11 Sequence
......@@ -65,90 +56,70 @@ local_size = (4, 6, 8)
0:11 Loop Terminal Expression
0:11 Pre-Increment ( 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 Parameters:
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:9 Function Call: @main( ( temp 4-component vector of float)
0:9 Function Call: @main( ( temp void)
0:? Linker Objects
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
// Generated by (magic number): 8000a
// Id's are bound by 39
// Id's are bound by 30
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 37
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 4 6 8
Source HLSL 500
Name 4 "main"
Name 9 "@main("
Name 13 "x"
Name 21 "$Global"
MemberName 21($Global) 0 "bound"
Name 23 ""
Name 37 "@entryPointOutput"
MemberDecorate 21($Global) 0 Offset 0
Decorate 21($Global) Block
Decorate 23 DescriptorSet 0
Decorate 23 Binding 0
Decorate 37(@entryPointOutput) Location 0
Name 6 "@main("
Name 10 "x"
Name 18 "$Global"
MemberName 18($Global) 0 "bound"
Name 20 ""
MemberDecorate 18($Global) 0 Offset 0
Decorate 18($Global) Block
Decorate 20 DescriptorSet 0
Decorate 20 Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeFunction 7(fvec4)
11: TypeInt 32 1
12: TypePointer Function 11(int)
14: 11(int) Constant 0
21($Global): TypeStruct 11(int)
22: TypePointer Uniform 21($Global)
23: 22(ptr) Variable Uniform
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
8: TypeInt 32 1
9: TypePointer Function 8(int)
11: 8(int) Constant 0
18($Global): TypeStruct 8(int)
19: TypePointer Uniform 18($Global)
20: 19(ptr) Variable Uniform
21: TypePointer Uniform 8(int)
24: TypeBool
27: 8(int) Constant 1
4(main): 2 Function None 3
5: Label
38: 7(fvec4) FunctionCall 9(@main()
Store 37(@entryPointOutput) 38
29: 2 FunctionCall 6(@main()
Return
FunctionEnd
9(@main(): 7(fvec4) Function None 8
10: Label
13(x): 12(ptr) Variable Function
Store 13(x) 14
Branch 15
15: Label
LoopMerge 17 18 Unroll
Branch 19
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
Branch 18
18: Label
29: 11(int) Load 13(x)
31: 11(int) IAdd 29 30
Store 13(x) 31
6(@main(): 2 Function None 3
7: Label
10(x): 9(ptr) Variable Function
Store 10(x) 11
Branch 12
12: Label
LoopMerge 14 15 Unroll
Branch 16
16: Label
17: 8(int) Load 10(x)
22: 21(ptr) AccessChain 20 11
23: 8(int) Load 22
25: 24(bool) SLessThan 17 23
BranchConditional 25 13 14
13: Label
Branch 15
17: Label
ReturnValue 33
15: Label
26: 8(int) Load 10(x)
28: 8(int) IAdd 26 27
Store 10(x) 28
Branch 12
14: Label
Return
FunctionEnd
......@@ -2,7 +2,7 @@ hlsl.intrinsics.barriers.comp
Shader version: 500
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: @ComputeShaderFunction( ( temp float)
0:3 Function Definition: @ComputeShaderFunction( ( temp void)
0:3 Function Parameters:
0:? Sequence
0:4 MemoryBarrier ( temp void)
......@@ -11,17 +11,11 @@ local_size = (1, 1, 1)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:8 WorkgroupMemoryBarrier ( 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 Parameters:
0:? Sequence
0:3 move second child to first child ( temp float)
0:? '@entryPointOutput' (layout( location=0) out float)
0:3 Function Call: @ComputeShaderFunction( ( temp float)
0:3 Function Call: @ComputeShaderFunction( ( temp void)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out float)
Linked compute stage:
......@@ -30,7 +24,7 @@ Linked compute stage:
Shader version: 500
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: @ComputeShaderFunction( ( temp float)
0:3 Function Definition: @ComputeShaderFunction( ( temp void)
0:3 Function Parameters:
0:? Sequence
0:4 MemoryBarrier ( temp void)
......@@ -39,59 +33,44 @@ local_size = (1, 1, 1)
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
0:8 WorkgroupMemoryBarrier ( 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 Parameters:
0:? Sequence
0:3 move second child to first child ( temp float)
0:? '@entryPointOutput' (layout( location=0) out float)
0:3 Function Call: @ComputeShaderFunction( ( temp float)
0:3 Function Call: @ComputeShaderFunction( ( temp void)
0:? Linker Objects
0:? '@entryPointOutput' (layout( location=0) out float)
Validation failed
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 22
// Id's are bound by 15
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction" 20
EntryPoint GLCompute 4 "ComputeShaderFunction"
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "ComputeShaderFunction"
Name 8 "@ComputeShaderFunction("
Name 20 "@entryPointOutput"
Decorate 20(@entryPointOutput) Location 0
Name 6 "@ComputeShaderFunction("
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeFunction 6(float)
10: TypeInt 32 0
11: 10(int) Constant 1
12: 10(int) Constant 3400
13: 10(int) Constant 2
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
8: TypeInt 32 0
9: 8(int) Constant 1
10: 8(int) Constant 3400
11: 8(int) Constant 2
12: 8(int) Constant 2120
13: 8(int) Constant 264
4(ComputeShaderFunction): 2 Function None 3
5: Label
21: 6(float) FunctionCall 8(@ComputeShaderFunction()
Store 20(@entryPointOutput) 21
14: 2 FunctionCall 6(@ComputeShaderFunction()
Return
FunctionEnd
8(@ComputeShaderFunction(): 6(float) Function None 7
9: Label
MemoryBarrier 11 12
ControlBarrier 13 11 12
MemoryBarrier 11 14
ControlBarrier 13 11 14
MemoryBarrier 13 15
ControlBarrier 13 13 15
ReturnValue 16
6(@ComputeShaderFunction(): 2 Function None 3
7: Label
MemoryBarrier 9 10
ControlBarrier 11 9 10
MemoryBarrier 9 12
ControlBarrier 11 9 12
MemoryBarrier 11 13
ControlBarrier 11 11 13
Return
FunctionEnd
......@@ -5,11 +5,9 @@ uniform int bound;
#define BAR 2
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
float4 main() : SV_TARGET
void main()
{
[unroll(5*2 + 1) ]
for (int x=0; x<bound; ++x)
;
return float4(0,0,0,0);
}
float ComputeShaderFunction()
void ComputeShaderFunction()
{
AllMemoryBarrier();
AllMemoryBarrierWithGroupSync();
......@@ -7,7 +7,5 @@ float ComputeShaderFunction()
DeviceMemoryBarrierWithGroupSync();
GroupMemoryBarrier();
GroupMemoryBarrierWithGroupSync();
return 0.0;
}
float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
void ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
{
uint out_u1;
......@@ -49,20 +49,16 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
// transpose(inF0); // expect error: only valid on mats
// 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
// 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;
......@@ -105,11 +101,9 @@ float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
// transpose(inF0); // expect error: only valid on mats
// 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;
......@@ -150,11 +144,9 @@ float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
// transpose(inF0); // expect error: only valid on mats
// 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;
......@@ -195,7 +187,5 @@ float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
// transpose(inF0); // expect error: only valid on mats
// TODO: texture intrinsics, when we can declare samplers.
return float4(1,2,3,4);
}
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