NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing case for T_FLOAT4 in AllocateTextureGPU

wouterraateland opened this issue · comments

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.