Files
wgpu/naga/tests/out/hlsl/fetch_depth.hlsl
T
Jamie Nicol 30363ef493 [naga hlsl-out] Wrap int literals in constructor-style cast
There is no literal suffix in HLSL for the integer type. We can,
however, wrap integer literals in a constructor style cast. This
avoids ambiguity when passing literals to overloaded functions, which
we'll make use of in the subsequent patch in this PR.
2025-02-14 15:17:40 -08:00

26 lines
442 B
HLSL

struct type_2 {
float member;
};
struct type_4 {
uint2 member;
};
RWByteAddressBuffer global : register(u0);
ByteAddressBuffer global_1 : register(t1);
Texture2D<float> global_2 : register(t2);
void function()
{
uint2 _e6 = asuint(global_1.Load2(0));
float _e7 = global_2.Load(int3(_e6, int(0))).x;
global.Store(0, asuint((_e7).xxxx.x));
return;
}
[numthreads(32, 1, 1)]
void cullfetch_depth()
{
function();
}