8000 Update some dependencies by a1phyr · Pull Request #1315 · ggez/ggez · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update some dependencies #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ obj = ["obj-rs", "3d"]
bitflags = "2.1"
zip = { version = "0.6", default-features = false, features = ["deflate"] }
directories = "5.0"
wgpu = "24.0.1"
wgpu = "25"
glyph_brush = "0.7"
winit = { version = "0.30", features = ["serde"] }
image = { version = "0.25", default-features = false, features = ["gif", "png", "pnm", "tga", "tiff", "webp", "bmp", "jpeg"] }
Expand Down Expand Up @@ -63,16 +63,16 @@ num-traits = "0.2"

[dev-dependencies]
chrono = "0.4"
fern = "0.6"
fern = "0.7"
oorandom = "11"
argh = "0.1"
rand = "0.8"
rand = "0.9"
keyframe = "1"
keyframe_derive = "1"
num-derive = "0.4"

skeptic = { git = "https://github.com/Erk-/rust-skeptic.git", branch = "fix-rust-1-77" }
getrandom = "0.2"
getrandom = "0.3"

[workspace]
members = ["doc_tests"]
2 changes: 1 addition & 1 deletion examples/04_snake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl GameState {
let snake_pos = (GRID_SIZE.0 / 4, GRID_SIZE.1 / 2).into();
// And we seed our RNG with the system RNG.
let mut seed: [u8; 8] = [0; 8];
getrandom::getrandom(&mut seed[..]).expect("Could not create RNG seed");
getrandom::fill(&mut seed[..]).expect("Could not create RNG seed");
let mut rng = Rand32::new(u64::from_ne_bytes(seed));
// Then we choose a random place to put our piece of food using the helper we made
// earlier.
Expand Down
2 changes: 1 addition & 1 deletion examples/05_astroblasto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl MainState {

// Seed our RNG
let mut seed: [u8; 8] = [0; 8];
getrandom::getrandom(&mut seed[..]).expect("Could not create RNG seed");
getrandom::fill(&mut seed[..]).expect("Could not create RNG seed");
let mut rng = Rand32::new(u64::from_ne_bytes(seed));

let assets = Assets::new(ctx)?;
Expand Down
16 changes: 6 additions & 10 deletions src/graphics/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,14 @@ impl GraphicsContext {
force_fallback_adapter: false,
compatible_surface: Some(&surface),
}))
.ok_or(GameError::GraphicsInitializationError)?;
.or(Err(GameError::GraphicsInitializationError))?;

// One instance is 96 bytes, and we allow 1 million of them, for a total of 96MB (default being 128MB).
const MAX_INSTANCES: u32 = 1_000_000;
const INSTANCE_BUFFER_SIZE: u32 = 96 * MAX_INSTANCES;

let (device, queue) = pollster::block_on(adapter.request_device(
&wgpu::DeviceDescriptor {
label: None,
required_features: wgpu::Features::default(),
let (device, queue) =
pollster::block_on(adapter.request_device(&wgpu::DeviceDescriptor {
required_limits: wgpu::Limits {
// 1st: DrawParams
// 2nd: Texture + Sampler
Expand All @@ -268,10 +266,8 @@ impl GraphicsContext {
max_texture_dimension_2d: 8192,
..wgpu::Limits::downlevel_webgl2_defaults()
},
memory_hints: wgpu::MemoryHints::default(),
},
None,
))?;
..wgpu::DeviceDescriptor::default()
}))?;

let wgpu = Arc::new(WgpuContext {
instance,
Expand Down Expand Up @@ -710,7 +706,7 @@ impl GraphicsContext {

pub(crate) fn resize(&mut self, _new_size: dpi::PhysicalSize<u32>) {
let size = self.window.inner_size();
let _ = self.wgpu.device.poll(wgpu::Maintain::Wait);
let _ = self.wgpu.device.poll(wgpu::PollType::Wait);
self.surface_config.width = size.width.max(1);
self.surface_config.height = size.height.max(1);
self.wgpu
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl Image {
buffer
.slice(..)
.map_async(wgpu::MapMode::Read, move |result| tx.send(result).unwrap()); // Unwrap is fine as this should never fail
let _ = gfx.wgpu.device.poll(wgpu::Maintain::Wait);
let _ = gfx.wgpu.device.poll(wgpu::PollType::Wait);
let map_result = rx
.recv()
.expect("All senders dropped, this should not be possible.");
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl<'a, Uniforms: AsStd140> ShaderParamsBuilder<'a, Uniforms> {
/// # Arguments
///
/// * `vs_visible` - If the images should also be visible to the vertex shader, rather
/// than just the fragment shader.
/// than just the fragment shader.
#[must_use]
pub fn images(
self,
Expand Down
0