https://github.com/shader-slang/slang
Raw File
Tip revision: 9dfaabe0fbcc9ac7314f84bde89c658b276298e3 authored by Theresa Foley on 25 June 2021, 22:50:29 UTC
Fixes related to combined texture/sampler types (#1894)
Tip revision: 9dfaabe
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