HLSL: Reverse what the driver is told about row/column majorness, matching the row-column reversal.

This commit is contained in:
John Kessenich
2016-09-25 20:25:06 -06:00
parent 88712f1a21
commit 10f7fc739c
7 changed files with 145 additions and 124 deletions

View File

@@ -2,40 +2,40 @@ hlsl.buffer.frag
Shader version: 450 Shader version: 450
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
0:? Sequence 0:? Sequence
0:26 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) 0:30 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
0:26 Function Parameters: 0:30 Function Parameters:
0:26 'input' (layout(location=0 ) in 4-component vector of float) 0:30 'input' (layout(location=0 ) in 4-component vector of float)
0:? Sequence 0:? Sequence
0:27 Sequence 0:31 Sequence
0:27 move second child to first child (temp 4-component vector of float) 0:31 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 'input' (layout(location=0 ) in 4-component vector of float) 0:31 'input' (layout(location=0 ) in 4-component vector of float)
0:27 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float) 0:31 v1: direct index for structure (layout(row_major std140 ) uniform 4-component vector of float)
0:27 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1}) 0:31 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float) 0:31 v2: direct index for structure (layout(row_major std430 ) buffer 4-component vector of float)
0:27 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2}) 0:31 'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float) 0:31 v3: direct index for structure (layout(row_major std140 ) uniform 4-component vector of float)
0:27 'anon@2' (layout(set=10 binding=2 column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3}) 0:31 'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v4: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:31 v4: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:27 'anon@3' (layout(binding=8 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7}) 0:31 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 Branch: Return 0:31 Branch: Return
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
0:? 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2}) 0:? 'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
0:? 'anon@2' (layout(set=10 binding=2 column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3}) 0:? 'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
0:? 'anon@3' (layout(binding=8 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7}) 0:? 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float) 0:? 'input' (layout(location=0 ) in 4-component vector of float)
@@ -46,46 +46,46 @@ Linked fragment stage:
Shader version: 450 Shader version: 450
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
0:? Sequence 0:? Sequence
0:26 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) 0:30 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
0:26 Function Parameters: 0:30 Function Parameters:
0:26 'input' (layout(location=0 ) in 4-component vector of float) 0:30 'input' (layout(location=0 ) in 4-component vector of float)
0:? Sequence 0:? Sequence
0:27 Sequence 0:31 Sequence
0:27 move second child to first child (temp 4-component vector of float) 0:31 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 add (temp 4-component vector of float) 0:31 add (temp 4-component vector of float)
0:27 'input' (layout(location=0 ) in 4-component vector of float) 0:31 'input' (layout(location=0 ) in 4-component vector of float)
0:27 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float) 0:31 v1: direct index for structure (layout(row_major std140 ) uniform 4-component vector of float)
0:27 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1}) 0:31 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float) 0:31 v2: direct index for structure (layout(row_major std430 ) buffer 4-component vector of float)
0:27 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2}) 0:31 'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float) 0:31 v3: direct index for structure (layout(row_major std140 ) uniform 4-component vector of float)
0:27 'anon@2' (layout(set=10 binding=2 column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3}) 0:31 'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 v4: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:31 v4: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:27 'anon@3' (layout(binding=8 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7}) 0:31 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
0:27 Constant: 0:31 Constant:
0:27 0 (const uint) 0:31 0 (const uint)
0:27 Branch: Return 0:31 Branch: Return
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
0:? 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2}) 0:? 'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
0:? 'anon@2' (layout(set=10 binding=2 column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3}) 0:? 'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
0:? 'anon@3' (layout(binding=8 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7}) 0:? 'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float) 0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float) 0:? 'input' (layout(location=0 ) in 4-component vector of float)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 41 // Id's are bound by 42
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
@@ -105,16 +105,20 @@ gl_FragCoord origin is upper left
MemberName 28 0 "v3" MemberName 28 0 "v3"
MemberName 28 1 "i3" MemberName 28 1 "i3"
Name 30 "" Name 30 ""
Name 34 "" Name 35 ""
MemberName 34 0 "v4" MemberName 35 0 "v4"
MemberName 34 1 "i4" MemberName 35 1 "i4"
MemberName 34 2 "f1" MemberName 35 2 "f1"
MemberName 34 3 "f3" MemberName 35 3 "f3"
MemberName 34 4 "f4" MemberName 35 4 "f4"
MemberName 34 5 "f5" MemberName 35 5 "f5"
MemberName 34 6 "f6" MemberName 35 6 "f6"
MemberName 34 7 "f7" MemberName 35 7 "f7"
Name 36 "" MemberName 35 8 "m1"
MemberName 35 9 "m2"
MemberName 35 10 "m3"
MemberName 35 11 "m4"
Name 37 ""
Decorate 9(@entryPointOutput) Location 0 Decorate 9(@entryPointOutput) Location 0
Decorate 11(input) Location 0 Decorate 11(input) Location 0
MemberDecorate 13 0 Offset 0 MemberDecorate 13 0 Offset 0
@@ -128,17 +132,29 @@ gl_FragCoord origin is upper left
Decorate 28 Block Decorate 28 Block
Decorate 30 DescriptorSet 10 Decorate 30 DescriptorSet 10
Decorate 30 Binding 2 Decorate 30 Binding 2
MemberDecorate 34 0 Offset 16 MemberDecorate 35 0 Offset 16
MemberDecorate 34 1 Offset 48 MemberDecorate 35 1 Offset 48
MemberDecorate 34 2 Offset 60 MemberDecorate 35 2 Offset 60
MemberDecorate 34 3 Offset 64 MemberDecorate 35 3 Offset 64
MemberDecorate 34 4 Offset 68 MemberDecorate 35 4 Offset 68
MemberDecorate 34 5 Offset 72 MemberDecorate 35 5 Offset 72
MemberDecorate 34 6 Offset 76 MemberDecorate 35 6 Offset 76
MemberDecorate 34 7 Offset 80 MemberDecorate 35 7 Offset 80
Decorate 34 BufferBlock MemberDecorate 35 8 RowMajor
Decorate 36 DescriptorSet 0 MemberDecorate 35 8 Offset 96
Decorate 36 Binding 8 MemberDecorate 35 8 MatrixStride 16
MemberDecorate 35 9 ColMajor
MemberDecorate 35 9 Offset 160
MemberDecorate 35 9 MatrixStride 16
MemberDecorate 35 10 RowMajor
MemberDecorate 35 10 Offset 208
MemberDecorate 35 10 MatrixStride 16
MemberDecorate 35 11 RowMajor
MemberDecorate 35 11 Offset 272
MemberDecorate 35 11 MatrixStride 16
Decorate 35 BufferBlock
Decorate 37 DescriptorSet 0
Decorate 37 Binding 8
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@@ -159,9 +175,10 @@ gl_FragCoord origin is upper left
28: TypeStruct 7(fvec4) 16(int) 28: TypeStruct 7(fvec4) 16(int)
29: TypePointer Uniform 28(struct) 29: TypePointer Uniform 28(struct)
30: 29(ptr) Variable Uniform 30: 29(ptr) Variable Uniform
34: TypeStruct 7(fvec4) 16(int) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 34: TypeMatrix 7(fvec4) 3
35: TypePointer Uniform 34(struct) 35: TypeStruct 7(fvec4) 16(int) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 34 34 34 34
36: 35(ptr) Variable Uniform 36: TypePointer Uniform 35(struct)
37: 36(ptr) Variable Uniform
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
12: 7(fvec4) Load 11(input) 12: 7(fvec4) Load 11(input)
@@ -174,9 +191,9 @@ gl_FragCoord origin is upper left
31: 18(ptr) AccessChain 30 17 31: 18(ptr) AccessChain 30 17
32: 7(fvec4) Load 31 32: 7(fvec4) Load 31
33: 7(fvec4) FAdd 27 32 33: 7(fvec4) FAdd 27 32
37: 18(ptr) AccessChain 36 17 38: 18(ptr) AccessChain 37 17
38: 7(fvec4) Load 37 39: 7(fvec4) Load 38
39: 7(fvec4) FAdd 33 38 40: 7(fvec4) FAdd 33 39
Store 9(@entryPointOutput) 39 Store 9(@entryPointOutput) 40
Return Return
FunctionEnd FunctionEnd

