Files
wgpu/naga/tests/out/hlsl/atomicTexture-int64.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

18 lines
427 B
HLSL

struct NagaConstants {
int first_vertex;
int first_instance;
uint other;
};
ConstantBuffer<NagaConstants> _NagaConstants: register(b0, space1);
RWTexture2D<uint64_t> image : register(u0);
[numthreads(2, 1, 1)]
void cs_main(uint3 id : SV_GroupThreadID)
{
InterlockedMax(image[int2(int(0), int(0))],1uL);
GroupMemoryBarrierWithGroupSync();
InterlockedMin(image[int2(int(0), int(0))],1uL);
return;
}