HLSL: Do structure conversion for return type struct-punning on non-entry-point functions.
This commit is contained in:
19
Test/hlsl.multiReturn.frag
Executable file
19
Test/hlsl.multiReturn.frag
Executable file
@@ -0,0 +1,19 @@
|
||||
struct S {
|
||||
float f;
|
||||
float3 v;
|
||||
float3x3 m;
|
||||
};
|
||||
|
||||
cbuffer bufName {
|
||||
S s;
|
||||
};
|
||||
|
||||
S foo()
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
foo();
|
||||
}
|
||||
Reference in New Issue
Block a user