The dispatch default parameter for compute shaders is set to (64, 64, 1), the local size is set to (8, 8) and the resolution of the texture is 256x256. But the resulting area coverage of that setting is 512x512, not the default 256x256. So, to be consistent, I think the default setting for the dispatch should be (32, 32, 1).
Attached an example that shows a potential problem when calculating the 1D index of each thread in the pixel. The first pixel of the second row of pixels (counting from the bottom) should have a value of 256, but it gives 512, since the dimensions of the shader are not correct:
Hope that makes sense.
ComputeShaderDispatch.tox (7.7 KB)