blob: 647f6a6a2d65bef411fd63efdc7969ce2b199b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main
// Make sure we don't crash when desugaring resources
// in structs when a `cbuffer` only contains resources.
#ifdef __SLANG__
cbuffer C
{
Texture2D t;
SamplerState s;
};
float4 main(float2 uv: UV) : SV_Target
{
return t.Sample(s, uv);
}
#else
Texture2D C_t_0 : register(t0);
SamplerState C_s_0 : register(s0);
float4 main(float2 uv: UV) : SV_TARGET
{
return C_t_0.Sample(C_s_0, uv);
}
#endif
|