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

@@ -137,12 +137,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 44
// Id's are bound by 43
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 41
EntryPoint Fragment 4 "main" 40
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "r00"
@@ -157,10 +157,8 @@ gl_FragCoord origin is upper left
Name 30 "PS_OUTPUT"
MemberName 30(PS_OUTPUT) 0 "color"
Name 32 "ps_output"
Name 39 "PS_OUTPUT"
MemberName 39(PS_OUTPUT) 0 "color"
Name 41 "@entryPointOutput"
Decorate 41(@entryPointOutput) Location 0
Name 40 "@entryPointOutput"
Decorate 40(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -182,9 +180,8 @@ gl_FragCoord origin is upper left
31: TypePointer Function 30(PS_OUTPUT)
33: 19(int) Constant 0
37: TypePointer Function 29(fvec4)
39(PS_OUTPUT): TypeStruct 29(fvec4)
40: TypePointer Output 39(PS_OUTPUT)
41(@entryPointOutput): 40(ptr) Variable Output
39: TypePointer Output 30(PS_OUTPUT)
40(@entryPointOutput): 39(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(r00): 7(ptr) Variable Function
@@ -211,7 +208,7 @@ gl_FragCoord origin is upper left
36: 29(fvec4) CompositeConstruct 35 35 35 35
38: 37(ptr) AccessChain 32(ps_output) 33
Store 38 36
42:30(PS_OUTPUT) Load 32(ps_output)
Store 41(@entryPointOutput) 42
41:30(PS_OUTPUT) Load 32(ps_output)
Store 40(@entryPointOutput) 41
Return
FunctionEnd