Fix NanoVDBLoader: reset command list before use

This commit is contained in:
2026-03-11 18:13:36 +08:00
parent 436ead8b34
commit 8a800f99a2
3 changed files with 16 additions and 5 deletions

View File

@@ -8,8 +8,13 @@
#include <cstring>
#include <iostream>
bool LoadNanoVDB(const char* filePath, NanoVDBData& outData, ID3D12GraphicsCommandList* cmdList) {
bool LoadNanoVDB(const char* filePath, NanoVDBData& outData, ID3D12GraphicsCommandList* cmdList, ID3D12CommandAllocator* cmdAlloc) {
try {
if (cmdAlloc && cmdList) {
cmdAlloc->Reset();
cmdList->Reset(cmdAlloc, nullptr);
}
nanovdb::GridHandle<nanovdb::HostBuffer> gridHandle = nanovdb::io::readGrid(filePath);
const uint64_t byteSize = gridHandle.buffer().bufferSize();