diff --git a/piet-gpu/bin/winit.rs b/piet-gpu/bin/winit.rs index 1c263bb..fd30fa3 100644 --- a/piet-gpu/bin/winit.rs +++ b/piet-gpu/bin/winit.rs @@ -37,7 +37,7 @@ fn main() -> Result<(), Error> { .map(|_| device.create_cmd_buf()) .collect::, Error>>()?; let query_pools = (0..NUM_FRAMES) - .map(|_| device.create_query_pool(6)) + .map(|_| device.create_query_pool(5)) .collect::, Error>>()?; let mut ctx = PietGpuRenderContext::new(); @@ -70,12 +70,11 @@ fn main() -> Result<(), Error> { let timestamps = device.reap_query_pool(query_pool).unwrap(); window.set_title(&format!( - "k1: {:.3}ms, k2s: {:.3}ms, k2f: {:.3}ms, k3: {:.3}ms, k4: {:.3}ms", + "e: {:.3}ms, b: {:.3}ms, c: {:.3}ms, f: {:.3}ms", timestamps[0] * 1e3, (timestamps[1] - timestamps[0]) * 1e3, (timestamps[2] - timestamps[1]) * 1e3, (timestamps[3] - timestamps[2]) * 1e3, - (timestamps[4] - timestamps[3]) * 1e3, )); } diff --git a/piet-gpu/shader/elements.comp b/piet-gpu/shader/elements.comp index 76d56b6..8f87b87 100644 --- a/piet-gpu/shader/elements.comp +++ b/piet-gpu/shader/elements.comp @@ -82,6 +82,7 @@ State combine_state(State a, State b) { c.translate.y = a.mat.y * b.translate.x + a.mat.w * b.translate.y + a.translate.y; c.linewidth = (b.flags & FLAG_SET_LINEWIDTH) == 0 ? a.linewidth : b.linewidth; c.flags = (a.flags & (FLAG_SET_LINEWIDTH | FLAG_SET_BBOX)) | b.flags; + c.flags |= (a.flags & FLAG_RESET_BBOX) >> 1; return c; } diff --git a/piet-gpu/shader/elements.spv b/piet-gpu/shader/elements.spv index a19b5f8..7828aa4 100644 Binary files a/piet-gpu/shader/elements.spv and b/piet-gpu/shader/elements.spv differ