Commit Graph
10404 Commits
Author SHA1 Message Date
copilot-swe-agent[bot]andcwfitzgerald 4efd8cb4e7 Fix CI: Move PrimitiveIndex FXC ordering fix to HLSL backend only
The previous commit moved PrimitiveIndex to the top of the BuiltIn enum
to fix FXC ordering (SV_PrimitiveID must appear before other SVs).
However, since BuiltIn derives Ord, this changed the global sort order,
breaking DX12 inter-stage variable matching in CTS tests.

Fix: Restore PrimitiveIndex to its original enum position and handle
the FXC ordering requirement locally in the HLSL backend's InterfaceKey
by giving PrimitiveIndex its own sort key between Location and BuiltIn.

Co-authored-by: cwfitzgerald <7861353+cwfitzgerald@users.noreply.github.com>
2026-03-14 16:59:01 +00:00
copilot-swe-agent[bot] 1c88f7e0ce Initial plan 2026-03-14 16:47:57 +00:00
Inner Daemons 41f7c288de Added fix and regression test for primitive id on FXC (#9218) 2026-03-13 23:51:03 +01:00
Andy Leiserson ca3239e689 chore!: Move PRIMITIVE_INDEX feature into the WebGPU group (#9101)
Enable relevant CTS tests.
2026-03-13 13:52:14 -07:00
teoxoy d8ec0708ab add changelog entry 2026-03-13 16:24:43 +01:00
teoxoy 83c906f99f [hal] add missing WebGPU adapter capability guarantees 2026-03-13 16:24:43 +01:00
teoxoy c81c9783c5 [metal] don't store adapter limits
Fixes #8715.
2026-03-13 16:24:43 +01:00
teoxoy 1cce93aa28 [d3d12] account for our usage of SRVs & UAVs when calculating per-stage
limits
2026-03-13 16:24:43 +01:00
teoxoy b234c2f5c8 [d3d12] add ResourceBindingTier enum 2026-03-13 16:24:43 +01:00
teoxoy a22e43991c [vk] take into account maxDescriptorSet* limits when computing
per-stage limits
2026-03-13 16:24:43 +01:00
teoxoy 51fb8017d4 add test for max binding index 2026-03-13 16:24:43 +01:00
teoxoy 0a4cfc40f1 [wgsl] allow concretization to other valid scalars 2026-03-13 16:24:43 +01:00
teoxoy 990e12ebbc [wgpu-hal] report accurate maxBindingsPerBindGroup limits 2026-03-13 16:24:43 +01:00
teoxoy 3d637fa78d [vk] lower relevant per stage limits to stay under Vulkan's
`maxPerSetDescriptors` limit
2026-03-13 16:24:43 +01:00
teoxoy 59eb0ee70c use cap_limits_to_be_under_the_sum_limit to clamp per-stage limits 2026-03-13 16:24:43 +01:00
teoxoy 3f90204744 [vk] lower relevant per stage limits to stay under Vulkan's
`maxPerStageResources` limit

Fixes #9151.
2026-03-13 16:24:43 +01:00
teoxoy 085fd3c565 [vk] consult maxMemoryAllocationSize & maxBufferSize
Fixes #3326.
2026-03-13 16:24:43 +01:00
teoxoy c819484751 [metal] fix limits
Fixes #8173.
2026-03-13 16:24:43 +01:00
teoxoy f06431f6de [vk] fix limits 2026-03-13 16:24:43 +01:00
teoxoy 2b8fa47f5f [d3d12] fix limits
Resolves #3333.
2026-03-13 16:24:43 +01:00
atlv c4c623fb45 wgpu-naga-bridge (#9201) 2026-03-13 11:09:12 -04:00
atlv 4e7ffe0938 Workaround Metal driver bug with atomic texture writes (#9185) 2026-03-13 11:01:23 -04:00
atlv 9ed77372b4 Add coherent and volatile memory decorations for storage buffers. (#9168) 2026-03-11 19:53:52 -04:00
Kevin Reid a97a49d1d6 Replace &mut [u8] access to mapped buffers with WriteOnly.
When accessing a buffer for writing, do not expose (or internally
create) any `&'a mut [u8]` references to that memory, so as to avoid
exposing write-combining memory that might visibly misbehave in atomic
operations. Instead, expose the new pointer type `WriteOnly<'a, [u8]>`
which offers only write operations. This can be sliced and reborrowed,
allowing it to be used in most ways which `&mut [u8]` would be,
hopefully with near-zero overhead.

This pointer type might also allow users to opt in to uninitialized
memory for performance, while confining the consequences to GPU UB
rather than Rust UB. However, that is a future possibility and is not
implemented in this commit other than as a consideration in defining the
API of the `WriteOnly` type.

This change is not a complete solution to the problem of write-combining
memory because it is still possible to read after writing by calling
`get_mapped_range()` after `get_mapped_range_mut()`. However, that is
solvable separately, perhaps with a barrier or a validation change,
and is not particularly coupled with this part of the solution.
2026-03-11 16:58:48 -04:00
Kevin Reid e6899b5362 Add WriteOnly type.
`WriteOnly<'a, T>` is a custom smart pointer which is stricter than
`&'a mut [T]` in that it only allows writing data and not reading it.
This will be part of the fix for <https://github.com/gfx-rs/wgpu/issues/8897>.

This commit only introduces the public type and does not use it.
2026-03-11 16:58:48 -04:00
Erich Gubler c1f4d0c5db style(core): keep device::resource module's content < 100 columns (#9193) 2026-03-11 13:36:49 -07:00
Erich Gubler e5b0edea79 refactor: break StageError::InvalidWorkgroupSize diag. at 100 columns 2026-03-11 11:33:22 -06:00
Erich Gubler d7d2ede9fb diag!: use clearer field names and order for StageError::InvalidWorkgroupSize 2026-03-11 11:33:22 -06:00
Erich Gubler 46b77dd900 diag: don't add newline and space to StageError::InvalidWorkgroupSize 2026-03-11 11:33:22 -06:00
Erich Gubler 70b8343e06 refactor(core): rename Instance::name to _name (#8957) 2026-03-11 17:29:08 +00:00
Erich Gubler 405fedbb05 refactor: use Iterator::any for max_compute_workgroups_per_dimension check (#9194) 2026-03-11 11:39:05 -04:00
Dzmitry Malyshau da77a43313 Update naga capabilities for TLAS array 2026-03-11 08:18:38 -07:00
Dzmitry Malyshau adc3534f1c Add max_binding_array_acceleration_structure_elements_per_shader_stage limit 2026-03-11 08:18:38 -07:00
Dzmitry Malyshau e39b3aec8e Plumbing and a test for ACCELERATION_STRUCTURE_BINDING_ARRAY 2026-03-11 08:18:38 -07:00
Erich Gubler 43f48b43ee refactor(core): Interface::check_stage consolidate total_invocations checks into invalid_total_invocations 2026-03-10 18:40:02 -06:00
Erich Gubler 5d77bb336f perf(core): Interface::check_stage: just check total_invocations == 0 2026-03-10 18:40:02 -06:00
Erich Gubler ac79412501 refactor(core): Interface::check_stage: use saturating_mul for total_invocations 2026-03-10 18:40:02 -06:00
Erich Gubler 4ae6661898 Fix up various unreleased CHANGELOG bits (#9195)
* style(CHANGELOG): ensure double newline b/w paragraph and fenced code blocks

Regressed by <https://github.com/gfx-rs/wgpu/pull/9180>. I missed this
in review.

* docs(CHANGELOG): fix up formatting for #9141

* docs(CHANGELOG): clarify that `get_current_texture` in a `Surface` method
2026-03-10 17:00:13 -07:00
Andy Leiserson d540c4566e test(cts_runner): Use DXC by default 2026-03-10 16:57:39 -07:00
Andy Leiserson a16ca5cb42 feat(deno): Add DENO_WEBGPU_DX12_COMPILER env var
- Use the env var to select DXC in cts_runner
- Sync a few other env vars from `ci.yml`
2026-03-10 16:57:39 -07:00
Andy Leiserson cca21e665c ci(cts): Set RUSTFLAGS vars in cts.yml 2026-03-10 16:57:39 -07:00
Andy Leiserson c65c2f1aff ci(cts): Rename MSRV to REPO_MSRV in cts.yml 2026-03-10 16:57:39 -07:00
ecoricemon eb3bc87b21 fix(naga): Implement constant matrix add/sub/mul (#9162)
* fix(naga): Implement constant matrix operations

Implement binary operations in naga constant evaluator
- multiplication on vector-matrix, matrix-vector, and matrix-matrix
- addition/subtraction on matrix-matrix

* Related CTS
webgpu:shader,validation,expression,matrix,* : 1678/1881 (89.21%) -> 1737/1881 (92.34%)
> remaining fail : overflow/underflow (126), atomic (18)

* naga snapshots updated automatically

* chore: Update naga snapshots
2026-03-10 22:09:00 +01:00
Marijn Suijten 35db26b2c6 Make HasDisplayHandle optional in WindowHandle (#8782) 2026-03-10 11:36:12 -04:00
Andy Leiserson ce631c139f fix(naga): Evaluate compound assignment LHS before RHS (#9181) 2026-03-09 23:33:27 +00:00
Erich Gubler a18abddd33 refactor: use From or Into for u32 -> u64 casts 2026-03-09 16:49:06 -06:00
Erich Gubler fbc0388b61 refactor: DRY for i32::MAX in wgpu_hal::noop::CAPABILITIES 2026-03-09 16:49:06 -06:00
Genna Wingert ce7dad3026 fix: Change type of max_*_buffer_binding_size to follow spec 2026-03-09 16:49:06 -06:00
Andy Leiserson 0afad95d9b docs: Clarify description of newly-optional fields in DepthStencilState (#9180) 2026-03-09 18:08:11 -04:00
renovate[bot]andErich Gubler bdebd335ee chore(deps): update cargo.lock (#9175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-03-09 16:53:26 -04:00