Do true SPV type check for function array arg linkage
Previous check was missing type difference between uniform array actual arg with stride decoration and the formal arg without. Now does logical or component-wise copy where needed. Fixes #2637
This commit is contained in:
parent
e71278cc92
commit
11c24e9adb
8 changed files with 308 additions and 100 deletions
|
|
@ -1,12 +1,12 @@
|
|||
spv.1.4.OpCopyLogical.funcall.frag
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 60
|
||||
// Id's are bound by 59
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 25 37
|
||||
EntryPoint Fragment 4 "main" 25 36
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 450
|
||||
Name 4 "main"
|
||||
|
|
@ -23,14 +23,12 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||
Name 23 "blockName"
|
||||
MemberName 23(blockName) 0 "s1"
|
||||
Name 25 ""
|
||||
Name 31 "S"
|
||||
MemberName 31(S) 0 "m"
|
||||
Name 32 "arg"
|
||||
Name 37 "s2"
|
||||
Name 40 "param"
|
||||
Name 45 "param"
|
||||
Name 48 "param"
|
||||
Name 56 "param"
|
||||
Name 31 "arg"
|
||||
Name 36 "s2"
|
||||
Name 39 "param"
|
||||
Name 44 "param"
|
||||
Name 47 "param"
|
||||
Name 55 "param"
|
||||
MemberDecorate 22(S) 0 ColMajor
|
||||
MemberDecorate 22(S) 0 Offset 0
|
||||
MemberDecorate 22(S) 0 MatrixStride 16
|
||||
|
|
@ -38,7 +36,6 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||
Decorate 23(blockName) Block
|
||||
Decorate 25 DescriptorSet 0
|
||||
Decorate 25 Binding 0
|
||||
MemberDecorate 31(S) 0 ColMajor
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -55,46 +52,45 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||
26: TypeInt 32 1
|
||||
27: 26(int) Constant 0
|
||||
28: TypePointer StorageBuffer 22(S)
|
||||
31(S): TypeStruct 8
|
||||
36: TypePointer Private 9(S)
|
||||
37(s2): 36(ptr) Variable Private
|
||||
35: TypePointer Private 9(S)
|
||||
36(s2): 35(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
32(arg): 14(ptr) Variable Function
|
||||
40(param): 14(ptr) Variable Function
|
||||
45(param): 14(ptr) Variable Function
|
||||
48(param): 14(ptr) Variable Function
|
||||
56(param): 14(ptr) Variable Function
|
||||
31(arg): 14(ptr) Variable Function
|
||||
39(param): 14(ptr) Variable Function
|
||||
44(param): 14(ptr) Variable Function
|
||||
47(param): 14(ptr) Variable Function
|
||||
55(param): 14(ptr) Variable Function
|
||||
29: 28(ptr) AccessChain 25 27
|
||||
30: 22(S) Load 29
|
||||
33: 9(S) CopyLogical 30
|
||||
Store 32(arg) 33
|
||||
34: 9(S) Load 32(arg)
|
||||
35: 2 FunctionCall 12(fooConst(struct-S-mf441;) 34
|
||||
38: 9(S) Load 37(s2)
|
||||
39: 2 FunctionCall 12(fooConst(struct-S-mf441;) 38
|
||||
41: 28(ptr) AccessChain 25 27
|
||||
42: 22(S) Load 41
|
||||
43: 9(S) CopyLogical 42
|
||||
Store 40(param) 43
|
||||
44: 2 FunctionCall 17(foo(struct-S-mf441;) 40(param)
|
||||
46: 9(S) Load 37(s2)
|
||||
Store 45(param) 46
|
||||
47: 2 FunctionCall 17(foo(struct-S-mf441;) 45(param)
|
||||
49: 28(ptr) AccessChain 25 27
|
||||
50: 22(S) Load 49
|
||||
51: 9(S) CopyLogical 50
|
||||
Store 48(param) 51
|
||||
52: 2 FunctionCall 20(fooOut(struct-S-mf441;) 48(param)
|
||||
53: 9(S) Load 48(param)
|
||||
54: 28(ptr) AccessChain 25 27
|
||||
55: 22(S) CopyLogical 53
|
||||
Store 54 55
|
||||
57: 9(S) Load 37(s2)
|
||||
Store 56(param) 57
|
||||
58: 2 FunctionCall 20(fooOut(struct-S-mf441;) 56(param)
|
||||
59: 9(S) Load 56(param)
|
||||
Store 37(s2) 59
|
||||
32: 9(S) CopyLogical 30
|
||||
Store 31(arg) 32
|
||||
33: 9(S) Load 31(arg)
|
||||
34: 2 FunctionCall 12(fooConst(struct-S-mf441;) 33
|
||||
37: 9(S) Load 36(s2)
|
||||
38: 2 FunctionCall 12(fooConst(struct-S-mf441;) 37
|
||||
40: 28(ptr) AccessChain 25 27
|
||||
41: 22(S) Load 40
|
||||
42: 9(S) CopyLogical 41
|
||||
Store 39(param) 42
|
||||
43: 2 FunctionCall 17(foo(struct-S-mf441;) 39(param)
|
||||
45: 9(S) Load 36(s2)
|
||||
Store 44(param) 45
|
||||
46: 2 FunctionCall 17(foo(struct-S-mf441;) 44(param)
|
||||
48: 28(ptr) AccessChain 25 27
|
||||
49: 22(S) Load 48
|
||||
50: 9(S) CopyLogical 49
|
||||
Store 47(param) 50
|
||||
51: 2 FunctionCall 20(fooOut(struct-S-mf441;) 47(param)
|
||||
52: 9(S) Load 47(param)
|
||||
53: 28(ptr) AccessChain 25 27
|
||||
54: 22(S) CopyLogical 52
|
||||
Store 53 54
|
||||
56: 9(S) Load 36(s2)
|
||||
Store 55(param) 56
|
||||
57: 2 FunctionCall 20(fooOut(struct-S-mf441;) 55(param)
|
||||
58: 9(S) Load 55(param)
|
||||
Store 36(s2) 58
|
||||
Return
|
||||
FunctionEnd
|
||||
12(fooConst(struct-S-mf441;): 2 Function None 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue