Texture functions documentation ?

Hi.

I am trying to find some documentation about tex2DGrad and tex2DLod.

For example, can I use tex2DGrad with mip-mapped bindless textures ? Will it make proper filtering or I can use only tex2DLod ?
If tex2DGrad is not supposed to work properly with mip-mapped bindless textures, is there any other texture function that I can use to make CUDA filter the texture for me ?

Basically, I could not find any documentation (neither in the .pdf that comes with the SDK, neither in bing/google/duckduckgo) … There is one example with tex2DLod, yet I only can guess what it is doing.

Thanks !

Probably this is rather apocryphal …

Good question. It turns out these functions are still in development, hence we haven’t documented them officially. They are in the 6.0 toolkit (and the previous one) in an early form. We plan to finish up the development and testing and at that point, we will add the documentation to the official toolkit release. In the meantime, if you want, you are free to use these functions in their current state. They are basically analogs of two related GLSL functions, textureLod and textureGrad, which are documented here: http://www.opengl.org/registry/doc/GLSLangSpec.4.40.pdf . You can use that documentation as a guide to the functions you reference in the CUDA Toolkit. I can’t make any guarantees since we don’t officially support them yet, but they may serve your purposes for the moment.

Sorry for digging this up, but I have problems with compiling a program using tex2DLayeredLod and texture references (the sample uses texture objects).

The compiler tells me:

ptxas fatal   : Unresolved extern function '__utexfetchlodl2D'

this is how i call tex2DLayeredLod

texture<uchar4,  cudaTextureType2DLayered,  cudaReadModeNormalizedFloat> textureReference;
//..
tex2DLayeredLod(textureReference, u, v, textureLayerIndex, 0)

I looked into texture_fetch_functions.h

..

template<class T, int texType, enum cudaTextureReadMode readMode> extern __device__ __device_builtin__  uint4 __utexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));

..

static __forceinline__ __device__ float4 tex2DLayeredLod(texture<float4, cudaTextureType2DLayered, cudaReadModeElementType> t, float x, float y, int layer, float level) {
  float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
  return make_float4(v.x, v.y, v.z, v.w);
}

..

extern  uint4 __utexfetchlodl2D(unsigned long long, float4, int, float);

I’ve googled for the error message, but nothing is shown. But when googling only for “ptxas fatal : Unresolved extern function”, there are a lot of hits about a missing nvcc option for dynamic parallelism.

So my theory is, that I’m missing this option and that it is secret :) Is this correct and could you reveal that option? Or is it something else?

I have Cuda 6.5, Win7 and a Gf GTX550Ti (CC 2.1)