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

@ -59,12 +59,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 26
// Id's are bound by 25
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 23
EntryPoint Fragment 4 "main" 22
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 6 "MyFunc("
@ -72,10 +72,8 @@ gl_FragCoord origin is upper left
Name 12 "PS_OUTPUT"
MemberName 12(PS_OUTPUT) 0 "color"
Name 14 "ps_output"
Name 21 "PS_OUTPUT"
MemberName 21(PS_OUTPUT) 0 "color"
Name 23 "@entryPointOutput"
Decorate 23(@entryPointOutput) Location 0
Name 22 "@entryPointOutput"
Decorate 22(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
10: TypeFloat 32
@ -87,16 +85,15 @@ gl_FragCoord origin is upper left
17: 10(float) Constant 1065353216
18: 11(fvec4) ConstantComposite 17 17 17 17
19: TypePointer Function 11(fvec4)
21(PS_OUTPUT): TypeStruct 11(fvec4)
22: TypePointer Output 21(PS_OUTPUT)
23(@entryPointOutput): 22(ptr) Variable Output
21: TypePointer Output 12(PS_OUTPUT)
22(@entryPointOutput): 21(ptr) Variable Output
4(main): 2 Function None 3
5: Label
14(ps_output): 13(ptr) Variable Function
20: 19(ptr) AccessChain 14(ps_output) 16
Store 20 18
24:12(PS_OUTPUT) Load 14(ps_output)
Store 23(@entryPointOutput) 24
23:12(PS_OUTPUT) Load 14(ps_output)
Store 22(@entryPointOutput) 23
Return
FunctionEnd
6(MyFunc(): 2 Function None 3