blob: 7a54fd82fe7dc76a39a3374a036fe0d59e488c8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Test passing a varying parameter direclty to an inout parameter.
//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage fragment
// CHECK: OpEntryPoint Fragment %main "main"
struct PS_IN
{
float3 pos : SV_Position;
float4 color : COLOR;
}
void test(inout PS_IN v)
{
v.color = v.color + v.pos.x;
}
[shader("fragment")]
float4 main(PS_IN psIn):SV_Target
{
test(psIn);
return psIn.color;
}
|