I want to use memory groupsharedin DirectX Compute Shader to reduce global memory bandwidth and hopefully improve performance. My input is this Texture2D, and I can access it using 2D indexing as follows:
Input[threadID.xy]
I would like to have a 2D shared memory array for caching portions of the input, so I tried the obvious:
groupshared float SharedInput[32, 32];
It will not compile. The error message indicated syntax error: unexpected token ','.
Is there a way to have a 2D shared memory array? If not, what is a good method for working with 2D data stored in a 1D shared memory array?
source
share