Closed 9MW closed 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
more test needed
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