forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix KhronosGroup#1331: Emit SPV_GOOGLE_hlsl_functionality1 for counters.
It was missing when there were no semantics.
- Loading branch information
1 parent
7f0bcfd
commit f52b638
Showing
4 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
hlsl.noSemantic.functionality1.comp | ||
// Module Version 10000 | ||
// Generated by (magic number): 80006 | ||
// Id's are bound by 31 | ||
|
||
Capability Shader | ||
Extension "SPV_GOOGLE_hlsl_functionality1" | ||
1: ExtInstImport "GLSL.std.450" | ||
MemoryModel Logical GLSL450 | ||
EntryPoint GLCompute 4 "main" | ||
ExecutionMode 4 LocalSize 1 1 1 | ||
Source HLSL 500 | ||
Name 4 "main" | ||
Name 6 "@main(" | ||
Name 11 "Buf" | ||
MemberName 11(Buf) 0 "@data" | ||
Name 13 "Buf" | ||
Name 16 "Buf@count" | ||
MemberName 16(Buf@count) 0 "@count" | ||
Name 18 "Buf@count" | ||
Decorate 10 ArrayStride 16 | ||
MemberDecorate 11(Buf) 0 Offset 0 | ||
Decorate 11(Buf) BufferBlock | ||
Decorate 13(Buf) DescriptorSet 0 | ||
Decorate 13(Buf) Binding 0 | ||
MemberDecorate 16(Buf@count) 0 Offset 0 | ||
Decorate 16(Buf@count) BufferBlock | ||
Decorate 18(Buf@count) DescriptorSet 0 | ||
DecorateId 13(Buf) DecorationHlslCounterBufferGOOGLE 18(Buf@count) | ||
2: TypeVoid | ||
3: TypeFunction 2 | ||
8: TypeFloat 32 | ||
9: TypeVector 8(float) 4 | ||
10: TypeRuntimeArray 9(fvec4) | ||
11(Buf): TypeStruct 10 | ||
12: TypePointer Uniform 11(Buf) | ||
13(Buf): 12(ptr) Variable Uniform | ||
14: TypeInt 32 1 | ||
15: 14(int) Constant 0 | ||
16(Buf@count): TypeStruct 14(int) | ||
17: TypePointer Uniform 16(Buf@count) | ||
18(Buf@count): 17(ptr) Variable Uniform | ||
19: TypePointer Uniform 14(int) | ||
21: 14(int) Constant 1 | ||
22: TypeInt 32 0 | ||
23: 22(int) Constant 1 | ||
24: 22(int) Constant 0 | ||
26: 8(float) Constant 1065353216 | ||
27: 9(fvec4) ConstantComposite 26 26 26 26 | ||
28: TypePointer Uniform 9(fvec4) | ||
4(main): 2 Function None 3 | ||
5: Label | ||
30: 2 FunctionCall 6(@main() | ||
Return | ||
FunctionEnd | ||
6(@main(): 2 Function None 3 | ||
7: Label | ||
20: 19(ptr) AccessChain 18(Buf@count) 15 | ||
25: 22(int) AtomicIAdd 20 23 24 21 | ||
29: 28(ptr) AccessChain 13(Buf) 15 25 | ||
Store 29 27 | ||
Return | ||
FunctionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AppendStructuredBuffer<float4> Buf : register(u0); | ||
|
||
[numthreads(1, 1, 1)] | ||
void main() | ||
{ | ||
Buf.Append(1.0f.xxxx); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters