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:
@@ -45,7 +45,7 @@ gl_FragCoord origin is upper left
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -100,19 +100,19 @@ gl_FragCoord origin is upper left
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 46
|
||||
// Id's are bound by 47
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 43
|
||||
EntryPoint Fragment 4 "main" 44
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 6 "Test1("
|
||||
@@ -129,7 +129,10 @@ gl_FragCoord origin is upper left
|
||||
Name 34 "PS_OUTPUT"
|
||||
MemberName 34(PS_OUTPUT) 0 "color"
|
||||
Name 36 "ps_output"
|
||||
Name 43 "@entryPointOutput"
|
||||
Name 42 "PS_OUTPUT"
|
||||
MemberName 42(PS_OUTPUT) 0 "color"
|
||||
Name 44 "@entryPointOutput"
|
||||
Decorate 44(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
@@ -159,16 +162,17 @@ gl_FragCoord origin is upper left
|
||||
38: 37(int) Constant 0
|
||||
39: 33(fvec4) ConstantComposite 13 13 13 13
|
||||
40: TypePointer Function 33(fvec4)
|
||||
42: TypePointer Output 34(PS_OUTPUT)
|
||||
43(@entryPointOutput): 42(ptr) Variable Output
|
||||
42(PS_OUTPUT): TypeStruct 33(fvec4)
|
||||
43: TypePointer Output 42(PS_OUTPUT)
|
||||
44(@entryPointOutput): 43(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
36(ps_output): 35(ptr) Variable Function
|
||||
32: 2 FunctionCall 6(Test1()
|
||||
41: 40(ptr) AccessChain 36(ps_output) 38
|
||||
Store 41 39
|
||||
44:34(PS_OUTPUT) Load 36(ps_output)
|
||||
Store 43(@entryPointOutput) 44
|
||||
45:34(PS_OUTPUT) Load 36(ps_output)
|
||||
Store 44(@entryPointOutput) 45
|
||||
Return
|
||||
FunctionEnd
|
||||
6(Test1(): 2 Function None 3
|
||||
|
||||
Reference in New Issue
Block a user