tex3D always return zeros

Hello everyone!

I’m trying to bind a CUtexref to an CUarray, I followed the example simpleTextureDrv, all api return CUDA_SUCCESS result, but it just can’t get the right values. External Image

Here is the code detail: [url=“The Official NVIDIA Forums | NVIDIA”]The Official NVIDIA Forums | NVIDIA

I really need your help, thanks very much!

Use Z,Y,X as inputs…rather than X,Y,Z

Hi Sarnath! I tried but still zeros.

The so long codes make a 222 volume data with the element values (1, 2, 4, 8, 16, 32, 64, 128), and I also verified the array by copy it back.

So I think tex3D( t3d, x, y, z ) or tex3D( t3d, z, y, x ) just could’t be 0, anyway, am I right?

i have meet the same problem!