Linear Filtering on Integer Textures


I have a 3D texture of size 320^3 and format 16-bit signed integer. I’m writing to it using surf3DWrite and reading from it in another kernel using tex3D. When I use a point filter in the latter kernel, everything displays fine. When I use a linear filter it doesn’t, seemingly working on random texels here and there.

The programming guide says linear filtering is only available on floating point textures:

However, I’ve seen various references to the notion that the data is allowed to be integer as long as your read mode is cudaReadModeNormalizedFloat. Is this true? It certainly doesn’t seem to be from the results I’m getting.


  • Don

The odd thing is, it “appears” to work with a 32^3 texture even with cudaReadModeElementType. As soon as I start passing higher texture co-ordinates, it all breaks down again.

There’s an awful lot of permutations of this to work through, here.

CU_AD_FORMAT_SIGNED_INT8 with 0 texture flags and cudaReadModeNormalizedFloat works.

Is there any confirmation that signed 16-bit will ever work? (as it can do with GL_R16).


  • Don