diff --git a/piet-gpu/shader/coarse.comp b/piet-gpu/shader/coarse.comp index a70318a..f835c2b 100644 --- a/piet-gpu/shader/coarse.comp +++ b/piet-gpu/shader/coarse.comp @@ -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); + } } diff --git a/piet-gpu/shader/coarse.spv b/piet-gpu/shader/coarse.spv index 260db69..e0d89e5 100644 Binary files a/piet-gpu/shader/coarse.spv and b/piet-gpu/shader/coarse.spv differ diff --git a/piet-gpu/src/lib.rs b/piet-gpu/src/lib.rs index 0272664..c1ab974 100644 --- a/piet-gpu/src/lib.rs +++ b/piet-gpu/src/lib.rs @@ -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();