SPV: Tighten up number of struct-types declared based on decoration.

Takes some pressure off of issue #304.
Structures don't inherit locations and then explicitly decorate
members with them, so removed this reason to have another instance
of a structure type.
This commit is contained in:
John Kessenich
2016-09-01 17:05:23 -06:00
parent 5e56423046
commit f2b7f3353b
61 changed files with 2057 additions and 2308 deletions

View File

@@ -61,12 +61,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 32
// Id's are bound by 31
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 27
EntryPoint Fragment 4 "main" 26
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 13 "MyFunction(f1;vf3;"
@@ -75,11 +75,9 @@ gl_FragCoord origin is upper left
Name 16 "PS_OUTPUT"
MemberName 16(PS_OUTPUT) 0 "color"
Name 18 "ps_output"
Name 25 "PS_OUTPUT"
MemberName 25(PS_OUTPUT) 0 "color"
Name 27 "@entryPointOutput"
Name 31 "precisefloat"
Decorate 27(@entryPointOutput) Location 0
Name 26 "@entryPointOutput"
Name 30 "precisefloat"
Decorate 26(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -95,18 +93,17 @@ gl_FragCoord origin is upper left
21: 6(float) Constant 1065353216
22: 15(fvec4) ConstantComposite 21 21 21 21
23: TypePointer Function 15(fvec4)
25(PS_OUTPUT): TypeStruct 15(fvec4)
26: TypePointer Output 25(PS_OUTPUT)
27(@entryPointOutput): 26(ptr) Variable Output
30: TypePointer Private 6(float)
31(precisefloat): 30(ptr) Variable Private
25: TypePointer Output 16(PS_OUTPUT)
26(@entryPointOutput): 25(ptr) Variable Output
29: TypePointer Private 6(float)
30(precisefloat): 29(ptr) Variable Private
4(main): 2 Function None 3
5: Label
18(ps_output): 17(ptr) Variable Function
24: 23(ptr) AccessChain 18(ps_output) 20
Store 24 22
28:16(PS_OUTPUT) Load 18(ps_output)
Store 27(@entryPointOutput) 28
27:16(PS_OUTPUT) Load 18(ps_output)
Store 26(@entryPointOutput) 27
Return
FunctionEnd
13(MyFunction(f1;vf3;): 2 Function None 10