https://github.com/shader-slang/slang
Raw File
Tip revision: 1f3130055956dbe441f7fc6849b189624a05f7df authored by Yong He on 01 September 2022, 17:01:36 UTC
Public interface for arithmetic types in stdlib. (#2389)
Tip revision: 1f31300
vk-image-atomics.slang
//TEST:CROSS_COMPILE: -profile ps_5_0 -entry main -target spirv-assembly

// Ensure that we can lower to `imageAtomicAdd` correctly.

RWTexture2D<uint> t;

float4 main() : SV_Target
{
	uint u;
	InterlockedAdd(t[uint2(0)], 1, u);
	return u;
}
back to top