Commit bf47286f by John Kessenich

HLSL: Move to fine-grained control for defining input/output/uniform IO types.

parent 727b374f
...@@ -87,7 +87,7 @@ gl_FragCoord origin is upper left ...@@ -87,7 +87,7 @@ gl_FragCoord origin is upper left
0:35 move second child to first child (temp 4-element array of float) 0:35 move second child to first child (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float) 0:35 'local_float_array' (temp 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float) 0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats}) 0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 Constant: 0:35 Constant:
0:35 2 (const uint) 0:35 2 (const uint)
0:37 move second child to first child (temp 4-component vector of float) 0:37 move second child to first child (temp 4-component vector of float)
...@@ -165,7 +165,7 @@ gl_FragCoord origin is upper left ...@@ -165,7 +165,7 @@ gl_FragCoord origin is upper left
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler) 0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler) 0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler) 0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'not_flattened_a' (global 5-element array of int) 0:? 'not_flattened_a' (global 5-element array of int)
0:? 'color' (layout(location=0 ) out 4-component vector of float) 0:? 'color' (layout(location=0 ) out 4-component vector of float)
...@@ -261,7 +261,7 @@ gl_FragCoord origin is upper left ...@@ -261,7 +261,7 @@ gl_FragCoord origin is upper left
0:35 move second child to first child (temp 4-element array of float) 0:35 move second child to first child (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float) 0:35 'local_float_array' (temp 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float) 0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats}) 0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 Constant: 0:35 Constant:
0:35 2 (const uint) 0:35 2 (const uint)
0:37 move second child to first child (temp 4-component vector of float) 0:37 move second child to first child (temp 4-component vector of float)
...@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left ...@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler) 0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler) 0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler) 0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'not_flattened_a' (global 5-element array of int) 0:? 'not_flattened_a' (global 5-element array of int)
0:? 'color' (layout(location=0 ) out 4-component vector of float) 0:? 'color' (layout(location=0 ) out 4-component vector of float)
......
...@@ -13,11 +13,11 @@ gl_FragCoord origin is upper left ...@@ -13,11 +13,11 @@ gl_FragCoord origin is upper left
0:10 component-wise multiply (temp 4-component vector of float) 0:10 component-wise multiply (temp 4-component vector of float)
0:10 'input' (in 4-component vector of float) 0:10 'input' (in 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float) 0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(offset=48 ) uniform 4-component vector of float ff4}) 0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
0:10 Constant: 0:10 Constant:
0:10 0 (const uint) 0:10 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(offset=48 ) uniform 4-component vector of float ff4}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
Linked fragment stage: Linked fragment stage:
...@@ -35,11 +35,11 @@ gl_FragCoord origin is upper left ...@@ -35,11 +35,11 @@ gl_FragCoord origin is upper left
0:10 component-wise multiply (temp 4-component vector of float) 0:10 component-wise multiply (temp 4-component vector of float)
0:10 'input' (in 4-component vector of float) 0:10 'input' (in 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float) 0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(offset=48 ) uniform 4-component vector of float ff4}) 0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
0:10 Constant: 0:10 Constant:
0:10 0 (const uint) 0:10 0 (const uint)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(offset=48 ) uniform 4-component vector of float ff4}) 0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
......
...@@ -52,16 +52,16 @@ Shader version: 450 ...@@ -52,16 +52,16 @@ Shader version: 450
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 Constant: 0:17 Constant:
0:17 1 (const int) 0:17 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:17 move second child to first child (temp int) 0:17 move second child to first child (temp int)
0:17 x1_in: direct index for structure (temp int) 0:17 x1_in: direct index for structure (temp int)
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 Constant: 0:17 Constant:
0:17 2 (const int) 0:17 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:17 move second child to first child (temp 4-component vector of float) 0:17 move second child to first child (temp 4-component vector of float)
0:? 'Pos_loose' (temp 4-component vector of float) 0:? 'Pos_loose' (temp 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=3 ) in 4-component vector of float)
0:17 Sequence 0:17 Sequence
0:17 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
...@@ -95,9 +95,9 @@ Shader version: 450 ...@@ -95,9 +95,9 @@ Shader version: 450
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out}) 0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int) 0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=3 ) in 4-component vector of float)
Linked vertex stage: Linked vertex stage:
...@@ -156,16 +156,16 @@ Shader version: 450 ...@@ -156,16 +156,16 @@ Shader version: 450
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 Constant: 0:17 Constant:
0:17 1 (const int) 0:17 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:17 move second child to first child (temp int) 0:17 move second child to first child (temp int)
0:17 x1_in: direct index for structure (temp int) 0:17 x1_in: direct index for structure (temp int)
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 Constant: 0:17 Constant:
0:17 2 (const int) 0:17 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:17 move second child to first child (temp 4-component vector of float) 0:17 move second child to first child (temp 4-component vector of float)
0:? 'Pos_loose' (temp 4-component vector of float) 0:? 'Pos_loose' (temp 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=3 ) in 4-component vector of float)
0:17 Sequence 0:17 Sequence
0:17 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:17 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
...@@ -199,9 +199,9 @@ Shader version: 450 ...@@ -199,9 +199,9 @@ Shader version: 450
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out}) 0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int) 0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=3 ) in 4-component vector of float)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
...@@ -239,9 +239,9 @@ Shader version: 450 ...@@ -239,9 +239,9 @@ Shader version: 450
Name 61 "@entryPointOutput" Name 61 "@entryPointOutput"
Name 67 "@entryPointOutput_Pos_out" Name 67 "@entryPointOutput_Pos_out"
Decorate 40(x0_in) Location 0 Decorate 40(x0_in) Location 0
Decorate 44(Pos_in) BuiltIn Position Decorate 44(Pos_in) Location 1
Decorate 47(x1_in) Location 1 Decorate 47(x1_in) Location 2
Decorate 51(Pos_loose) BuiltIn Position Decorate 51(Pos_loose) Location 3
Decorate 61(@entryPointOutput) Location 0 Decorate 61(@entryPointOutput) Location 0
Decorate 67(@entryPointOutput_Pos_out) BuiltIn Position Decorate 67(@entryPointOutput_Pos_out) BuiltIn Position
2: TypeVoid 2: TypeVoid
......
...@@ -66,13 +66,13 @@ Shader version: 450 ...@@ -66,13 +66,13 @@ Shader version: 450
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:22 Constant: 0:22 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:22 move second child to first child (temp int) 0:22 move second child to first child (temp int)
0:22 x1_in: direct index for structure (temp int) 0:22 x1_in: direct index for structure (temp int)
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:22 Constant: 0:22 Constant:
0:22 2 (const int) 0:22 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
...@@ -105,8 +105,8 @@ Shader version: 450 ...@@ -105,8 +105,8 @@ Shader version: 450
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out}) 0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int) 0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
Linked vertex stage: Linked vertex stage:
...@@ -179,13 +179,13 @@ Shader version: 450 ...@@ -179,13 +179,13 @@ Shader version: 450
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:22 Constant: 0:22 Constant:
0:22 1 (const int) 0:22 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:22 move second child to first child (temp int) 0:22 move second child to first child (temp int)
0:22 x1_in: direct index for structure (temp int) 0:22 x1_in: direct index for structure (temp int)
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:22 Constant: 0:22 Constant:
0:22 2 (const int) 0:22 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
0:22 Sequence 0:22 Sequence
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
...@@ -218,8 +218,8 @@ Shader version: 450 ...@@ -218,8 +218,8 @@ Shader version: 450
0:? Linker Objects 0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out}) 0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int) 0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=1 ) in 4-component vector of float)
0:? 'x1_in' (layout(location=1 ) in int) 0:? 'x1_in' (layout(location=2 ) in int)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
...@@ -258,8 +258,8 @@ Shader version: 450 ...@@ -258,8 +258,8 @@ Shader version: 450
Name 68 "@entryPointOutput" Name 68 "@entryPointOutput"
Name 74 "@entryPointOutput_Pos_out" Name 74 "@entryPointOutput_Pos_out"
Decorate 52(x0_in) Location 0 Decorate 52(x0_in) Location 0
Decorate 56(Pos_in) BuiltIn Position Decorate 56(Pos_in) Location 1
Decorate 59(x1_in) Location 1 Decorate 59(x1_in) Location 2
Decorate 68(@entryPointOutput) Location 0 Decorate 68(@entryPointOutput) Location 0
Decorate 74(@entryPointOutput_Pos_out) BuiltIn Position Decorate 74(@entryPointOutput_Pos_out) BuiltIn Position
2: TypeVoid 2: TypeVoid
......
...@@ -28,10 +28,10 @@ Shader version: 450 ...@@ -28,10 +28,10 @@ Shader version: 450
0:? 'vsin' (temp structure{temp 4-component vector of float Pos_in}) 0:? 'vsin' (temp structure{temp 4-component vector of float Pos_in})
0:16 Constant: 0:16 Constant:
0:16 0 (const int) 0:16 0 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=0 ) in 4-component vector of float)
0:16 move second child to first child (temp 4-component vector of float) 0:16 move second child to first child (temp 4-component vector of float)
0:? 'Pos_loose' (temp 4-component vector of float) 0:? 'Pos_loose' (temp 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=1 ) in 4-component vector of float)
0:16 Sequence 0:16 Sequence
0:16 move second child to first child (temp 4-component vector of float) 0:16 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput_Pos' (out 4-component vector of float Position) 0:? '@entryPointOutput_Pos' (out 4-component vector of float Position)
...@@ -42,8 +42,8 @@ Shader version: 450 ...@@ -42,8 +42,8 @@ Shader version: 450
0:16 Constant: 0:16 Constant:
0:16 0 (const int) 0:16 0 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=0 ) in 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=1 ) in 4-component vector of float)
Linked vertex stage: Linked vertex stage:
...@@ -78,10 +78,10 @@ Shader version: 450 ...@@ -78,10 +78,10 @@ Shader version: 450
0:? 'vsin' (temp structure{temp 4-component vector of float Pos_in}) 0:? 'vsin' (temp structure{temp 4-component vector of float Pos_in})
0:16 Constant: 0:16 Constant:
0:16 0 (const int) 0:16 0 (const int)
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=0 ) in 4-component vector of float)
0:16 move second child to first child (temp 4-component vector of float) 0:16 move second child to first child (temp 4-component vector of float)
0:? 'Pos_loose' (temp 4-component vector of float) 0:? 'Pos_loose' (temp 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=1 ) in 4-component vector of float)
0:16 Sequence 0:16 Sequence
0:16 move second child to first child (temp 4-component vector of float) 0:16 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput_Pos' (out 4-component vector of float Position) 0:? '@entryPointOutput_Pos' (out 4-component vector of float Position)
...@@ -92,8 +92,8 @@ Shader version: 450 ...@@ -92,8 +92,8 @@ Shader version: 450
0:16 Constant: 0:16 Constant:
0:16 0 (const int) 0:16 0 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'Pos_in' (in 4-component vector of float Position) 0:? 'Pos_in' (layout(location=0 ) in 4-component vector of float)
0:? 'Pos_loose' (in 4-component vector of float Position) 0:? 'Pos_loose' (layout(location=1 ) in 4-component vector of float)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
...@@ -119,8 +119,8 @@ Shader version: 450 ...@@ -119,8 +119,8 @@ Shader version: 450
Name 38 "@entryPointOutput_Pos" Name 38 "@entryPointOutput_Pos"
Name 39 "param" Name 39 "param"
Name 41 "param" Name 41 "param"
Decorate 31(Pos_in) BuiltIn Position Decorate 31(Pos_in) Location 0
Decorate 35(Pos_loose) BuiltIn Position Decorate 35(Pos_loose) Location 1
Decorate 38(@entryPointOutput_Pos) BuiltIn Position Decorate 38(@entryPointOutput_Pos) BuiltIn Position
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
......
...@@ -79,7 +79,7 @@ Shader version: 450 ...@@ -79,7 +79,7 @@ Shader version: 450
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) 0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant: 0:8 Constant:
0:8 2 (const int) 0:8 2 (const int)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float) 0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float) 0:8 move second child to first child (temp 4-component vector of float)
0:? 'e' (temp 4-component vector of float) 0:? 'e' (temp 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float) 0:? 'e' (layout(location=5 ) in 4-component vector of float)
...@@ -125,7 +125,7 @@ Shader version: 450 ...@@ -125,7 +125,7 @@ Shader version: 450
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float) 0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float) 0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint) 0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float) 0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float) 0:? 'e' (layout(location=5 ) in 4-component vector of float)
...@@ -212,7 +212,7 @@ Shader version: 450 ...@@ -212,7 +212,7 @@ Shader version: 450
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) 0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant: 0:8 Constant:
0:8 2 (const int) 0:8 2 (const int)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float) 0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float) 0:8 move second child to first child (temp 4-component vector of float)
0:? 'e' (temp 4-component vector of float) 0:? 'e' (temp 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float) 0:? 'e' (layout(location=5 ) in 4-component vector of float)
...@@ -258,7 +258,7 @@ Shader version: 450 ...@@ -258,7 +258,7 @@ Shader version: 450
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float) 0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float) 0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint) 0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float) 0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float) 0:? 'e' (layout(location=5 ) in 4-component vector of float)
// Module Version 10000 // Module Version 10000
......
...@@ -401,21 +401,16 @@ public: ...@@ -401,21 +401,16 @@ public:
// drop qualifiers that don't belong in a temporary variable // drop qualifiers that don't belong in a temporary variable
void makeTemporary() void makeTemporary()
{ {
makeNonIo(); storage = EvqTemporary;
storage = EvqTemporary; builtIn = EbvNone;
clearInterstage();
clearMemory();
specConstant = false; specConstant = false;
coherent = false; clearLayout();
volatil = false;
restrict = false;
readonly = false;
writeonly = false;
} }
// Remove IO related data from qualifier. void clearInterstage()
void makeNonIo() //?? remove?
{ {
// This preserves the storage type
builtIn = EbvNone;
centroid = false; centroid = false;
smooth = false; smooth = false;
flat = false; flat = false;
...@@ -425,16 +420,15 @@ public: ...@@ -425,16 +420,15 @@ public:
#endif #endif
patch = false; patch = false;
sample = false; sample = false;
clearLayout();
} }
// Return true if there is data which would be scrubbed by makeNonIo void clearMemory()
bool hasIoData() const // ?? remove?
{ {
return builtIn != EbvNone || coherent = false;
hasLayout() || volatil = false;
isInterpolation() || restrict = false;
isAuxiliary(); readonly = false;
writeonly = false;
} }
// Drop just the storage qualification, which perhaps should // Drop just the storage qualification, which perhaps should
...@@ -591,37 +585,43 @@ public: ...@@ -591,37 +585,43 @@ public:
} }
// Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
void clearLayout() void clearLayout() // all layout
{ {
layoutMatrix = ElmNone; clearUniformLayout();
layoutPacking = ElpNone;
layoutOffset = layoutNotSet; layoutPushConstant = false;
layoutAlign = layoutNotSet; #ifdef NV_EXTENSIONS
layoutPassthrough = false;
layoutViewportRelative = false;
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
layoutSecondaryViewportRelativeOffset = -2048;
#endif
clearInterstageLayout();
layoutSpecConstantId = layoutSpecConstantIdEnd;
layoutFormat = ElfNone;
}
void clearInterstageLayout()
{
layoutLocation = layoutLocationEnd; layoutLocation = layoutLocationEnd;
layoutComponent = layoutComponentEnd; layoutComponent = layoutComponentEnd;
layoutSet = layoutSetEnd;
layoutBinding = layoutBindingEnd;
layoutIndex = layoutIndexEnd; layoutIndex = layoutIndexEnd;
clearStreamLayout();
clearXfbLayout();
}
void clearStreamLayout()
{
layoutStream = layoutStreamEnd; layoutStream = layoutStreamEnd;
}
void clearXfbLayout()
{
layoutXfbBuffer = layoutXfbBufferEnd; layoutXfbBuffer = layoutXfbBufferEnd;
layoutXfbStride = layoutXfbStrideEnd; layoutXfbStride = layoutXfbStrideEnd;
layoutXfbOffset = layoutXfbOffsetEnd; layoutXfbOffset = layoutXfbOffsetEnd;
layoutAttachment = layoutAttachmentEnd;
layoutSpecConstantId = layoutSpecConstantIdEnd;
layoutFormat = ElfNone;
layoutPushConstant = false;
#ifdef NV_EXTENSIONS
layoutPassthrough = false;
layoutViewportRelative = false;
// -2048 as the default vaule indicating layoutSecondaryViewportRelative is not set
layoutSecondaryViewportRelativeOffset = -2048;
#endif
} }
bool hasLayout() const bool hasLayout() const
{ {
return hasUniformLayout() || return hasUniformLayout() ||
...@@ -685,8 +685,21 @@ public: ...@@ -685,8 +685,21 @@ public:
hasPacking() || hasPacking() ||
hasOffset() || hasOffset() ||
hasBinding() || hasBinding() ||
hasSet() ||
hasAlign(); hasAlign();
} }
void clearUniformLayout() // only uniform specific
{
layoutMatrix = ElmNone;
layoutPacking = ElpNone;
layoutOffset = layoutNotSet;
layoutAlign = layoutNotSet;
layoutSet = layoutSetEnd;
layoutBinding = layoutBindingEnd;
layoutAttachment = layoutAttachmentEnd;
}
bool hasMatrix() const bool hasMatrix() const
{ {
return layoutMatrix != ElmNone; return layoutMatrix != ElmNone;
...@@ -1220,7 +1233,7 @@ public: ...@@ -1220,7 +1233,7 @@ public:
// Make complete copy of the whole type graph rooted at 'copyOf'. // Make complete copy of the whole type graph rooted at 'copyOf'.
void deepCopy(const TType& copyOf) void deepCopy(const TType& copyOf)
{ {
TMap<TTypeList*,TTypeList*> copied; // to enable copying a type graph as a graph, not a tree //?? turn off again? TMap<TTypeList*,TTypeList*> copied; // to enable copying a type graph as a graph, not a tree
deepCopy(copyOf, copied); deepCopy(copyOf, copied);
} }
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
// 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.1791" #define GLSLANG_REVISION "Overload400-PrecQual.1791"
#define GLSLANG_DATE "04-Feb-2017" #define GLSLANG_DATE "05-Feb-2017"
...@@ -231,6 +231,17 @@ protected: ...@@ -231,6 +231,17 @@ protected:
int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
int flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); int flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name);
bool hasUniform(const TQualifier& qualifier) const;
void clearUniform(TQualifier& qualifier);
bool isInputBuiltIn(const TQualifier& qualifier) const;
bool hasInput(const TQualifier& qualifier) const;
void correctOutput(TQualifier& qualifier);
bool isOutputBuiltIn(const TQualifier& qualifier) const;
bool hasOutput(const TQualifier& qualifier) const;
void correctInput(TQualifier& qualifier);
void correctUniform(TQualifier& qualifier);
void clearUniformInputOutput(TQualifier& qualifier);
void finish() override; // post-processing void finish() override; // post-processing
// Current state of parsing // Current state of parsing
...@@ -296,8 +307,15 @@ protected: ...@@ -296,8 +307,15 @@ protected:
TVector<int> flattenLevel; // nested postfix operator level for flattening TVector<int> flattenLevel; // nested postfix operator level for flattening
TVector<int> flattenOffset; // cumulative offset for flattening TVector<int> flattenOffset; // cumulative offset for flattening
// IO-type map. // IO-type map. Maps a pure symbol-table form of a structure-member list into
TMap<const TTypeList*, TTypeList*> ioTypeMap; // each of the (up to) three kinds of IO, as each as different allowed decorations,
// but HLSL allows mixing all in the same structure.
struct tIoKinds {
TTypeList* input;
TTypeList* output;
TTypeList* uniform;
};
TMap<const TTypeList*, tIoKinds> ioTypeMap;
// Structure splitting data: // Structure splitting data:
TMap<int, TVariable*> splitIoVars; // variables with the builtin interstage IO removed, indexed by unique ID. TMap<int, TVariable*> splitIoVars; // variables with the builtin interstage IO removed, indexed by unique ID.
...@@ -319,7 +337,7 @@ protected: ...@@ -319,7 +337,7 @@ protected:
} }
}; };
TMap<tInterstageIoData, TVariable*> interstageBuiltInIo; // individual builtin interstage IO vars, inxed by builtin type. TMap<tInterstageIoData, TVariable*> interstageBuiltInIo; // individual builtin interstage IO vars, indexed by builtin type.
// We have to move array references to structs containing builtin interstage IO to the split variables. // We have to move array references to structs containing builtin interstage IO to the split variables.
// This is only handled for one level. This stores the index, because we'll need it in the future, since // This is only handled for one level. This stores the index, because we'll need it in the future, since
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment