I’m attempting to use mipmapped block compressed textures in CUDA 11.3, specifically the BC7 and BC5 formats.
The issue is that I’m unable to use enable linear filtering when using block compressed textures, which is a deal-breaker for my use case (and I’d prefer not to implement linear filtering manually in software, especially across mipmaps).
When creating the cudaTextureObject_t, I get the following error: “linear filtering not supported for non-float type.”
The issue seems to be the cudaChannelFormatDesc the underlying cudaArray_t is created with. Specifically, the cudaResourceViewDesc documentation indicates that for block compressed formats the cudaChannelFormatDesc should be configured as 32 bits per channel, of unsigned format (so uint4, for BC5 and BC7). The 32 bit uint type seems to be incompatible with linear filtering, hence the error message.
Is there any workaround for this issue or a different API than cudaCreateTextureObject that works properly for block compressed textures? The hardware is certainly capable of linear filtering on the block compressed formats, as it can easily be done in D3D12 / Vulkan.