Can't run kernel in D3D with back buffer larger than 512x600! CUDA problem with D3D!

Hi everyone!

When developing my project, i discovered that my app can not run the kernel if back buffer is larger than 512x600! If i increase the size (512x601), the kernel dont run at all! I believe that this’s not kernel problem because it’s very simple:

__global__ void kernel(unsigned int* p)

{

unsigned int* idx = blockIdx.x*gridDim.x + threadIdx.x;

p[idx] = 0x7f7f7f7f;

}

I registered and mapped back buffer(pD3DDevice->GetBackBuffer()) with no error! And get correct result with the size smaller or equal with 512x600!

Thank!

How are you calling the kernel? the maximum number of threads per block is 512.

kernel<<32,128>(dptr);

I think there’s no problem here T_T!

I tested with vertex buffer and using texture too, it works normally! But these two have very bad performance T_T (compare with using Back buffer, 4 → 6 time slower)!