Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 3dgs/GSScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class GSScene {
public:
explicit GSScene(const std::string& filename)
: filename(filename) {
std::filesystem::path file = std::filesystem::current_path() / filename;
if (!std::filesystem::exists(file)) {
throw std::runtime_error("File does not exist");
// check if file exists
if (!std::filesystem::exists(filename)) {
throw std::runtime_error("File does not exist: " + filename);
}
}

Expand Down
5 changes: 4 additions & 1 deletion 3dgs/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "../vulkan/Utils.h"

#define SORT_ALLOCATE_MULTIPLIER 100
#define SORT_ALLOCATE_MULTIPLIER 10

void Renderer::initialize() {
initializeVulkan();
Expand Down Expand Up @@ -446,6 +446,9 @@ void Renderer::recordRenderCommandBuffer(uint32_t currentFrame) {

uint32_t numInstances = totalSumBufferHost->readOne<uint32_t>();
// std::cout << "Num instances: " << numInstances << std::endl;
if (numInstances > scene->getNumVertices() * SORT_ALLOCATE_MULTIPLIER) {
throw std::runtime_error("Gaussian instantiation out of memory");
}
assert(numInstances <= scene->getNumVertices() * SORT_ALLOCATE_MULTIPLIER);
for (auto i = 0; i < 8; i++) {
sortHistPipeline->bind(renderCommandBuffer, 0, i % 2 == 0 ? 0 : 1);
Expand Down