Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
#

# This is the MSRV used by all repository infrastructure.
REPO_MSRV: "1.93"
REPO_MSRV: "nightly-2026-03-11"

#
# Environment variables
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ env:
#

# This is the MSRV used by all repository infrastructure.
REPO_MSRV: "1.93"
REPO_MSRV: "nightly-2026-03-11"
# This is the MSRV used by `wgpu` itself.
WGPU_MSRV: "1.87"
WGPU_MSRV: "nightly-2026-03-11"
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
# to ensure that they can be used with firefox.
CORE_MSRV: "1.87"
CORE_MSRV: "nightly-2026-03-11"

#
# Environment variables
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
merge_group:

env:
REPO_MSRV: "1.93"
REPO_MSRV: "nightly-2026-03-11"
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
DENO_WEBGPU_DX12_COMPILER: dynamicdxc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
# This is the MSRV used by all repository infrastructure.
REPO_MSRV: "1.93"
REPO_MSRV: "nightly-2026-03-11"

CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
#

# This is the MSRV used by `wgpu` itself.
WGPU_MSRV: "1.87"
WGPU_MSRV: "nightly-2026-03-11"
RUSTFLAGS: -D warnings

# Every time a PR is pushed to, cancel any previous jobs. This
Expand Down
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ wgpu = { path = "./wgpu" }
env_logger = { version = "0.11", git = "https://github.com/rust-cli/env_logger.git", rev = "d550741" }
libtest-mimic = { version = "0.8", git = "https://github.com/cwfitzgerald/libtest-mimic.git", rev = "9979b3c" }

syn = { git = "https://github.com/erichdongubler-contrib/syn", rev = "146280b69756a0a8882d21ed061752214da94049" }

[profile.release]
lto = "thin"
debug = true
Expand Down
17 changes: 7 additions & 10 deletions examples/features/src/big_compute_buffers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ pub async fn execute_gpu(numbers: &[f32]) -> Vec<f32> {
required_features: Features::BUFFER_BINDING_ARRAY
| Features::STORAGE_RESOURCE_BINDING_ARRAY
| Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
memory_hints: wgpu::MemoryHints::Performance,
required_limits: wgpu::Limits {
max_buffer_size: MAX_BUFFER_SIZE,
max_binding_array_elements_per_shader_stage: 8,
..Default::default()
},
..Default::default()
..
})
.await
.unwrap();
Expand All @@ -48,12 +47,11 @@ pub async fn execute_gpu_inner(
) -> Vec<f32> {
let (staging_buffers, storage_buffers, bind_group, compute_pipeline) = setup(device, numbers);

let mut encoder =
device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor::default());
{
let mut cpass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor {
label: Some("compute pass descriptor"),
timestamp_writes: None,
..
});
cpass.set_pipeline(&compute_pipeline);
cpass.set_bind_group(0, Some(&bind_group), &[]);
Expand Down Expand Up @@ -127,16 +125,15 @@ fn setup_pipeline(
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("Compute Pipeline Layout"),
bind_group_layouts: &[Some(&bind_group_layout)],
immediate_size: 0,
..
});

device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
label: Some("Compute Pipeline"),
layout: Some(&pipeline_layout),
module: &cs_module,
entry_point: Some("main"),
compilation_options: Default::default(),
cache: None,
..
})
}

Expand All @@ -159,8 +156,8 @@ fn setup_binds(
visibility: wgpu::ShaderStages::COMPUTE,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Storage { read_only: false },
has_dynamic_offset: false,
min_binding_size: Some(NonZeroU64::new(4).unwrap()),
..
},
count: Some(NonZeroU32::new(buffers.len() as u32).unwrap()),
};
Expand Down Expand Up @@ -213,7 +210,7 @@ fn create_staging_buffers(device: &wgpu::Device, numbers: &[f32]) -> Vec<wgpu::B
label: Some(&format!("staging buffer-{e}")),
size,
usage: wgpu::BufferUsages::MAP_READ | wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
..
})
})
.collect()
Expand Down
37 changes: 12 additions & 25 deletions examples/features/src/boids/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl crate::framework::Example for Example {
fn required_downlevel_capabilities() -> wgpu::DownlevelCapabilities {
wgpu::DownlevelCapabilities {
flags: wgpu::DownlevelFlags::COMPUTE_SHADERS,
..Default::default()
..
}
}

Expand Down Expand Up @@ -101,13 +101,13 @@ impl crate::framework::Example for Example {
count: None,
},
],
label: None,
..
});
let compute_pipeline_layout =
device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("compute"),
bind_group_layouts: &[Some(&compute_bind_group_layout)],
immediate_size: 0,
..
});

// create render pipeline with empty bind group layout
Expand All @@ -116,16 +116,14 @@ impl crate::framework::Example for Example {
device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("render"),
bind_group_layouts: &[],
immediate_size: 0,
..
});

let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: None,
layout: Some(&render_pipeline_layout),
vertex: wgpu::VertexState {
module: &draw_shader,
entry_point: Some("main_vs"),
compilation_options: Default::default(),
buffers: &[
wgpu::VertexBufferLayout {
array_stride: 4 * 4,
Expand All @@ -134,22 +132,19 @@ impl crate::framework::Example for Example {
},
wgpu::VertexBufferLayout {
array_stride: 2 * 4,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &wgpu::vertex_attr_array![2 => Float32x2],
..
},
],
..
},
fragment: Some(wgpu::FragmentState {
module: &draw_shader,
entry_point: Some("main_fs"),
compilation_options: Default::default(),
targets: &[Some(config.view_formats[0].into())],
..
}),
primitive: wgpu::PrimitiveState::default(),
depth_stencil: None,
multisample: wgpu::MultisampleState::default(),
multiview_mask: None,
cache: None,
..
});

// create compute pipeline
Expand All @@ -159,8 +154,7 @@ impl crate::framework::Example for Example {
layout: Some(&compute_pipeline_layout),
module: &compute_shader,
entry_point: Some("main"),
compilation_options: Default::default(),
cache: None,
..
});

// buffer for the three 2d triangle vertices of each instance
Expand Down Expand Up @@ -221,7 +215,7 @@ impl crate::framework::Example for Example {
resource: particle_buffers[(i + 1) % 2].as_entire_binding(), // bind to opposite buffer
},
],
label: None,
..
}));
}

Expand Down Expand Up @@ -270,12 +264,8 @@ impl crate::framework::Example for Example {
},
})];
let render_pass_descriptor = wgpu::RenderPassDescriptor {
label: None,
color_attachments: &color_attachments,
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
multiview_mask: None,
..
};

// get command encoder
Expand All @@ -285,10 +275,7 @@ impl crate::framework::Example for Example {
command_encoder.push_debug_group("compute boid movement");
{
// compute pass
let mut cpass = command_encoder.begin_compute_pass(&wgpu::ComputePassDescriptor {
label: None,
timestamp_writes: None,
});
let mut cpass = command_encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { .. });
cpass.set_pipeline(&self.compute_pipeline);
cpass.set_bind_group(0, &self.particle_bind_groups[self.frame_num % 2], &[]);
cpass.dispatch_workgroups(self.work_group_count, 1, 1);
Expand Down
Loading
Loading