NVIDIA / gvdb-voxels

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

GVDB CUDA ERROR with T_UCHAR channel in UpdateAtlas() -> Allocator::AllocateTextureGPU #124

Open soerenPeters opened 2 years ago

soerenPeters commented 2 years ago

I created a little gvdb application for further custom computations on the gpu. The program crashes when gvdb.UpdateAtlas(); is called after all setup is done. The error code is the following:

GVDB CUDA ERROR:
  Launch status: no error
  Kernel status: misaligned address
  Caller: Allocator::AllocateTextureGPU
  Call:   cuLaunch
  Args:   cuFillTex
  Generating assert so you can examine call stack.

My code is basically that:

    VolumeGVDB gvdb;
    gvdb.SetDebug(true);
    gvdb.SetVerbose(true);
    gvdb.SetCudaDevice(GVDB_DEV_FIRST);

    gvdb.Initialize();

    gvdb.Configure(3,3,3,3,3);

    gvdb.AddChannel(0, T_UCHAR, 0);

    const int nx = 64;
    const int ny = 64;
    const int nz = 64;

    for (int z = 0; z < nz; z++) {
        for (int y = 0; y < ny; y++) {
            for (int x = 0; x < nx; x++) {
                Vector3DF pos = Vector3DF(x,y,z);
                int64_t id = gvdb.ActivateSpace(pos);
            }
        }
    }

    gvdb.FinishTopology();
    gvdb.UpdateAtlas();

The same code works perfectly, when i replace the T_UCHAR with a T_FLOAT in gvdb.AddChannel(0, T_UCHAR, 0);

Does anyone have an idea what I'm doing wrong here?