mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
coarse.comp: don't write Cmd_End to tiles out of bounds
If WIDTH_IN_TILES or HEIGHT_IN_TILES are not divisible by N_TILE_X or N_TILE_Y respectively, the previously unconditional Cmd_End_write would write out of bounds. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
4de67d9081
commit
c67696714b
|
@ -370,5 +370,7 @@ void main() {
|
|||
rd_ix += N_TILE;
|
||||
if (rd_ix >= ready_ix && partition_ix >= n_partitions) break;
|
||||
}
|
||||
Cmd_End_write(cmd_ref);
|
||||
if (bin_tile_x + tile_x < WIDTH_IN_TILES && bin_tile_y + tile_y < HEIGHT_IN_TILES) {
|
||||
Cmd_End_write(cmd_ref);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -404,7 +404,7 @@ impl Renderer {
|
|||
cmd_buf.dispatch(
|
||||
&self.coarse_pipeline,
|
||||
&self.coarse_ds,
|
||||
(WIDTH as u32 / 256, HEIGHT as u32 / 256, 1),
|
||||
((WIDTH as u32 + 255) / 256, (HEIGHT as u32 + 255) / 256, 1),
|
||||
);
|
||||
cmd_buf.write_timestamp(&query_pool, 6);
|
||||
cmd_buf.memory_barrier();
|
||||
|
|
Loading…
Reference in a new issue