HLSL: Allow use of $Global members in between function calls.

This allows global initializers to use $Global members.
This commit is contained in:
John Kessenich
2017-03-22 23:21:34 -06:00
parent 7a41f96d10
commit 000c818efb
53 changed files with 4566 additions and 4558 deletions

View File

@@ -9,84 +9,84 @@ gl_FragCoord origin is upper left
0:11 move second child to first child ( temp 4-component vector of bool)
0:11 'r00' ( temp 4-component vector of bool)
0:11 Negate conditional ( temp 4-component vector of bool)
0:11 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:11 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:11 b4a: direct index for structure ( uniform 4-component vector of bool)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:11 Constant:
0:11 0 (const uint)
0:12 Sequence
0:12 move second child to first child ( temp 4-component vector of bool)
0:12 'r01' ( temp 4-component vector of bool)
0:12 logical-and ( temp 4-component vector of bool)
0:12 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:12 b4a: direct index for structure ( uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:12 Constant:
0:12 0 (const uint)
0:12 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:12 b4b: direct index for structure ( uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:12 Constant:
0:12 1 (const uint)
0:13 Sequence
0:13 move second child to first child ( temp 4-component vector of bool)
0:13 'r02' ( temp 4-component vector of bool)
0:13 logical-or ( temp 4-component vector of bool)
0:13 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:13 b4a: direct index for structure ( uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:13 Constant:
0:13 0 (const uint)
0:13 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:13 b4b: direct index for structure ( uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:13 Constant:
0:13 1 (const uint)
0:15 Sequence
0:15 move second child to first child ( temp 4-component vector of bool)
0:15 'r10' ( temp 4-component vector of bool)
0:15 logical-and ( temp 4-component vector of bool)
0:15 Construct bvec4 (layout( offset=16) uniform 4-component vector of bool)
0:15 b1a: direct index for structure (layout( offset=32) uniform bool)
0:15 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:15 Construct bvec4 ( uniform 4-component vector of bool)
0:15 b1a: direct index for structure ( uniform bool)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:15 Constant:
0:15 2 (const uint)
0:15 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:15 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:15 b4b: direct index for structure ( uniform 4-component vector of bool)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:15 Constant:
0:15 1 (const uint)
0:16 Sequence
0:16 move second child to first child ( temp 4-component vector of bool)
0:16 'r11' ( temp 4-component vector of bool)
0:16 logical-or ( temp 4-component vector of bool)
0:16 Construct bvec4 (layout( offset=16) uniform 4-component vector of bool)
0:16 b1a: direct index for structure (layout( offset=32) uniform bool)
0:16 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:16 Construct bvec4 ( uniform 4-component vector of bool)
0:16 b1a: direct index for structure ( uniform bool)
0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:16 Constant:
0:16 2 (const uint)
0:16 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:16 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:16 b4b: direct index for structure ( uniform 4-component vector of bool)
0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:16 Constant:
0:16 1 (const uint)
0:18 Sequence
0:18 move second child to first child ( temp 4-component vector of bool)
0:18 'r20' ( temp 4-component vector of bool)
0:18 logical-and ( temp 4-component vector of bool)
0:18 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:18 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:18 b4a: direct index for structure ( uniform 4-component vector of bool)
0:18 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:18 Constant:
0:18 0 (const uint)
0:18 Construct bvec4 (layout( offset=0) uniform 4-component vector of bool)
0:18 b1b: direct index for structure (layout( offset=36) uniform bool)
0:18 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:18 Construct bvec4 ( uniform 4-component vector of bool)
0:18 b1b: direct index for structure ( uniform bool)
0:18 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:18 Constant:
0:18 3 (const uint)
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of bool)
0:19 'r21' ( temp 4-component vector of bool)
0:19 logical-or ( temp 4-component vector of bool)
0:19 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:19 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:19 b4a: direct index for structure ( uniform 4-component vector of bool)
0:19 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:19 Constant:
0:19 0 (const uint)
0:19 Construct bvec4 (layout( offset=0) uniform 4-component vector of bool)
0:19 b1b: direct index for structure (layout( offset=36) uniform bool)
0:19 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:19 Construct bvec4 ( uniform 4-component vector of bool)
0:19 b1b: direct index for structure ( uniform bool)
0:19 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:19 Constant:
0:19 3 (const uint)
0:22 move second child to first child ( temp 4-component vector of float)
@@ -121,8 +121,8 @@ gl_FragCoord origin is upper left
0:10 Constant:
0:10 0 (const int)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:? 'Color' (layout( location=0) out 4-component vector of float)
0:? 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
Linked fragment stage:
@@ -138,84 +138,84 @@ gl_FragCoord origin is upper left
0:11 move second child to first child ( temp 4-component vector of bool)
0:11 'r00' ( temp 4-component vector of bool)
0:11 Negate conditional ( temp 4-component vector of bool)
0:11 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:11 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:11 b4a: direct index for structure ( uniform 4-component vector of bool)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:11 Constant:
0:11 0 (const uint)
0:12 Sequence
0:12 move second child to first child ( temp 4-component vector of bool)
0:12 'r01' ( temp 4-component vector of bool)
0:12 logical-and ( temp 4-component vector of bool)
0:12 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:12 b4a: direct index for structure ( uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:12 Constant:
0:12 0 (const uint)
0:12 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:12 b4b: direct index for structure ( uniform 4-component vector of bool)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:12 Constant:
0:12 1 (const uint)
0:13 Sequence
0:13 move second child to first child ( temp 4-component vector of bool)
0:13 'r02' ( temp 4-component vector of bool)
0:13 logical-or ( temp 4-component vector of bool)
0:13 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:13 b4a: direct index for structure ( uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:13 Constant:
0:13 0 (const uint)
0:13 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:13 b4b: direct index for structure ( uniform 4-component vector of bool)
0:13 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:13 Constant:
0:13 1 (const uint)
0:15 Sequence
0:15 move second child to first child ( temp 4-component vector of bool)
0:15 'r10' ( temp 4-component vector of bool)
0:15 logical-and ( temp 4-component vector of bool)
0:15 Construct bvec4 (layout( offset=16) uniform 4-component vector of bool)
0:15 b1a: direct index for structure (layout( offset=32) uniform bool)
0:15 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:15 Construct bvec4 ( uniform 4-component vector of bool)
0:15 b1a: direct index for structure ( uniform bool)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:15 Constant:
0:15 2 (const uint)
0:15 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:15 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:15 b4b: direct index for structure ( uniform 4-component vector of bool)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:15 Constant:
0:15 1 (const uint)
0:16 Sequence
0:16 move second child to first child ( temp 4-component vector of bool)
0:16 'r11' ( temp 4-component vector of bool)
0:16 logical-or ( temp 4-component vector of bool)
0:16 Construct bvec4 (layout( offset=16) uniform 4-component vector of bool)
0:16 b1a: direct index for structure (layout( offset=32) uniform bool)
0:16 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:16 Construct bvec4 ( uniform 4-component vector of bool)
0:16 b1a: direct index for structure ( uniform bool)
0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:16 Constant:
0:16 2 (const uint)
0:16 b4b: direct index for structure (layout( offset=16) uniform 4-component vector of bool)
0:16 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:16 b4b: direct index for structure ( uniform 4-component vector of bool)
0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:16 Constant:
0:16 1 (const uint)
0:18 Sequence
0:18 move second child to first child ( temp 4-component vector of bool)
0:18 'r20' ( temp 4-component vector of bool)
0:18 logical-and ( temp 4-component vector of bool)
0:18 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:18 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:18 b4a: direct index for structure ( uniform 4-component vector of bool)
0:18 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:18 Constant:
0:18 0 (const uint)
0:18 Construct bvec4 (layout( offset=0) uniform 4-component vector of bool)
0:18 b1b: direct index for structure (layout( offset=36) uniform bool)
0:18 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:18 Construct bvec4 ( uniform 4-component vector of bool)
0:18 b1b: direct index for structure ( uniform bool)
0:18 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:18 Constant:
0:18 3 (const uint)
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of bool)
0:19 'r21' ( temp 4-component vector of bool)
0:19 logical-or ( temp 4-component vector of bool)
0:19 b4a: direct index for structure (layout( offset=0) uniform 4-component vector of bool)
0:19 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:19 b4a: direct index for structure ( uniform 4-component vector of bool)
0:19 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:19 Constant:
0:19 0 (const uint)
0:19 Construct bvec4 (layout( offset=0) uniform 4-component vector of bool)
0:19 b1b: direct index for structure (layout( offset=36) uniform bool)
0:19 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
0:19 Construct bvec4 ( uniform 4-component vector of bool)
0:19 b1b: direct index for structure ( uniform bool)
0:19 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:19 Constant:
0:19 3 (const uint)
0:22 move second child to first child ( temp 4-component vector of float)
@@ -250,8 +250,8 @@ gl_FragCoord origin is upper left
0:10 Constant:
0:10 0 (const int)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b})
0:? 'Color' (layout( location=0) out 4-component vector of float)
0:? 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform 4-component vector of bool b4a, layout( offset=16) uniform 4-component vector of bool b4b, layout( offset=32) uniform bool b1a, layout( offset=36) uniform bool b1b})
// Module Version 10000
// Generated by (magic number): 80001