I got a problem about intelockeded in HLSL compute shader. Here is my Code
RWTexture2D<uint> TileNum:register(u0);
//Texture size is same with all group size(Context->Dispantch(x,y,z))
[numthreads(32, 32, 1)]//max 1024
void main(uint3 TileIndex : SV_GROUPID)
{
uint src=0;
InterlockedAdd(TileLightNum[TileIndex.xy],1,src);
}
Then I read texture data to cpu. In fact,the number of thread of a group is 1024 (max).I suppose the every (x,y) coordinate value is 1024.But the value is 64(dedicated card) or 32(integrated card).can someone tell what happen in hlsl? Thank you so much!