View File

@@ -11,24 +11,24 @@ gl_FragCoord origin is upper left
0:17 add (temp 4-component vector of float) 0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float) 0:17 add (temp 4-component vector of float)
0:17 'input' (in 4-component vector of float) 0:17 'input' (in 4-component vector of float)
0:17 v1: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:17 v1: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@0' (layout(set=3 binding=5 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1}) 0:17 'anon@0' (layout(set=3 binding=5 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:17 v5: direct index for structure (layout(column_major std430 offset=0 ) buffer 4-component vector of float) 0:17 v5: direct index for structure (layout(row_major std430 offset=0 ) buffer 4-component vector of float)
0:17 'anon@1' (layout(column_major std430 push_constant ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float v5}) 0:17 'anon@1' (layout(row_major std430 push_constant ) buffer block{layout(row_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:17 v1PostLayout: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:17 v1PostLayout: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@2' (layout(set=4 binding=7 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout}) 0:17 'anon@2' (layout(set=4 binding=7 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(set=3 binding=5 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1}) 0:? 'anon@0' (layout(set=3 binding=5 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@1' (layout(column_major std430 push_constant ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float v5}) 0:? 'anon@1' (layout(row_major std430 push_constant ) buffer block{layout(row_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'specConst' (specialization-constant const int) 0:? 'specConst' (specialization-constant const int)
0:? 10 (const int) 0:? 10 (const int)
0:? 'anon@2' (layout(set=4 binding=7 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout}) 0:? 'anon@2' (layout(set=4 binding=7 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
Linked fragment stage: Linked fragment stage:
@@ -46,24 +46,24 @@ gl_FragCoord origin is upper left
0:17 add (temp 4-component vector of float) 0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float) 0:17 add (temp 4-component vector of float)
0:17 'input' (in 4-component vector of float) 0:17 'input' (in 4-component vector of float)
0:17 v1: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:17 v1: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@0' (layout(set=3 binding=5 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1}) 0:17 'anon@0' (layout(set=3 binding=5 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:17 v5: direct index for structure (layout(column_major std430 offset=0 ) buffer 4-component vector of float) 0:17 v5: direct index for structure (layout(row_major std430 offset=0 ) buffer 4-component vector of float)
0:17 'anon@1' (layout(column_major std430 push_constant ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float v5}) 0:17 'anon@1' (layout(row_major std430 push_constant ) buffer block{layout(row_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:17 v1PostLayout: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float) 0:17 v1PostLayout: direct index for structure (layout(row_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@2' (layout(set=4 binding=7 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout}) 0:17 'anon@2' (layout(set=4 binding=7 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 Constant: 0:17 Constant:
0:17 0 (const uint) 0:17 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(set=3 binding=5 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1}) 0:? 'anon@0' (layout(set=3 binding=5 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@1' (layout(column_major std430 push_constant ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float v5}) 0:? 'anon@1' (layout(row_major std430 push_constant ) buffer block{layout(row_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'specConst' (specialization-constant const int) 0:? 'specConst' (specialization-constant const int)
0:? 10 (const int) 0:? 10 (const int)
0:? 'anon@2' (layout(set=4 binding=7 column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout}) 0:? 'anon@2' (layout(set=4 binding=7 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001

View File

@@ -4,16 +4,16 @@ Linked vertex stage:
Uniform reflection: Uniform reflection:
anonMember3: offset 96, type 8b52, size 1, index 0 anonMember3: offset 80, type 8b52, size 1, index 0
s.a: offset -1, type 1404, size 1, index -1 s.a: offset -1, type 1404, size 1, index -1
scalar: offset 12, type 1404, size 1, index 0 scalar: offset 12, type 1404, size 1, index 0
m23: offset 16, type 8b67, size 1, index 0 m23: offset 16, type 8b67, size 1, index 0
scalarAfterm23: offset 64, type 1404, size 1, index 0 scalarAfterm23: offset 48, type 1404, size 1, index 0
c_m23: offset 16, type 8b67, size 1, index 0 c_m23: offset 16, type 8b67, size 1, index 0
c_scalarAfterm23: offset 64, type 1404, size 1, index 0 c_scalarAfterm23: offset 48, type 1404, size 1, index 0
scalarBeforeArray: offset 112, type 1404, size 1, index 0 scalarBeforeArray: offset 96, type 1404, size 1, index 0
floatArray: offset 128, type 1406, size 5, index 0 floatArray: offset 112, type 1406, size 5, index 0
scalarAfterArray: offset 208, type 1404, size 1, index 0 scalarAfterArray: offset 192, type 1404, size 1, index 0
memfloat2: offset 48, type 8b50, size 1, index 0 memfloat2: offset 48, type 8b50, size 1, index 0
memf1: offset 56, type 1406, size 1, index 0 memf1: offset 56, type 1406, size 1, index 0
memf2: offset 60, type 8b56, size 1, index 0 memf2: offset 60, type 8b56, size 1, index 0
@@ -73,7 +73,7 @@ anonMember1: offset 0, type 8b51, size 1, index 0
uf1: offset -1, type 1406, size 1, index -1 uf1: offset -1, type 1406, size 1, index -1
Uniform block reflection: Uniform block reflection:
: offset -1, type ffffffff, size 512, index -1 : offset -1, type ffffffff, size 496, index -1
Vertex attribute reflection: Vertex attribute reflection:
attributeFloat: offset 0, type 1406, size 0, index 0 attributeFloat: offset 0, type 1406, size 0, index 0

View File

@@ -20,6 +20,10 @@ tbuffer tbufName : register(b8) {
float f5 : packoffset(c4.z); float f5 : packoffset(c4.z);
float f6 : packoffset(c); float f6 : packoffset(c);
float f7; float f7;
float3x4 m1;
row_major float3x4 m2;
column_major float3x4 m3;
float3x4 m4;
}; };
float4 PixelShaderFunction(float4 input) : COLOR0 float4 PixelShaderFunction(float4 input) : COLOR0

View File

@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1506" #define GLSLANG_REVISION "Overload400-PrecQual.1507"
#define GLSLANG_DATE "21-Sep-2016" #define GLSLANG_DATE "25-Sep-2016"

View File

@@ -491,10 +491,10 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
qualifier.sample = true; qualifier.sample = true;
break; break;
case EHTokRowMajor: case EHTokRowMajor:
qualifier.layoutMatrix = ElmRowMajor; qualifier.layoutMatrix = ElmColumnMajor;
break; break;
case EHTokColumnMajor: case EHTokColumnMajor:
qualifier.layoutMatrix = ElmColumnMajor; qualifier.layoutMatrix = ElmRowMajor;
break; break;
case EHTokPrecise: case EHTokPrecise:
qualifier.noContraction = true; qualifier.noContraction = true;

View File

@@ -63,11 +63,11 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
linkage = new TIntermAggregate; linkage = new TIntermAggregate;
globalUniformDefaults.clear(); globalUniformDefaults.clear();
globalUniformDefaults.layoutMatrix = ElmColumnMajor; globalUniformDefaults.layoutMatrix = ElmRowMajor;
globalUniformDefaults.layoutPacking = ElpStd140; globalUniformDefaults.layoutPacking = ElpStd140;
globalBufferDefaults.clear(); globalBufferDefaults.clear();
globalBufferDefaults.layoutMatrix = ElmColumnMajor; globalBufferDefaults.layoutMatrix = ElmRowMajor;
globalBufferDefaults.layoutPacking = ElpStd430; globalBufferDefaults.layoutPacking = ElpStd430;
globalInputDefaults.clear(); globalInputDefaults.clear();
@@ -3624,11 +3624,11 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua
std::transform(id.begin(), id.end(), id.begin(), ::tolower); std::transform(id.begin(), id.end(), id.begin(), ::tolower);
if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) { if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) {
qualifier.layoutMatrix = ElmColumnMajor; qualifier.layoutMatrix = ElmRowMajor;
return; return;
} }
if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) { if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) {
qualifier.layoutMatrix = ElmRowMajor; qualifier.layoutMatrix = ElmColumnMajor;
return; return;
} }
if (id == "push_constant") { if (id == "push_constant") {