Why is there a CU_TR_ADDRESS_MODE_MIRROR and no cudaAddressModeMirror? Is mirroring not supported or is only the identifier in the enumeration missing? DirectX seems to support this addressing mode, OpenGL somehow not.
Since CU_TR_ADDRESS_MODE_CLAMP has the same enum index as cudaAddressModeClamp and CU_TR_ADDRESS_MODE_WRAP has the same as cudaAddressModeWrap, I tried the following hack to enable “cudaAddressModeMirror”, based on the enum index for CU_TR_ADDRESS_MODE_MIRROR:
tex.addressMode = (cudaTextureAddressMode)2; tex.addressMode = (cudaTextureAddressMode)2;
However, it didn’t work.
Now that CUDA 3.0 has been released, still without “cudaAddressModeMirror”, I’ll bump this thread in the hopes of getting this onto nVidia’s radar. The hardware has a mirror addressing mode but it is only available through the Driver API, not through the Runtime API. This is as opposed to the “clamp” and “wrap” addressing modes, which are available through both. Would it be possible to have this discrepancy addressed or at least get a rationale for the current behavior?
It’s in 3.1.
That is awesome. Thanks!