SPV: Fix #807: use --hlsl-offsets to allow hlsl-style offsets in a buffer.
Corresponds to the EShMsgHlslOffsets flag in messages. Works for both GLSL and HLSL.
This commit is contained in:
84
Test/baseResults/hlsl.hlslOffset.vert.out
Normal file
84
Test/baseResults/hlsl.hlslOffset.vert.out
Normal file
@@ -0,0 +1,84 @@
|
||||
hlsl.hlslOffset.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:20 Function Definition: @main( ( temp void)
|
||||
0:20 Function Parameters:
|
||||
0:20 Function Definition: main( ( temp void)
|
||||
0:20 Function Parameters:
|
||||
0:? Sequence
|
||||
0:20 Function Call: @main( ( temp void)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float m0, layout( row_major std140) uniform 3-component vector of float m4, layout( row_major std140) uniform float m16, layout( row_major std140 offset=20) uniform 3-component vector of float m20, layout( row_major std140 offset=36) uniform 3-component vector of float m36, layout( row_major std140 offset=56) uniform 2-component vector of float m56, layout( row_major std140) uniform float m64, layout( row_major std140) uniform 2-component vector of float m68, layout( row_major std140) uniform float m76, layout( row_major std140) uniform float m80, layout( row_major std140) uniform 1-element array of 2-component vector of float m96})
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:20 Function Definition: @main( ( temp void)
|
||||
0:20 Function Parameters:
|
||||
0:20 Function Definition: main( ( temp void)
|
||||
0:20 Function Parameters:
|
||||
0:? Sequence
|
||||
0:20 Function Call: @main( ( temp void)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float m0, layout( row_major std140) uniform 3-component vector of float m4, layout( row_major std140) uniform float m16, layout( row_major std140 offset=20) uniform 3-component vector of float m20, layout( row_major std140 offset=36) uniform 3-component vector of float m36, layout( row_major std140 offset=56) uniform 2-component vector of float m56, layout( row_major std140) uniform float m64, layout( row_major std140) uniform 2-component vector of float m68, layout( row_major std140) uniform float m76, layout( row_major std140) uniform float m80, layout( row_major std140) uniform 1-element array of 2-component vector of float m96})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 18
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main"
|
||||
Name 4 "main"
|
||||
Name 6 "@main("
|
||||
Name 15 "b"
|
||||
MemberName 15(b) 0 "m0"
|
||||
MemberName 15(b) 1 "m4"
|
||||
MemberName 15(b) 2 "m16"
|
||||
MemberName 15(b) 3 "m20"
|
||||
MemberName 15(b) 4 "m36"
|
||||
MemberName 15(b) 5 "m56"
|
||||
MemberName 15(b) 6 "m64"
|
||||
MemberName 15(b) 7 "m68"
|
||||
MemberName 15(b) 8 "m76"
|
||||
MemberName 15(b) 9 "m80"
|
||||
MemberName 15(b) 10 "m96"
|
||||
Name 17 ""
|
||||
Decorate 14 ArrayStride 16
|
||||
MemberDecorate 15(b) 0 Offset 0
|
||||
MemberDecorate 15(b) 1 Offset 4
|
||||
MemberDecorate 15(b) 2 Offset 16
|
||||
MemberDecorate 15(b) 3 Offset 20
|
||||
MemberDecorate 15(b) 4 Offset 36
|
||||
MemberDecorate 15(b) 5 Offset 56
|
||||
MemberDecorate 15(b) 6 Offset 64
|
||||
MemberDecorate 15(b) 7 Offset 68
|
||||
MemberDecorate 15(b) 8 Offset 76
|
||||
MemberDecorate 15(b) 9 Offset 80
|
||||
MemberDecorate 15(b) 10 Offset 96
|
||||
Decorate 15(b) Block
|
||||
Decorate 17 DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
9: TypeFloat 32
|
||||
10: TypeVector 9(float) 3
|
||||
11: TypeVector 9(float) 2
|
||||
12: TypeInt 32 0
|
||||
13: 12(int) Constant 1
|
||||
14: TypeArray 11(fvec2) 13
|
||||
15(b): TypeStruct 9(float) 10(fvec3) 9(float) 10(fvec3) 10(fvec3) 11(fvec2) 9(float) 11(fvec2) 9(float) 9(float) 14
|
||||
16: TypePointer Uniform 15(b)
|
||||
17: 16(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8: 2 FunctionCall 6(@main()
|
||||
Return
|
||||
FunctionEnd
|
||||
6(@main(): 2 Function None 3
|
||||
7: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
78
Test/baseResults/spv.hlslOffsets.vert.out
Normal file
78
Test/baseResults/spv.hlslOffsets.vert.out
Normal file
@@ -0,0 +1,78 @@
|
||||
spv.hlslOffsets.vert
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:27 Function Definition: main( ( global void)
|
||||
0:27 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float m0, layout( column_major std430) buffer highp 3-component vector of float m4, layout( column_major std430) buffer highp float m16, layout( column_major std430 offset=20) buffer highp 3-component vector of float m20, layout( column_major std430) buffer highp 3-component vector of float m32, layout( column_major std430) buffer highp 2-component vector of float m48, layout( column_major std430) buffer highp 2-component vector of float m56, layout( column_major std430) buffer highp float m64, layout( column_major std430) buffer highp 2-component vector of float m68, layout( column_major std430) buffer highp float m76, layout( column_major std430) buffer highp float m80, layout( column_major std430 offset=88) buffer highp 2-component vector of float m88, layout( column_major std430) buffer highp 2-component vector of float m96, layout( column_major std430) buffer 2-component vector of double m112})
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:27 Function Definition: main( ( global void)
|
||||
0:27 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float m0, layout( column_major std430) buffer highp 3-component vector of float m4, layout( column_major std430) buffer highp float m16, layout( column_major std430 offset=20) buffer highp 3-component vector of float m20, layout( column_major std430) buffer highp 3-component vector of float m32, layout( column_major std430) buffer highp 2-component vector of float m48, layout( column_major std430) buffer highp 2-component vector of float m56, layout( column_major std430) buffer highp float m64, layout( column_major std430) buffer highp 2-component vector of float m68, layout( column_major std430) buffer highp float m76, layout( column_major std430) buffer highp float m80, layout( column_major std430 offset=88) buffer highp 2-component vector of float m88, layout( column_major std430) buffer highp 2-component vector of float m96, layout( column_major std430) buffer 2-component vector of double m112})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 14
|
||||
|
||||
Capability Shader
|
||||
Capability Float64
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main"
|
||||
Source GLSL 450
|
||||
Name 4 "main"
|
||||
Name 11 "block"
|
||||
MemberName 11(block) 0 "m0"
|
||||
MemberName 11(block) 1 "m4"
|
||||
MemberName 11(block) 2 "m16"
|
||||
MemberName 11(block) 3 "m20"
|
||||
MemberName 11(block) 4 "m32"
|
||||
MemberName 11(block) 5 "m48"
|
||||
MemberName 11(block) 6 "m56"
|
||||
MemberName 11(block) 7 "m64"
|
||||
MemberName 11(block) 8 "m68"
|
||||
MemberName 11(block) 9 "m76"
|
||||
MemberName 11(block) 10 "m80"
|
||||
MemberName 11(block) 11 "m88"
|
||||
MemberName 11(block) 12 "m96"
|
||||
MemberName 11(block) 13 "m112"
|
||||
Name 13 ""
|
||||
MemberDecorate 11(block) 0 Offset 0
|
||||
MemberDecorate 11(block) 1 Offset 4
|
||||
MemberDecorate 11(block) 2 Offset 16
|
||||
MemberDecorate 11(block) 3 Offset 20
|
||||
MemberDecorate 11(block) 4 Offset 32
|
||||
MemberDecorate 11(block) 5 Offset 48
|
||||
MemberDecorate 11(block) 6 Offset 56
|
||||
MemberDecorate 11(block) 7 Offset 64
|
||||
MemberDecorate 11(block) 8 Offset 68
|
||||
MemberDecorate 11(block) 9 Offset 76
|
||||
MemberDecorate 11(block) 10 Offset 80
|
||||
MemberDecorate 11(block) 11 Offset 88
|
||||
MemberDecorate 11(block) 12 Offset 96
|
||||
MemberDecorate 11(block) 13 Offset 112
|
||||
Decorate 11(block) BufferBlock
|
||||
Decorate 13 DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9: TypeFloat 64
|
||||
10: TypeVector 9(float) 2
|
||||
11(block): TypeStruct 6(float) 7(fvec3) 6(float) 7(fvec3) 7(fvec3) 8(fvec2) 8(fvec2) 6(float) 8(fvec2) 6(float) 6(float) 8(fvec2) 8(fvec2) 10(fvec2)
|
||||
12: TypePointer Uniform 11(block)
|
||||
13: 12(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user