NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs
Other
672 stars 144 forks source link

Missing case for T_FLOAT4 in AllocateTextureGPU #123

Open wouterraateland opened 3 years ago

wouterraateland commented 3 years ago

The project throws an "invalid configuration" error when adding a float4 channel to a gvdb instance. This seems to be due to the function Allocator::AllocateTextureGPU, located in gvdb_allocator.cpp.

Adding the following lines in the switch statements above the call to cuArray3DCreate fixes the problem for me:

case T_FLOAT4:
      desc.Format = CU_AD_FORMAT_FLOAT;
      desc.NumChannels = 4;
      break;

I'm just getting started with GVDB, so perhaps I'm making another mistake, but I thought It'd be good to bring this simple fix to you attention anyway.