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

@@ -131,12 +131,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 57
// Id's are bound by 56
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 45 54
EntryPoint Fragment 4 "main" 45 53
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 12 "MyFunc(f1;f1;f1;"
@@ -154,15 +154,11 @@ gl_FragCoord origin is upper left
MemberName 31(PS_OUTPUT) 1 "Depth"
Name 33 "psout"
Name 45 "inpos"
Name 52 "PS_OUTPUT"
MemberName 52(PS_OUTPUT) 0 "Color"
MemberName 52(PS_OUTPUT) 1 "Depth"
Name 54 "@entryPointOutput"
Name 53 "@entryPointOutput"
MemberDecorate 31(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 45(inpos) NoPerspective
Decorate 45(inpos) BuiltIn FragCoord
MemberDecorate 52(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 54(@entryPointOutput) Location 0
Decorate 53(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -184,9 +180,8 @@ gl_FragCoord origin is upper left
46: TypeInt 32 0
47: 46(int) Constant 3
48: TypePointer Input 6(float)
52(PS_OUTPUT): TypeStruct 30(fvec4) 6(float)
53: TypePointer Output 52(PS_OUTPUT)
54(@entryPointOutput): 53(ptr) Variable Output
52: TypePointer Output 31(PS_OUTPUT)
53(@entryPointOutput): 52(ptr) Variable Output
4(main): 2 Function None 3
5: Label
17(x): 7(ptr) Variable Function
@@ -217,8 +212,8 @@ gl_FragCoord origin is upper left
50: 6(float) Load 49
51: 7(ptr) AccessChain 33(psout) 43
Store 51 50
55:31(PS_OUTPUT) Load 33(psout)
Store 54(@entryPointOutput) 55
54:31(PS_OUTPUT) Load 33(psout)
Store 53(@entryPointOutput) 54
Return
FunctionEnd
12(MyFunc(f1;f1;f1;): 2 Function None 8