HLSL: Start location numbering with the entry-point return value.
Also, increment location numbers by the size of the objects.
This commit is contained in:
@@ -60,7 +60,7 @@ gl_FragCoord origin is upper left
|
||||
0:18 'r07' (temp int)
|
||||
0:19 Sequence
|
||||
0:19 move second child to first child (temp structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float color})
|
||||
0:19 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:19 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -130,19 +130,19 @@ gl_FragCoord origin is upper left
|
||||
0:18 'r07' (temp int)
|
||||
0:19 Sequence
|
||||
0:19 move second child to first child (temp structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float color})
|
||||
0:19 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:19 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 43
|
||||
// Id's are bound by 44
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 40
|
||||
EntryPoint Fragment 4 "main" 41
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r00"
|
||||
@@ -157,7 +157,10 @@ gl_FragCoord origin is upper left
|
||||
Name 30 "PS_OUTPUT"
|
||||
MemberName 30(PS_OUTPUT) 0 "color"
|
||||
Name 32 "ps_output"
|
||||
Name 40 "@entryPointOutput"
|
||||
Name 39 "PS_OUTPUT"
|
||||
MemberName 39(PS_OUTPUT) 0 "color"
|
||||
Name 41 "@entryPointOutput"
|
||||
Decorate 41(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -179,8 +182,9 @@ gl_FragCoord origin is upper left
|
||||
31: TypePointer Function 30(PS_OUTPUT)
|
||||
33: 19(int) Constant 0
|
||||
37: TypePointer Function 29(fvec4)
|
||||
39: TypePointer Output 30(PS_OUTPUT)
|
||||
40(@entryPointOutput): 39(ptr) Variable Output
|
||||
39(PS_OUTPUT): TypeStruct 29(fvec4)
|
||||
40: TypePointer Output 39(PS_OUTPUT)
|
||||
41(@entryPointOutput): 40(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r00): 7(ptr) Variable Function
|
||||
@@ -207,7 +211,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
|
||||
41:30(PS_OUTPUT) Load 32(ps_output)
|
||||
Store 40(@entryPointOutput) 41
|
||||
42:30(PS_OUTPUT) Load 32(ps_output)
|
||||
Store 41(@entryPointOutput) 42
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user