Fix NanoVDBLoader: reset command list before use
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user