Skip to content

Commit 81d8dc0

Browse files
committed
Added binary BVH
1 parent 01aa95a commit 81d8dc0

File tree

2 files changed

+90
-201
lines changed

2 files changed

+90
-201
lines changed

RadeonRays/src/intersector/intersector_lds.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ namespace RadeonRays
123123
if (device->GetPlatform() == Calc::Platform::kOpenCL)
124124
{
125125
m_gpuData->bvh_prog.executable = m_device->CompileExecutable(g_intersect_bvh2_lds_opencl, std::strlen(g_intersect_bvh2_lds_opencl), buildopts.c_str());
126-
m_gpuData->qbvh_prog.executable = m_device->CompileExecutable(g_intersect_bvh2_lds_fp16_opencl, std::strlen(g_intersect_bvh2_lds_opencl), buildopts.c_str());
126+
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());
127127
}
128128
#endif
129129
#if USE_VULKAN
@@ -161,7 +161,7 @@ namespace RadeonRays
161161
auto nbins = world.options_.GetOption("bvh.sah.num_bins");
162162
auto tcost = world.options_.GetOption("bvh.sah.traversal_cost");
163163

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

@@ -207,7 +207,7 @@ namespace RadeonRays
207207

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

212212
// Unmap gpu data
213213
m_device->UnmapBuffer(m_gpuData->bvh, 0, bvhdata, &e);

0 commit comments

Comments
 (0)