Skip to content

Commit

Permalink
Merge pull request #104 from Calcoph/master
Browse files Browse the repository at this point in the history
update to wgpu 0.18
  • Loading branch information
Yatekii authored Feb 9, 2024
2 parents 89394e0 + 53abff5 commit 798a498
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Per Keep a Changelog there are 6 main categories of changes:
## Unreleased

- Internal: Fixed Scissor-Rect to not span across Framebuffersize, by limiting to framebuffer width. @PixelboysTM
- Bump wgpu version to 0.18. @calcoph

## v0.24.0

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bytemuck = "1"
imgui = "0.11"
log = "0.4"
smallvec = "1"
wgpu = "0.17"
wgpu = "0.18"

[dev-dependencies]
bytemuck = { version = "1.13", features = ["derive"] }
Expand Down
8 changes: 6 additions & 2 deletions examples/cube.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,12 @@ impl Example {
b: 0.3,
a: 1.0,
}),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});
rpass.push_debug_group("Prepare data for draw.");
rpass.set_pipeline(&self.pipeline);
Expand Down Expand Up @@ -566,10 +568,12 @@ fn main() {
ops: wgpu::Operations {
load: wgpu::LoadOp::Load, // Do not clear
// load: wgpu::LoadOp::Clear(clear_color),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});

renderer
Expand Down
4 changes: 3 additions & 1 deletion examples/custom-texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,12 @@ fn main() {
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(clear_color),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});

renderer
Expand Down
4 changes: 3 additions & 1 deletion examples/hello-world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ fn main() {
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(clear_color),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});

renderer
Expand Down
8 changes: 6 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,12 @@ impl Renderer {
let scissors = (
clip_rect[0].max(0.0).floor() as u32,
clip_rect[1].max(0.0).floor() as u32,
(clip_rect[2].min(fb_size[0]) - clip_rect[0].max(0.0)).abs().ceil() as u32,
(clip_rect[3].min(fb_size[1]) - clip_rect[1].max(0.0)).abs().ceil() as u32,
(clip_rect[2].min(fb_size[0]) - clip_rect[0].max(0.0))
.abs()
.ceil() as u32,
(clip_rect[3].min(fb_size[1]) - clip_rect[1].max(0.0))
.abs()
.ceil() as u32,
);

// XXX: Work-around for wgpu issue [1] by only issuing draw
Expand Down

0 comments on commit 798a498

Please sign in to comment.