SPV: Flatten structs for copy when they are GLSL type aliases.
Addresses issue #304 and issue #307 by replacing unmatched type OpStores with per-member copies. Covers assignment statements and most argument passing, but does not yet cover r-value-based argument passing.
This commit is contained in:
parent
31207bc20a
commit
4bf7155051
7 changed files with 455 additions and 26 deletions
21
Test/spv.multiStructFuncall.frag
Executable file
21
Test/spv.multiStructFuncall.frag
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#version 450
|
||||
|
||||
struct S { mat4 m; };
|
||||
buffer blockName { S s1; }; // need an S with decoration
|
||||
S s2; // no decorations on S
|
||||
|
||||
void fooConst(const in S s) { }
|
||||
void foo(in S s) { }
|
||||
void fooOut(inout S s) { }
|
||||
|
||||
void main()
|
||||
{
|
||||
fooConst(s1);
|
||||
fooConst(s2);
|
||||
|
||||
foo(s1);
|
||||
foo(s2);
|
||||
|
||||
fooOut(s1);
|
||||
fooOut(s2);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue