DiligentGraphics / DiligentEngine

A modern cross-platform low-level graphics library and rendering framework
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
3.63k stars 331 forks source link

atomic operation not work on texture2d<uint> #211

Closed 9MW closed 2 years ago

9MW commented 2 years ago

ShaderCI.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; ShaderCI.ShaderCompiler = SHADER_COMPILER_DXC;

RWTexture2D GroupIdMap; [numthreads(THREAD_GROUP_SIZE, 1, 1)] void WriteGMap(uint3 Gid : SV_GroupID, uint3 GTid : SV_GroupThreadID) { uint orv = 1 << (GTid.x % 32); InterlockedOr(GroupIdMap[xel.xy], orv);

}

GroupIdMap[xel.xy] is 1073741824

9MW commented 2 years ago

more test needed