A Question cuda Texture Edit

Hi all,

I’m searching for a way to Edit Texture Values on the GPU. I mean that i want to change/Edit the texture values after I pass them from the CPU to the GPU.

If Fetching the Texture value is

[codebox]

sample = tex3D(tex,x,y,z);

[/codebox]

I Want to implement a function to enable

[codebox]

tex3D(tex,x,y,z)=sample;

[/codebox]

I’m not sure if this is applicable or not. But if Not can I Get the array associated with my Texture and edit it? Will this editing be reflected to the texture or not?

I’m using the Driver API. So I Appreciate if anyone can forward a useful link or suggest a solution .

Thanks

IMHO you can only change texture values if you’re texturing from linear memory (because you can’t write to cuda arrays) but since it’s also being cached the values written in linear memory and the ones in cache are not necessarily coherent. In other words, you won’t be able to use the completely updated result until a second kernel invocation while it’s possible that you sample updated results in the kernel itself depending on whether the updated line was in cache or not.

N.