The following code crashes the compiler. Expected behavior is an error that Struct cannot be used as Texture2D template argument.
struct PSInput
{
float2 uv : TEXCOORD0;
};
struct Struct
{
float x;
};
Texture2D<Struct> t;
SamplerState s;
float4 PSMain(PSInput input) : SV_TARGET
{
return float4(t.GatherRed( s, input.uv), 0, 0, 0);
}
dxc -T ps_6_0 -E PSMain test.hlsl.
The following code crashes the compiler. Expected behavior is an error that Struct cannot be used as Texture2D template argument.
dxc -T ps_6_0 -E PSMain test.hlsl.