Add support for spirv1.6
Add command line support which enables the following behavior: - Remap discard Map discard to DemoteToHelperInvocation for HLSL shaders. Map to OpTerminateInvocation for GLSL shaders. - Decorate HelperInvocation with Volatile - Use localSizeId for execution mode WorkGroupSize is deprecated in spirv1.6 Also update known goods to SPIRV 1.6
This commit is contained in:
parent
a0f98ad401
commit
7a49192d23
19 changed files with 556 additions and 218 deletions
41
Test/baseResults/spv.1.6.helperInvocation.frag.out
Normal file
41
Test/baseResults/spv.1.6.helperInvocation.frag.out
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
spv.1.6.helperInvocation.frag
|
||||
// Module Version 10600
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 20
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 15
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source ESSL 310
|
||||
Name 4 "main"
|
||||
Name 8 "gl_HelperInvocation"
|
||||
Name 15 "outp"
|
||||
Decorate 8(gl_HelperInvocation) BuiltIn HelperInvocation
|
||||
Decorate 8(gl_HelperInvocation) Volatile
|
||||
Decorate 15(outp) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeBool
|
||||
7: TypePointer Input 6(bool)
|
||||
8(gl_HelperInvocation): 7(ptr) Variable Input
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 4
|
||||
14: TypePointer Output 13(fvec4)
|
||||
15(outp): 14(ptr) Variable Output
|
||||
17: 12(float) Constant 1065353216
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9: 6(bool) Load 8(gl_HelperInvocation)
|
||||
SelectionMerge 11 None
|
||||
BranchConditional 9 10 11
|
||||
10: Label
|
||||
16: 13(fvec4) Load 15(outp)
|
||||
18: 13(fvec4) CompositeConstruct 17 17 17 17
|
||||
19: 13(fvec4) FAdd 16 18
|
||||
Store 15(outp) 19
|
||||
Branch 11
|
||||
11: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue