Skip to content

Commit e613dff

Browse files
Merge branch 'trunk' into mesh-shading/metal
2 parents b4abddd + a682d9e commit e613dff

File tree

126 files changed

+4970
-2757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4970
-2757
lines changed

.github/actions/install-dxc/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ runs:
77
run: |
88
set -e
99
10-
export DXC_RELEASE="v1.8.2502"
11-
export DXC_FILENAME="dxc_2025_02_20.zip"
10+
export DXC_RELEASE="v1.8.2505.1"
11+
export DXC_FILENAME="dxc_2025_07_14.zip"
1212
1313
curl.exe -L --retry 5 https://github.com/microsoft/DirectXShaderCompiler/releases/download/$DXC_RELEASE/$DXC_FILENAME -o dxc.zip
1414
7z.exe e dxc.zip -odxc bin/x64/{dxc.exe,dxcompiler.dll}

.github/actions/install-vulkan-sdk/action.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: 'Install Vulkan SDK'
2-
description: 'Install Vulkan SDK'
1+
name: "Install Vulkan SDK"
2+
description: "Install Vulkan SDK"
33
inputs:
44
# Sourced from https://vulkan.lunarg.com/sdk/home#linux
55
version:
6-
default: '1.4.321'
6+
default: "1.4.328"
77
full-version:
8-
default: '1.4.321.0'
8+
default: "1.4.328.1"
99
runs:
10-
using: 'composite'
10+
using: "composite"
1111
steps:
1212
- name: (Linux) Install Vulkan SDK
1313
if: runner.os == 'Linux'
@@ -43,7 +43,6 @@ runs:
4343
4444
echo "C:/VulkanSDK/${{ env.VULKAN_FULL_SDK_VERSION }}/Bin" >> "$GITHUB_PATH"
4545
46-
4746
- name: (Mac) Install Vulkan SDK
4847
if: runner.os == 'macOS'
4948
shell: bash

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ SamplerDescriptor {
8181

8282
#### General
8383

84+
- Lower `max_blas_primitive_count` due to a bug in llvmpipe. By @Vecvec in [#8446](https://github.com/gfx-rs/wgpu/pull/8446).
8485
- Texture now has `from_custom`. By @R-Cramer4 in [#8315](https://github.com/gfx-rs/wgpu/pull/8315).
8586
- Using both the wgpu command encoding APIs and `CommandEncoder::as_hal_mut` on the same encoder will now result in a panic.
8687
- Allow `include_spirv!` and `include_spirv_raw!` macros to be used in constants and statics. By @clarfonthey in [#8250](https://github.com/gfx-rs/wgpu/pull/8250).

Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ libloading = "0.8"
142142
libm = { version = "0.2.6", default-features = false }
143143
libtest-mimic = "0.8"
144144
log = "0.4.21"
145+
macro_rules_attribute = "0.2"
145146
nanoserde = "0.2"
146147
nanorand = { version = "0.8", default-features = false, features = ["wyrand"] }
147148
noise = "0.9"

deno_webgpu/device.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,8 @@ impl GPUDevice {
577577
multiview: None,
578578
};
579579

580-
let res = wgpu_core::command::RenderBundleEncoder::new(
581-
&wgpu_descriptor,
582-
self.id,
583-
None,
584-
);
580+
let res =
581+
wgpu_core::command::RenderBundleEncoder::new(&wgpu_descriptor, self.id);
585582
let (encoder, err) = match res {
586583
Ok(encoder) => (encoder, None),
587584
Err(e) => (

docs/api-specs/mesh_shading.md

Lines changed: 108 additions & 27 deletions
Large diffs are not rendered by default.

examples/features/src/framework.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ impl SurfaceWrapper {
196196
config.format = format;
197197
config.view_formats.push(format);
198198
};
199+
config.present_mode = wgpu::PresentMode::Immediate;
200+
config.desired_maximum_frame_latency = 3;
199201

200202
surface.configure(&context.device, &config);
201203
self.config = Some(config);

naga-cli/src/bin/naga.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ struct Args {
6464
#[argh(option)]
6565
shader_model: Option<ShaderModelArg>,
6666

67+
/// the SPIR-V version to use if targeting SPIR-V
68+
///
69+
/// For example, 1.0, 1.4, etc
70+
#[argh(option)]
71+
spirv_version: Option<SpirvVersionArg>,
72+
6773
/// the shader stage, for example 'frag', 'vert', or 'compute'.
6874
/// if the shader stage is unspecified it will be derived from
6975
/// the file extension.
@@ -189,6 +195,22 @@ impl FromStr for ShaderModelArg {
189195
}
190196
}
191197

198+
#[derive(Debug, Clone)]
199+
struct SpirvVersionArg(u8, u8);
200+
201+
impl FromStr for SpirvVersionArg {
202+
type Err = String;
203+
204+
fn from_str(s: &str) -> Result<Self, Self::Err> {
205+
let dot = s
206+
.find(".")
207+
.ok_or_else(|| "Missing dot separator".to_owned())?;
208+
let major = s[..dot].parse::<u8>().map_err(|e| e.to_string())?;
209+
let minor = s[dot + 1..].parse::<u8>().map_err(|e| e.to_string())?;
210+
Ok(Self(major, minor))
211+
}
212+
}
213+
192214
/// Newtype so we can implement [`FromStr`] for `ShaderSource`.
193215
#[derive(Debug, Clone, Copy)]
194216
struct ShaderStage(naga::ShaderStage);
@@ -465,6 +487,9 @@ fn run() -> anyhow::Result<()> {
465487
if let Some(ref version) = args.metal_version {
466488
params.msl.lang_version = version.0;
467489
}
490+
if let Some(ref version) = args.spirv_version {
491+
params.spv_out.lang_version = (version.0, version.1);
492+
}
468493
params.keep_coordinate_space = args.keep_coordinate_space;
469494

470495
params.dot.cfg_only = args.dot_cfg_only;

naga/src/back/dot/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,25 @@ impl StatementGraph {
307307
crate::RayQueryFunction::Terminate => "RayQueryTerminate",
308308
}
309309
}
310+
S::MeshFunction(crate::MeshFunction::SetMeshOutputs {
311+
vertex_count,
312+
primitive_count,
313+
}) => {
314+
self.dependencies.push((id, vertex_count, "vertex_count"));
315+
self.dependencies
316+
.push((id, primitive_count, "primitive_count"));
317+
"SetMeshOutputs"
318+
}
319+
S::MeshFunction(crate::MeshFunction::SetVertex { index, value }) => {
320+
self.dependencies.push((id, index, "index"));
321+
self.dependencies.push((id, value, "value"));
322+
"SetVertex"
323+
}
324+
S::MeshFunction(crate::MeshFunction::SetPrimitive { index, value }) => {
325+
self.dependencies.push((id, index, "index"));
326+
self.dependencies.push((id, value, "value"));
327+
"SetPrimitive"
328+
}
310329
S::SubgroupBallot { result, predicate } => {
311330
if let Some(predicate) = predicate {
312331
self.dependencies.push((id, predicate, "predicate"));

0 commit comments

Comments
 (0)