Merge pull request #572 from steve-lunarg/numthreads
HLSL: implement numthreads for compute shaders
This commit is contained in:
60
Test/baseResults/hlsl.numthreads.comp.out
Normal file
60
Test/baseResults/hlsl.numthreads.comp.out
Normal file
@@ -0,0 +1,60 @@
|
||||
hlsl.numthreads.comp
|
||||
Shader version: 450
|
||||
local_size = (4, 4, 2)
|
||||
0:? Sequence
|
||||
0:4 Function Definition: main(vu3; (temp void)
|
||||
0:4 Function Parameters:
|
||||
0:4 'tid' (in 3-component vector of uint)
|
||||
0:9 Function Definition: main_aux1(vu3; (temp void)
|
||||
0:9 Function Parameters:
|
||||
0:9 'tid' (in 3-component vector of uint LocalInvocationID)
|
||||
0:? Linker Objects
|
||||
0:? 'tid' (in 3-component vector of uint LocalInvocationID)
|
||||
|
||||
|
||||
Linked compute stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
local_size = (4, 4, 2)
|
||||
0:? Sequence
|
||||
0:4 Function Definition: main(vu3; (temp void)
|
||||
0:4 Function Parameters:
|
||||
0:4 'tid' (in 3-component vector of uint)
|
||||
0:9 Function Definition: main_aux1(vu3; (temp void)
|
||||
0:9 Function Parameters:
|
||||
0:9 'tid' (in 3-component vector of uint LocalInvocationID)
|
||||
0:? Linker Objects
|
||||
0:? 'tid' (in 3-component vector of uint LocalInvocationID)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 15
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main_aux1" 14
|
||||
ExecutionMode 4 LocalSize 4 4 2
|
||||
Name 4 "main_aux1"
|
||||
Name 11 "main(vu3;"
|
||||
Name 10 "tid"
|
||||
Name 14 "tid"
|
||||
Decorate 14(tid) BuiltIn LocalInvocationId
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
9: TypeFunction 2 8(ptr)
|
||||
13: TypePointer Input 7(ivec3)
|
||||
14(tid): 13(ptr) Variable Input
|
||||
4(main_aux1): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
11(main(vu3;): 2 Function None 9
|
||||
10(tid): 8(ptr) FunctionParameter
|
||||
12: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
14
Test/hlsl.numthreads.comp
Normal file
14
Test/hlsl.numthreads.comp
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
[numthreads(8,8,1)]
|
||||
void main(uint3 tid : SV_DispatchThreadID )
|
||||
{
|
||||
}
|
||||
|
||||
[numTHreaDs(4,4,2)] // case insensitive
|
||||
void main_aux1(uint3 tid : SV_DispatchThreadID )
|
||||
{
|
||||
}
|
||||
|
||||
[numthreads(1,4,8)]
|
||||
void main_aux2(uint3 tid : SV_DispatchThreadID );
|
||||
|
||||
Reference in New Issue
Block a user