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
f52b6381
Commit
f52b6381
authored
Apr 05, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1331: Emit SPV_GOOGLE_hlsl_functionality1 for counters.
It was missing when there were no semantics.
parent
7f0bcfd8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
1 deletion
+77
-1
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-1
hlsl.noSemantic.functionality1.comp.out
Test/baseResults/hlsl.noSemantic.functionality1.comp.out
+63
-0
hlsl.noSemantic.functionality1.comp
Test/hlsl.noSemantic.functionality1.comp
+8
-0
runtests
Test/runtests
+3
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
f52b6381
...
...
@@ -1279,8 +1279,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
id
=
getSymbolId
(
it
->
second
);
if
(
id
!=
spv
::
NoResult
)
{
spv
::
Id
counterId
=
getSymbolId
(
symbol
);
if
(
counterId
!=
spv
::
NoResult
)
if
(
counterId
!=
spv
::
NoResult
)
{
builder
.
addExtension
(
"SPV_GOOGLE_hlsl_functionality1"
);
builder
.
addDecorationId
(
id
,
spv
::
DecorationHlslCounterBufferGOOGLE
,
counterId
);
}
}
}
}
...
...
Test/baseResults/hlsl.noSemantic.functionality1.comp.out
0 → 100644
View file @
f52b6381
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
Test/hlsl.noSemantic.functionality1.comp
0 → 100644
View file @
f52b6381
AppendStructuredBuffer<float4> Buf : register(u0);
[numthreads(1, 1, 1)]
void main()
{
Buf.Append(1.0f.xxxx);
}
\ No newline at end of file
Test/runtests
View file @
f52b6381
...
...
@@ -207,6 +207,9 @@ diff -b $BASEDIR/hlsl.y-negate-3.vert.out $TARGETDIR/hlsl.y-negate-3.vert.out ||
$EXE
-H
-e
main
-D
-Od
-fhlsl_functionality1
hlsl.structbuffer.incdec.frag
>
\
$TARGETDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
diff
-b
$BASEDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
$TARGETDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
||
HASERROR
=
1
$EXE
-H
-e
main
-D
-Od
-fhlsl_functionality1
hlsl.noSemantic.functionality1.comp
>
\
$TARGETDIR
/hlsl.noSemantic.functionality1.comp.out
diff
-b
$BASEDIR
/hlsl.noSemantic.functionality1.comp.out
$TARGETDIR
/hlsl.noSemantic.functionality1.comp.out
||
HASERROR
=
1
#
# Final checking
...
...
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