wgpu/naga/tests/out/hlsl/dualsource.hlsl
Jim Blandy 92287c30b5 [naga hlsl-out] Use Baked for baked expressions.
Make the HLSL backend more like other backends by using `back::Baked`
to generate names for baked expression identifiers. This removes the
final uses of `Handle::index` from the HLSL backend.

This is separated out from the previous commit because it changes lots
of snapshot tests, whereas the previous commit has no effect on Naga's
output.
2024-06-21 09:56:40 +02:00

28 lines
696 B
HLSL

struct FragmentOutput {
float4 color : SV_Target0;
float4 mask : SV_Target1;
};
struct FragmentInput_main {
float4 position_1 : SV_Position;
};
FragmentOutput ConstructFragmentOutput(float4 arg0, float4 arg1) {
FragmentOutput ret = (FragmentOutput)0;
ret.color = arg0;
ret.mask = arg1;
return ret;
}
FragmentOutput main(FragmentInput_main fragmentinput_main)
{
float4 position = fragmentinput_main.position_1;
float4 color = float4(0.4, 0.3, 0.2, 0.1);
float4 mask = float4(0.9, 0.8, 0.7, 0.6);
float4 _e13 = color;
float4 _e14 = mask;
const FragmentOutput fragmentoutput = ConstructFragmentOutput(_e13, _e14);
return fragmentoutput;
}