Commit 5d45eade by John Kessenich

HLSL: Turn on tests for groupshared.

parent b50fd17a
...@@ -2,15 +2,14 @@ hlsl.basic.comp ...@@ -2,15 +2,14 @@ hlsl.basic.comp
Shader version: 450 Shader version: 450
local_size = (1, 1, 1) local_size = (1, 1, 1)
0:? Sequence 0:? Sequence
0:4 Function Definition: main( (temp void) 0:4 Function Definition: main(i1; (temp void)
0:4 Function Parameters: 0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:? Sequence 0:? Sequence
0:5 dti: direct index for structure (layout(offset=0 ) uniform int LocalInvocationID) 0:5 'dti' (in int LocalInvocationID)
0:5 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int LocalInvocationID dti})
0:5 Constant:
0:5 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int LocalInvocationID dti}) 0:? 'a' (shared 100-element array of 4-component vector of float)
0:? 'dti' (in int LocalInvocationID)
Linked compute stage: Linked compute stage:
...@@ -19,40 +18,40 @@ Linked compute stage: ...@@ -19,40 +18,40 @@ Linked compute stage:
Shader version: 450 Shader version: 450
local_size = (1, 1, 1) local_size = (1, 1, 1)
0:? Sequence 0:? Sequence
0:4 Function Definition: main( (temp void) 0:4 Function Definition: main(i1; (temp void)
0:4 Function Parameters: 0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:? Sequence 0:? Sequence
0:5 dti: direct index for structure (layout(offset=0 ) uniform int LocalInvocationID) 0:5 'dti' (in int LocalInvocationID)
0:5 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int LocalInvocationID dti})
0:5 Constant:
0:5 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int LocalInvocationID dti}) 0:? 'a' (shared 100-element array of 4-component vector of float)
0:? 'dti' (in int LocalInvocationID)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 11 // Id's are bound by 16
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" EntryPoint GLCompute 4 "main" 8
ExecutionMode 4 LocalSize 1 1 1 ExecutionMode 4 LocalSize 1 1 1
Name 4 "main" Name 4 "main"
Name 7 "$Global" Name 8 "dti"
MemberName 7($Global) 0 "dti" Name 15 "a"
Name 9 "" Decorate 8(dti) BuiltIn LocalInvocationId
MemberDecorate 7($Global) 0 Offset 0
MemberDecorate 7($Global) 0 BuiltIn LocalInvocationId
Decorate 7($Global) Block
Decorate 9 DescriptorSet 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
7($Global): TypeStruct 6(int) 7: TypePointer Input 6(int)
8: TypePointer Uniform 7($Global) 8(dti): 7(ptr) Variable Input
9: 8(ptr) Variable Uniform 9: TypeFloat 32
10: 6(int) Constant 0 10: TypeVector 9(float) 4
11: TypeInt 32 0
12: 11(int) Constant 100
13: TypeArray 10(fvec4) 12
14: TypePointer Workgroup 13
15(a): 14(ptr) Variable Workgroup
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
Return Return
......
...@@ -2782,18 +2782,18 @@ gl_FragCoord origin is upper left ...@@ -2782,18 +2782,18 @@ gl_FragCoord origin is upper left
0:492 0 (const int) 0:492 0 (const int)
0:492 Branch: Return 0:492 Branch: Return
0:? Linker Objects 0:? Linker Objects
0:? 'gs_ua' (global uint) 0:? 'gs_ua' (shared uint)
0:? 'gs_ub' (global uint) 0:? 'gs_ub' (shared uint)
0:? 'gs_uc' (global uint) 0:? 'gs_uc' (shared uint)
0:? 'gs_ua2' (global 2-component vector of uint) 0:? 'gs_ua2' (shared 2-component vector of uint)
0:? 'gs_ub2' (global 2-component vector of uint) 0:? 'gs_ub2' (shared 2-component vector of uint)
0:? 'gs_uc2' (global 2-component vector of uint) 0:? 'gs_uc2' (shared 2-component vector of uint)
0:? 'gs_ua3' (global 3-component vector of uint) 0:? 'gs_ua3' (shared 3-component vector of uint)
0:? 'gs_ub3' (global 3-component vector of uint) 0:? 'gs_ub3' (shared 3-component vector of uint)
0:? 'gs_uc3' (global 3-component vector of uint) 0:? 'gs_uc3' (shared 3-component vector of uint)
0:? 'gs_ua4' (global 4-component vector of uint) 0:? 'gs_ua4' (shared 4-component vector of uint)
0:? 'gs_ub4' (global 4-component vector of uint) 0:? 'gs_ub4' (shared 4-component vector of uint)
0:? 'gs_uc4' (global 4-component vector of uint) 0:? 'gs_uc4' (shared 4-component vector of uint)
0:? 'color' (layout(location=0 ) out 4-component vector of float) 0:? 'color' (layout(location=0 ) out 4-component vector of float)
...@@ -5583,18 +5583,18 @@ gl_FragCoord origin is upper left ...@@ -5583,18 +5583,18 @@ gl_FragCoord origin is upper left
0:492 0 (const int) 0:492 0 (const int)
0:492 Branch: Return 0:492 Branch: Return
0:? Linker Objects 0:? Linker Objects
0:? 'gs_ua' (global uint) 0:? 'gs_ua' (shared uint)
0:? 'gs_ub' (global uint) 0:? 'gs_ub' (shared uint)
0:? 'gs_uc' (global uint) 0:? 'gs_uc' (shared uint)
0:? 'gs_ua2' (global 2-component vector of uint) 0:? 'gs_ua2' (shared 2-component vector of uint)
0:? 'gs_ub2' (global 2-component vector of uint) 0:? 'gs_ub2' (shared 2-component vector of uint)
0:? 'gs_uc2' (global 2-component vector of uint) 0:? 'gs_uc2' (shared 2-component vector of uint)
0:? 'gs_ua3' (global 3-component vector of uint) 0:? 'gs_ua3' (shared 3-component vector of uint)
0:? 'gs_ub3' (global 3-component vector of uint) 0:? 'gs_ub3' (shared 3-component vector of uint)
0:? 'gs_uc3' (global 3-component vector of uint) 0:? 'gs_uc3' (shared 3-component vector of uint)
0:? 'gs_ua4' (global 4-component vector of uint) 0:? 'gs_ua4' (shared 4-component vector of uint)
0:? 'gs_ub4' (global 4-component vector of uint) 0:? 'gs_ub4' (shared 4-component vector of uint)
0:? 'gs_uc4' (global 4-component vector of uint) 0:? 'gs_uc4' (shared 4-component vector of uint)
0:? 'color' (layout(location=0 ) out 4-component vector of float) 0:? 'color' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000 // Module Version 10000
...@@ -6250,22 +6250,22 @@ gl_FragCoord origin is upper left ...@@ -6250,22 +6250,22 @@ gl_FragCoord origin is upper left
1802: 48(fvec4) ConstantComposite 284 284 284 284 1802: 48(fvec4) ConstantComposite 284 284 284 284
1804: TypePointer Output 48(fvec4) 1804: TypePointer Output 48(fvec4)
1805(color): 1804(ptr) Variable Output 1805(color): 1804(ptr) Variable Output
1809: TypePointer Private 8(int) 1809: TypePointer Workgroup 8(int)
1810(gs_ua): 1809(ptr) Variable Private 1810(gs_ua): 1809(ptr) Variable Workgroup
1811(gs_ub): 1809(ptr) Variable Private 1811(gs_ub): 1809(ptr) Variable Workgroup
1812(gs_uc): 1809(ptr) Variable Private 1812(gs_uc): 1809(ptr) Variable Workgroup
1813: TypePointer Private 26(ivec2) 1813: TypePointer Workgroup 26(ivec2)
1814(gs_ua2): 1813(ptr) Variable Private 1814(gs_ua2): 1813(ptr) Variable Workgroup
1815(gs_ub2): 1813(ptr) Variable Private 1815(gs_ub2): 1813(ptr) Variable Workgroup
1816(gs_uc2): 1813(ptr) Variable Private 1816(gs_uc2): 1813(ptr) Variable Workgroup
1817: TypePointer Private 38(ivec3) 1817: TypePointer Workgroup 38(ivec3)
1818(gs_ua3): 1817(ptr) Variable Private 1818(gs_ua3): 1817(ptr) Variable Workgroup
1819(gs_ub3): 1817(ptr) Variable Private 1819(gs_ub3): 1817(ptr) Variable Workgroup
1820(gs_uc3): 1817(ptr) Variable Private 1820(gs_uc3): 1817(ptr) Variable Workgroup
1821: TypePointer Private 50(ivec4) 1821: TypePointer Workgroup 50(ivec4)
1822(gs_ua4): 1821(ptr) Variable Private 1822(gs_ua4): 1821(ptr) Variable Workgroup
1823(gs_ub4): 1821(ptr) Variable Private 1823(gs_ub4): 1821(ptr) Variable Workgroup
1824(gs_uc4): 1821(ptr) Variable Private 1824(gs_uc4): 1821(ptr) Variable Workgroup
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
1800(ps_output): 1799(ptr) Variable Function 1800(ps_output): 1799(ptr) Variable Function
......
int dti : SV_DispatchThreadID; groupshared float4 a[100];
void main() void main(int dti : SV_DispatchThreadID)
{ {
dti; dti;
} }
#define gs static // TODO: define as groupshared when available in the grammar
gs uint gs_ua; groupshared uint gs_ua;
gs uint gs_ub; groupshared uint gs_ub;
gs uint gs_uc; groupshared uint gs_uc;
gs uint2 gs_ua2; groupshared uint2 gs_ua2;
gs uint2 gs_ub2; groupshared uint2 gs_ub2;
gs uint2 gs_uc2; groupshared uint2 gs_uc2;
gs uint3 gs_ua3; groupshared uint3 gs_ua3;
gs uint3 gs_ub3; groupshared uint3 gs_ub3;
gs uint3 gs_uc3; groupshared uint3 gs_uc3;
gs uint4 gs_ua4; groupshared uint4 gs_ua4;
gs uint4 gs_ub4; groupshared uint4 gs_ub4;
gs uint4 gs_uc4; groupshared uint4 gs_uc4;
float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1) float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1)
{ {
......
#define gs static // TODO: define as groupshared when available in the grammar
gs uint gs_ua; groupshared uint gs_ua;
gs uint gs_ub; groupshared uint gs_ub;
gs uint gs_uc; groupshared uint gs_uc;
gs uint2 gs_ua2; groupshared uint2 gs_ua2;
gs uint2 gs_ub2; groupshared uint2 gs_ub2;
gs uint2 gs_uc2; groupshared uint2 gs_uc2;
gs uint3 gs_ua3; groupshared uint3 gs_ua3;
gs uint3 gs_ub3; groupshared uint3 gs_ub3;
gs uint3 gs_uc3; groupshared uint3 gs_uc3;
gs uint4 gs_ua4; groupshared uint4 gs_ua4;
gs uint4 gs_ub4; groupshared uint4 gs_ub4;
gs uint4 gs_uc4; groupshared uint4 gs_uc4;
float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1) float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1)
{ {
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1602" #define GLSLANG_REVISION "Overload400-PrecQual.1603"
#define GLSLANG_DATE "16-Oct-2016" #define GLSLANG_DATE "16-Oct-2016"
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