HLSL: Handle flattened I/O structs passed to function *out* parameters.

This commit is contained in:
John Kessenich
2016-10-01 17:11:21 -06:00
parent c86d38bb2b
commit d8fe2ca8e5
4 changed files with 270 additions and 197 deletions

View File

@@ -3,6 +3,12 @@ struct OutParam {
int2 i;
};
void fun(out OutParam op)
{
op.v = float2(0.4);
op.i = int2(7);
}
float4 PixelShaderFunction(float4 input, out float4 out1, out OutParam out2, out OutParam out3) : COLOR0
{
out1 = input;
@@ -11,7 +17,7 @@ float4 PixelShaderFunction(float4 input, out float4 out1, out OutParam out2, out
OutParam local;
local.v = 12.0;
local.i = 13;
out3 = local;
fun(out3);
return out1;
}