I’m just starting with CUDA 2.0, having programmed GPUs with Direct3D and HLSL for some time.
I’ve been reading the Programming Guide, but so far I haven’t seen anything that answers the following question.
I can read from texture memory in a kernel by declaring a texture reference, allocating an array, binding the texture reference to the array, and finally using the tex?D functions within the kernel. Great.
What I’d like to do next is to write to a texture inside a kernel function.
I’m used to doing this in Direct3D by rendering some geometry to a render target with a pixel shader that outputs the required value. This causes the pixel shader output to be written to a texture.
What is the equivalent paradigm within CUDA? How does one write to texture memory within a kernel?
Many thanks.