Skip to content

Commit be2f74a

Browse files
author
KOPANAS Georgios
committed
fix two corner cases where we dont have points
1 parent c78d81f commit be2f74a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cuda_rasterizer/rasterizer_impl.cu

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ __global__ void identifyTileRanges(int L, uint64_t* point_list_keys, uint2* rang
132132
ranges[prevtile].y = idx;
133133
ranges[currtile].x = idx;
134134
}
135-
if (idx == L - 1)
136-
ranges[currtile].y = L;
137135
}
136+
if (idx == L - 1)
137+
ranges[currtile].y = L;
138138
}
139139

140140
// Mark Gaussians as visible/invisible, based on view frustum testing
@@ -310,11 +310,12 @@ int CudaRasterizer::Rasterizer::forward(
310310
cudaMemset(imgState.ranges, 0, tile_grid.x * tile_grid.y * sizeof(uint2));
311311

312312
// Identify start and end of per-tile workloads in sorted list
313-
identifyTileRanges << <(num_rendered + 255) / 256, 256 >> > (
314-
num_rendered,
315-
binningState.point_list_keys,
316-
imgState.ranges
317-
);
313+
if (num_rendered > 0)
314+
identifyTileRanges << <(num_rendered + 255) / 256, 256 >> > (
315+
num_rendered,
316+
binningState.point_list_keys,
317+
imgState.ranges
318+
);
318319

319320
// Let each tile blend its range of Gaussians independently in parallel
320321
const float* feature_ptr = colors_precomp != nullptr ? colors_precomp : geomState.rgb;

0 commit comments

Comments
 (0)