Skip to content

Commit 56fb1d2

Browse files
committed
lib: Unlock bvh_lock when exiting interactive mode
I didn't notice this goto when I adjusted the scope for acquiring the lock.
1 parent c05cba0 commit 56fb1d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/renderer/renderer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,10 @@ void *render_thread_interactive(void *arg) {
366366
thread_rwlock_rdlock(r->scene->bvh_lock);
367367
for (int y = tile->end.y - 1; y > tile->begin.y - 1; --y) {
368368
for (int x = tile->begin.x; x < tile->end.x; ++x) {
369-
if (r->state.s != r_rendering) goto exit;
369+
if (r->state.s != r_rendering) {
370+
thread_rwlock_unlock(r->scene->bvh_lock);
371+
goto exit;
372+
}
370373
uint32_t pixIdx = (uint32_t)(y * (*buf)->width + x);
371374
//FIXME: This does not converge to the same result as with regular renderThread.
372375
//I assume that's because we'd have to init the sampler differently when we render all

0 commit comments

Comments
 (0)