HLSL: Correctly identify which variables are global storage class.

This commit is contained in:
John Kessenich 2016-07-01 19:35:53 -06:00
parent 532543c1c4
commit b0a63f578a
35 changed files with 995 additions and 979 deletions

View file

@ -4,14 +4,14 @@ gl_FragCoord origin is upper left
0:? Sequence
0:1 Sequence
0:1 move second child to first child (temp 4-component vector of float)
0:1 'a1' (temp 4-component vector of float)
0:1 'a1' (global 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 0.500000
0:? 0.000000
0:? 1.000000
0:1 move second child to first child (temp 4-component vector of float)
0:1 'b1' (temp 4-component vector of float)
0:1 'b1' (global 4-component vector of float)
0:? Constant:
0:? 2.000000
0:? 2.500000
@ -19,29 +19,29 @@ gl_FragCoord origin is upper left
0:? 2.200000
0:2 Sequence
0:2 move second child to first child (temp float)
0:2 'a2' (temp float)
0:2 'a2' (global float)
0:2 Constant:
0:2 0.200000
0:? Sequence
0:3 move second child to first child (temp float)
0:3 'b3' (temp float)
0:3 'b3' (global float)
0:3 Constant:
0:3 0.300000
0:? Sequence
0:4 move second child to first child (temp float)
0:4 'b4' (temp float)
0:4 'b4' (global float)
0:4 Constant:
0:4 0.400000
0:5 Sequence
0:5 move second child to first child (temp float)
0:5 'a5' (temp float)
0:5 'a5' (global float)
0:5 Constant:
0:5 0.500000
0:5 move second child to first child (temp float)
0:5 'c5' (temp float)
0:5 'c5' (global float)
0:5 Constant:
0:5 1.500000
0:13 Function Definition: ShaderFunction(vf4; (temp 4-component vector of float)
0:13 Function Definition: ShaderFunction(vf4; (global 4-component vector of float)
0:8 Function Parameters:
0:8 'input' (in 4-component vector of float)
0:? Sequence
@ -56,20 +56,20 @@ gl_FragCoord origin is upper left
0:11 Branch: Return with expression
0:11 component-wise multiply (temp 4-component vector of float)
0:11 'input' (in 4-component vector of float)
0:11 'a1' (temp 4-component vector of float)
0:11 'a1' (global 4-component vector of float)
0:? Linker Objects
0:? 'a1' (temp 4-component vector of float)
0:? 'b1' (temp 4-component vector of float)
0:? 'a2' (temp float)
0:? 'b2' (temp float)
0:? 'a3' (temp float)
0:? 'b3' (temp float)
0:? 'a4' (temp float)
0:? 'b4' (temp float)
0:? 'c4' (temp float)
0:? 'a5' (temp float)
0:? 'b5' (temp float)
0:? 'c5' (temp float)
0:? 'a1' (global 4-component vector of float)
0:? 'b1' (global 4-component vector of float)
0:? 'a2' (global float)
0:? 'b2' (global float)
0:? 'a3' (global float)
0:? 'b3' (global float)
0:? 'a4' (global float)
0:? 'b4' (global float)
0:? 'c4' (global float)
0:? 'a5' (global float)
0:? 'b5' (global float)
0:? 'c5' (global float)
Linked fragment stage:
@ -80,14 +80,14 @@ gl_FragCoord origin is upper left
0:? Sequence
0:1 Sequence
0:1 move second child to first child (temp 4-component vector of float)
0:1 'a1' (temp 4-component vector of float)
0:1 'a1' (global 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 0.500000
0:? 0.000000
0:? 1.000000
0:1 move second child to first child (temp 4-component vector of float)
0:1 'b1' (temp 4-component vector of float)
0:1 'b1' (global 4-component vector of float)
0:? Constant:
0:? 2.000000
0:? 2.500000
@ -95,29 +95,29 @@ gl_FragCoord origin is upper left
0:? 2.200000
0:2 Sequence
0:2 move second child to first child (temp float)
0:2 'a2' (temp float)
0:2 'a2' (global float)
0:2 Constant:
0:2 0.200000
0:? Sequence
0:3 move second child to first child (temp float)
0:3 'b3' (temp float)
0:3 'b3' (global float)
0:3 Constant:
0:3 0.300000
0:? Sequence
0:4 move second child to first child (temp float)
0:4 'b4' (temp float)
0:4 'b4' (global float)
0:4 Constant:
0:4 0.400000
0:5 Sequence
0:5 move second child to first child (temp float)
0:5 'a5' (temp float)
0:5 'a5' (global float)
0:5 Constant:
0:5 0.500000
0:5 move second child to first child (temp float)
0:5 'c5' (temp float)
0:5 'c5' (global float)
0:5 Constant:
0:5 1.500000
0:13 Function Definition: ShaderFunction(vf4; (temp 4-component vector of float)
0:13 Function Definition: ShaderFunction(vf4; (global 4-component vector of float)
0:8 Function Parameters:
0:8 'input' (in 4-component vector of float)
0:? Sequence
@ -132,29 +132,29 @@ gl_FragCoord origin is upper left
0:11 Branch: Return with expression
0:11 component-wise multiply (temp 4-component vector of float)
0:11 'input' (in 4-component vector of float)
0:11 'a1' (temp 4-component vector of float)
0:11 'a1' (global 4-component vector of float)
0:? Linker Objects
0:? 'a1' (temp 4-component vector of float)
0:? 'b1' (temp 4-component vector of float)
0:? 'a2' (temp float)
0:? 'b2' (temp float)
0:? 'a3' (temp float)
0:? 'b3' (temp float)
0:? 'a4' (temp float)
0:? 'b4' (temp float)
0:? 'c4' (temp float)
0:? 'a5' (temp float)
0:? 'b5' (temp float)
0:? 'c5' (temp float)
0:? 'a1' (global 4-component vector of float)
0:? 'b1' (global 4-component vector of float)
0:? 'a2' (global float)
0:? 'b2' (global float)
0:? 'a3' (global float)
0:? 'b3' (global float)
0:? 'a4' (global float)
0:? 'b4' (global float)
0:? 'c4' (global float)
0:? 'a5' (global float)
0:? 'b5' (global float)
0:? 'c5' (global float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 43
// Id's are bound by 44
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "ShaderFunction" 33
EntryPoint Fragment 4 "ShaderFunction" 34
ExecutionMode 4 OriginUpperLeft
Source HLSL 450
Name 4 "ShaderFunction"
@ -165,50 +165,51 @@ gl_FragCoord origin is upper left
Name 25 "b4"
Name 27 "a5"
Name 28 "c5"
Name 30 "a2"
Name 33 "input"
Name 38 "b2"
Name 39 "a3"
Name 40 "a4"
Name 41 "c4"
Name 42 "b5"
Name 31 "a2"
Name 34 "input"
Name 39 "b2"
Name 40 "a3"
Name 41 "a4"
Name 42 "c4"
Name 43 "b5"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4)
8: TypePointer Private 7(fvec4)
9(a1): 8(ptr) Variable Private
10: 6(float) Constant 1065353216
11: 6(float) Constant 1056964608
12: 6(float) Constant 0
13: 7(fvec4) ConstantComposite 10 11 12 10
14(b1): 8(ptr) Variable Private
15: 6(float) Constant 1073741824
16: 6(float) Constant 1075838976
17: 6(float) Constant 1074161254
18: 6(float) Constant 1074580685
19: 7(fvec4) ConstantComposite 15 16 17 18
20: TypePointer Function 6(float)
20: TypePointer Private 6(float)
21(a2): 20(ptr) Variable Private
22: 6(float) Constant 1045220557
23(b3): 20(ptr) Variable Private
24: 6(float) Constant 1050253722
25(b4): 20(ptr) Variable Private
26: 6(float) Constant 1053609165
27(a5): 20(ptr) Variable Private
28(c5): 20(ptr) Variable Private
29: 6(float) Constant 1069547520
31: 7(fvec4) ConstantComposite 22 24 26 11
32: TypePointer Input 7(fvec4)
33(input): 32(ptr) Variable Input
30: TypePointer Function 7(fvec4)
32: 7(fvec4) ConstantComposite 22 24 26 11
33: TypePointer Input 7(fvec4)
34(input): 33(ptr) Variable Input
39(b2): 20(ptr) Variable Private
40(a3): 20(ptr) Variable Private
41(a4): 20(ptr) Variable Private
42(c4): 20(ptr) Variable Private
43(b5): 20(ptr) Variable Private
4(ShaderFunction): 2 Function None 3
5: Label
9(a1): 8(ptr) Variable Function
14(b1): 8(ptr) Variable Function
21(a2): 20(ptr) Variable Function
23(b3): 20(ptr) Variable Function
25(b4): 20(ptr) Variable Function
27(a5): 20(ptr) Variable Function
28(c5): 20(ptr) Variable Function
30(a2): 8(ptr) Variable Function
38(b2): 20(ptr) Variable Function
39(a3): 20(ptr) Variable Function
40(a4): 20(ptr) Variable Function
41(c4): 20(ptr) Variable Function
42(b5): 20(ptr) Variable Function
31(a2): 30(ptr) Variable Function
Store 9(a1) 13
Store 14(b1) 19
Store 21(a2) 22
@ -216,9 +217,9 @@ gl_FragCoord origin is upper left
Store 25(b4) 26
Store 27(a5) 11
Store 28(c5) 29
Store 30(a2) 31
34: 7(fvec4) Load 33(input)
35: 7(fvec4) Load 9(a1)
36: 7(fvec4) FMul 34 35
ReturnValue 36
Store 31(a2) 32
35: 7(fvec4) Load 34(input)
36: 7(fvec4) Load 9(a1)
37: 7(fvec4) FMul 35 36
ReturnValue 37
FunctionEnd