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,20 +4,20 @@ gl_FragCoord origin is upper left
0:? Sequence
0:1 Sequence
0:1 move second child to first child (temp 1-component vector of float)
0:1 'f1' (temp 1-component vector of float)
0:1 'f1' (global 1-component vector of float)
0:1 Constant:
0:1 1.000000
0:11 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
0:11 Function Definition: ShaderFunction(vf1;f1; (global 1-component vector of float)
0:9 Function Parameters:
0:9 'inFloat1' (in 1-component vector of float)
0:9 'inScalar' (in float)
0:? Linker Objects
0:? 'f1' (temp 1-component vector of float)
0:? 'fmat11' (temp 1X1 matrix of float)
0:? 'fmat41' (temp 1X4 matrix of float)
0:? 'fmat12' (temp 2X1 matrix of float)
0:? 'dmat23' (temp 3X2 matrix of double)
0:? 'int44' (temp 4X4 matrix of int)
0:? 'f1' (global 1-component vector of float)
0:? 'fmat11' (global 1X1 matrix of float)
0:? 'fmat41' (global 1X4 matrix of float)
0:? 'fmat12' (global 2X1 matrix of float)
0:? 'dmat23' (global 3X2 matrix of double)
0:? 'int44' (global 4X4 matrix of int)
Linked fragment stage:
@ -28,24 +28,24 @@ gl_FragCoord origin is upper left
0:? Sequence
0:1 Sequence
0:1 move second child to first child (temp 1-component vector of float)
0:1 'f1' (temp 1-component vector of float)
0:1 'f1' (global 1-component vector of float)
0:1 Constant:
0:1 1.000000
0:11 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
0:11 Function Definition: ShaderFunction(vf1;f1; (global 1-component vector of float)
0:9 Function Parameters:
0:9 'inFloat1' (in 1-component vector of float)
0:9 'inScalar' (in float)
0:? Linker Objects
0:? 'f1' (temp 1-component vector of float)
0:? 'fmat11' (temp 1X1 matrix of float)
0:? 'fmat41' (temp 1X4 matrix of float)
0:? 'fmat12' (temp 2X1 matrix of float)
0:? 'dmat23' (temp 3X2 matrix of double)
0:? 'int44' (temp 4X4 matrix of int)
0:? 'f1' (global 1-component vector of float)
0:? 'fmat11' (global 1X1 matrix of float)
0:? 'fmat41' (global 1X4 matrix of float)
0:? 'fmat12' (global 2X1 matrix of float)
0:? 'dmat23' (global 3X2 matrix of double)
0:? 'int44' (global 4X4 matrix of int)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 37
// Id's are bound by 38
Capability Shader
Capability Float64
@ -58,48 +58,49 @@ gl_FragCoord origin is upper left
Name 11 "ShaderFunction(vf1;f1;"
Name 9 "inFloat1"
Name 10 "inScalar"
Name 13 "f1"
Name 19 "fmat11"
Name 23 "fmat41"
Name 26 "fmat12"
Name 31 "dmat23"
Name 36 "int44"
Name 14 "f1"
Name 20 "fmat11"
Name 24 "fmat41"
Name 27 "fmat12"
Name 32 "dmat23"
Name 37 "int44"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
8: TypeFunction 6(float) 7(ptr) 7(ptr)
14: 6(float) Constant 1065353216
16: TypeVector 6(float) 1
17: TypeMatrix 16(fvec) 1
18: TypePointer Function 17
20: TypeVector 6(float) 4
21: TypeMatrix 20(fvec4) 1
22: TypePointer Function 21
24: TypeMatrix 16(fvec) 2
25: TypePointer Function 24
27: TypeFloat 64
28: TypeVector 27(float) 2
29: TypeMatrix 28(fvec2) 3
30: TypePointer Function 29
32: TypeInt 32 1
33: TypeVector 32(int) 4
34: TypeMatrix 33(ivec4) 4
35: TypePointer Function 34
13: TypePointer Private 6(float)
14(f1): 13(ptr) Variable Private
15: 6(float) Constant 1065353216
17: TypeVector 6(float) 1
18: TypeMatrix 17(fvec) 1
19: TypePointer Private 18
20(fmat11): 19(ptr) Variable Private
21: TypeVector 6(float) 4
22: TypeMatrix 21(fvec4) 1
23: TypePointer Private 22
24(fmat41): 23(ptr) Variable Private
25: TypeMatrix 17(fvec) 2
26: TypePointer Private 25
27(fmat12): 26(ptr) Variable Private
28: TypeFloat 64
29: TypeVector 28(float) 2
30: TypeMatrix 29(fvec2) 3
31: TypePointer Private 30
32(dmat23): 31(ptr) Variable Private
33: TypeInt 32 1
34: TypeVector 33(int) 4
35: TypeMatrix 34(ivec4) 4
36: TypePointer Private 35
37(int44): 36(ptr) Variable Private
4(PixelShaderFunction): 2 Function None 3
5: Label
13(f1): 7(ptr) Variable Function
Store 13(f1) 14
Store 14(f1) 15
FunctionEnd
11(ShaderFunction(vf1;f1;): 6(float) Function None 8
9(inFloat1): 7(ptr) FunctionParameter
10(inScalar): 7(ptr) FunctionParameter
12: Label
19(fmat11): 18(ptr) Variable Function
23(fmat41): 22(ptr) Variable Function
26(fmat12): 25(ptr) Variable Function
31(dmat23): 30(ptr) Variable Function
36(int44): 35(ptr) Variable Function
15: 6(float) Undef
ReturnValue 15
16: 6(float) Undef
ReturnValue 16
FunctionEnd