Skip to content

Commit

Permalink
Added binary BVH
Browse files Browse the repository at this point in the history
  • Loading branch information
gboisse committed Jan 22, 2018
1 parent 01aa95a commit 81d8dc0
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 201 deletions.
6 changes: 3 additions & 3 deletions RadeonRays/src/intersector/intersector_lds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace RadeonRays
if (device->GetPlatform() == Calc::Platform::kOpenCL)
{
m_gpuData->bvh_prog.executable = m_device->CompileExecutable(g_intersect_bvh2_lds_opencl, std::strlen(g_intersect_bvh2_lds_opencl), buildopts.c_str());
m_gpuData->qbvh_prog.executable = m_device->CompileExecutable(g_intersect_bvh2_lds_fp16_opencl, std::strlen(g_intersect_bvh2_lds_opencl), buildopts.c_str());
m_gpuData->qbvh_prog.executable = m_device->CompileExecutable(g_intersect_bvh2_lds_fp16_opencl, std::strlen(g_intersect_bvh2_lds_fp16_opencl), buildopts.c_str());
}
#endif
#if USE_VULKAN
Expand Down Expand Up @@ -161,7 +161,7 @@ namespace RadeonRays
auto nbins = world.options_.GetOption("bvh.sah.num_bins");
auto tcost = world.options_.GetOption("bvh.sah.traversal_cost");

bool use_qbvh = true, use_sah = false;
bool use_qbvh = false, use_sah = false;
int num_bins = (nbins ? static_cast<int>(nbins->AsFloat()) : 64);
float traversal_cost = (tcost ? tcost->AsFloat() : 10.0f);

Expand Down Expand Up @@ -207,7 +207,7 @@ namespace RadeonRays

// Copy BVH data
for (std::size_t i = 0; i < bvh.m_nodecount; ++i)
bvhdata[i++] = bvh.m_nodes[i];
bvhdata[i] = bvh.m_nodes[i];

// Unmap gpu data
m_device->UnmapBuffer(m_gpuData->bvh, 0, bvhdata, &e);
Expand Down
Loading

0 comments on commit 81d8dc0

Please sign in to comment.