summaryrefslogtreecommitdiffstats
path: root/wgpu/src/triangle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu/src/triangle.rs')
-rw-r--r--wgpu/src/triangle.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs
index 98ba41b3..8470ea39 100644
--- a/wgpu/src/triangle.rs
+++ b/wgpu/src/triangle.rs
@@ -501,14 +501,13 @@ impl Layer {
let mut last_is_solid = None;
for (index, mesh) in meshes.iter().enumerate() {
- let Some(clip_bounds) =
- bounds.intersection(&(mesh.clip_bounds() * transformation))
+ let Some(clip_bounds) = bounds
+ .intersection(&(mesh.clip_bounds() * transformation))
+ .and_then(Rectangle::snap)
else {
continue;
};
- let clip_bounds = clip_bounds.snap();
-
render_pass.set_scissor_rect(
clip_bounds.x,
clip_bounds.y,