Merge pull request #1034 from KhronosGroup/module-processes

SPV reflection: Add OpModuleProcessed for compile options.
This commit is contained in:
John Kessenich
2017-08-25 13:05:54 -06:00
committed by GitHub
11 changed files with 336 additions and 40 deletions

View File

@@ -7,9 +7,19 @@ spv.debugInfo.frag
2: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 5 "main" 24 52
ExecutionMode 5 OriginUpperLeft
ExecutionMode 5 OriginLowerLeft
1: String "spv.debugInfo.frag"
Source GLSL 450 1 "#version 450
Source GLSL 450 1 "// OpModuleProcessed no-storage-format
// OpModuleProcessed resource-set-binding 3
// OpModuleProcessed auto-map-locations
// OpModuleProcessed client opengl100
// OpModuleProcessed target-env opengl
// OpModuleProcessed relaxed-errors
// OpModuleProcessed suppress-warnings
// OpModuleProcessed hlsl-offsets
// OpModuleProcessed entry-point main
#line 1
#version 450
struct S {
int a;
@@ -84,8 +94,8 @@ void main()
MemberDecorate 53(S) 0 Offset 0
MemberDecorate 54(ubuf) 0 Offset 0
Decorate 54(ubuf) Block
Decorate 56 DescriptorSet 0
Decorate 69(s2d) DescriptorSet 0
Decorate 56 DescriptorSet 3
Decorate 69(s2d) DescriptorSet 3
3: TypeVoid
4: TypeFunction 3
7: TypeInt 32 1

View File

@@ -0,0 +1,58 @@
spv.hlslDebugInfo.vert
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 19
Capability Shader
2: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 5 "newMain" 17
1: String "spv.hlslDebugInfo.vert"
Source HLSL 500 1 "// OpModuleProcessed entry-point newMain
// OpModuleProcessed shift-sampler-binding 2
// OpModuleProcessed shift-texture-binding 4
// OpModuleProcessed shift-image-binding 1
// OpModuleProcessed shift-UBO-binding 6
// OpModuleProcessed shift-ssbo-binding 3
// OpModuleProcessed shift-uav-binding 5
// OpModuleProcessed flatten-uniform-arrays
// OpModuleProcessed no-storage-format
// OpModuleProcessed resource-set-binding t0 0 0
// OpModuleProcessed hlsl-iomap
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed auto-map-locations
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed source-entrypoint origMain
// OpModuleProcessed hlsl-offsets
#line 1
float4 origMain() : SV_Position
{
return (float4)0;
}
"
Name 5 "newMain"
Name 10 "@newMain("
Name 17 "@entryPointOutput"
Decorate 17(@entryPointOutput) BuiltIn Position
3: TypeVoid
4: TypeFunction 3
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeFunction 8(fvec4)
12: 7(float) Constant 0
13: 8(fvec4) ConstantComposite 12 12 12 12
16: TypePointer Output 8(fvec4)
17(@entryPointOutput): 16(ptr) Variable Output
5(newMain): 3 Function None 4
6: Label
Line 1 2 0
18: 8(fvec4) FunctionCall 10(@newMain()
Store 17(@entryPointOutput) 18
Return
FunctionEnd
10(@newMain(): 8(fvec4) Function None 9
11: Label
Line 1 3 0
ReturnValue 13
FunctionEnd

View File

@@ -116,8 +116,12 @@ diff -b $BASEDIR/spv.noBuiltInLoc.vert.out $TARGETDIR/spv.noBuiltInLoc.vert.out
# Testing debug information
#
echo Testing SPV Debug Information
$EXE -g -H spv.debugInfo.frag > $TARGETDIR/spv.debugInfo.frag.out
$EXE -g --relaxed-errors --suppress-warnings --aml --hlsl-offsets --nsf \
-G -H spv.debugInfo.frag --rsb frag 3 > $TARGETDIR/spv.debugInfo.frag.out
diff -b $BASEDIR/spv.debugInfo.frag.out $TARGETDIR/spv.debugInfo.frag.out || HASERROR=1
$EXE -g -D -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \
--sep origMain -H spv.hlslDebugInfo.vert --rsb vert t0 0 0 > $TARGETDIR/spv.hlslDebugInfo.frag.out
diff -b $BASEDIR/spv.hlslDebugInfo.frag.out $TARGETDIR/spv.hlslDebugInfo.frag.out || HASERROR=1
#
# Testing Includer

View File

@@ -0,0 +1,4 @@
float4 origMain() : SV_Position
{
return (float4)0;
}