Commit Graph
10092 Commits
Author SHA1 Message Date
Erich Gubler 37dd63d56a test(cts): add currently passing tests for workgroupUniformLoad (#8813) 2026-01-06 11:10:11 -08:00
Jamie Nicol 1f4ae6733c [naga test] Run hlsl_mat_cxN.wgsl snapshot tests on SPIR-V too
Additionally rename the tests to remove the "hlsl_" prefix.
2026-01-06 11:28:24 +00:00
Jamie Nicol 3597514381 [naga spv-out] Handle 2-row matrices in uniform buffers
Two-row matrices in uniform buffers in Vulkan/SPIR-V's default
"extended" (std140) layout do not adhere to WGSL/Naga IR's layout
rules - each column is aligned to a minimum of 16 bytes rather than
just the vector size.

To work around this, we emit additional std140 compatible type
declarations for each type used in a uniform buffer that requires
one. Any two-row matrix struct member is decomposed into the
containing struct as separate vectors for each column. Two-row
matrices used directly as uniform buffers are wrapped in a struct with
a vector member for each column, and arrays (of arrays, etc) of
two-row matrices are declared as arrays (of arrays) of structs
containing a vector member for each column.

When loading such a value from a uniform buffer, we convert from the
std140 compatible type to the regular type immediately after loading.
Accesses of a uniform two-row matrix's columns using constant indices
are rewritten to access the containing struct's vector members
directly. Accesses using dynamic indices are implemented by loading
and converting the matrix, extracting each column then `switch`ing on
the index to select the correct column.

We can now remove the expected failure annotation for the Vulkan
backend on the uniform_input struct_layout test, as it now passes.
2026-01-06 11:28:24 +00:00
Jamie Nicol c1802e5bc1 [test] Add additional matrix struct_layout tests
Extend existing tests to use dynamic indexing of matrices' columns as
well static indexing. Add new tests for arrays of matrices.
2026-01-06 11:28:24 +00:00
Erich Gubler 611dacac50 test(cts): add passing subset of webgpu:api,validation,render_pipeline,inter_stage:max_variables_count,input:* 2026-01-05 14:59:38 -08:00
Erich Gubler 605b8a2dba docs(CHANGELOG): add #8792 to entry for maxInterStageShaderVariable migration 2026-01-05 14:59:38 -08:00
Erich Gubler 727cbc3d13 refactor(core): debug_assert that we wrote at least one deduction for maxInterStageShaderVariables errors 2026-01-05 14:59:38 -08:00
Erich Gubler 6bf665ab26 fix(core): do not deduct Position built-in from maxInterStageShaderVariables 2026-01-05 14:59:38 -08:00
Erich Gubler cd271a6be7 fix(core): compare fragment input indices against maxInterStageShaderVariables directly, not max_fragment_input_variables 2026-01-05 14:59:38 -08:00
Connor Fitzgerald 3ce7366a2e Fix lazy jobs (#8804)
* Always run lazy jobs

* Fix lazy spirv job

* Fix publishing build
2026-01-05 15:29:20 -07:00
renovate[bot] 3fc330fd54 chore(deps): update cts digest to c7cc4cc (#8810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-05 09:11:00 -08:00
Ivor Wanders aba9161b72 Ensure symlinked target directory is ignored. (#8796) 2025-12-30 14:46:32 -05:00
Jan Hohenheim fe3c9a581a Fix weird comma (#8797) 2025-12-30 14:45:41 -05:00
Luo Zhihao 4b3bf0740a Fix Android crash by setting waitAll to true in vkWaitForFences (#8769) 2025-12-29 00:29:21 -05:00
Erich Gubler 81542eadc3 fix(cts): render full err. msg. in Device::create_*_pipeline_async (#8788) 2025-12-27 14:47:35 -07:00
Erich Gubler 878a180a00 test(cts): add webgpu:api,validation,render_pipeline,inter_stage:max_variables_count,output:* (#8786) 2025-12-27 14:44:42 -07:00
Erich Gubler a2c8c0de7c docs(core): add (one among others) spec. citation for logic in Interface::check_stage 2025-12-23 16:09:17 -05:00
Erich Gubler 6880146632 test(core): add CTS coverage for maxInterStageShaderVariables 2025-12-23 16:09:17 -05:00
Erich Gubler ceb549bc42 docs(CHANGELOG): add entry for #8652 2025-12-23 16:09:17 -05:00
Erich Gubler 6948a01d8c fix(core): remove max_inter_stage_shader_components validation 2025-12-23 16:09:17 -05:00
Erich Gubler a26de1262c fix(core): add fragment-stage max_inter_stage_shader_variables validation 2025-12-23 16:09:17 -05:00
Erich Gubler bfb153222b fix(core): add vertex-stage max_inter_stage_shader_variables validation (minus clip-distances)
Notable public API additions:

- New `StageError` variants:
	- `VertexOutputLocationTooLarge`
	- `TooManyVertexOutputs`
- Add new `shader_io_deductions` submodule of `wgpu_core::validation` with:
	- A `ShaderIoDeduction` trait
	- `enum MaxVertexShaderOutputDeduction`
	- `MaxInterStageShaderVariablesDeductions` for them.
2025-12-23 16:09:17 -05:00
Erich Gubler 0fbfbf8aa4 feat(core)!: add Limits::max_inter_stage_shader_variables 2025-12-23 16:09:17 -05:00
Erich Gubler 344eeb4bc8 refactor(core): migrate from naga::ShaderStage to new ShaderStageForValidation
In order to prepare for spec.-compliant validation of shader I/O, we
need to create a new `enum` that will have the same set of _variants_ as
`naga::ShaderStage`, but will carry additional information relevant to
validation. As a preparatory step, create the new `enum` (called
`ShaderStageForValidation`), and use it as the source of truth for
details of the stage being validated. This yields several immediate
benefits, even before making adjustments for the new validation:

- Stage-specific stage is now properly encapsulated. `compare_function`,
  which was previously passed as a `Option`al sibling argument, is now
  properly associated with only the vertex shader stage.
  - This led to an odd discovery that `compare_function` was being
    provided to `check_stages` with other stages, but not actually
    actually checked. This seems like a rightfully squashed bug.
- Instead of passing a `wgpu_types::ShaderStages` (with a single bit)
  and `naga::ShaderStage` side-by-side, encapsulate both into conversion
  methods for an instance of `ShaderStageForValidation`, so errors are
  impossible to make.
2025-12-23 16:09:17 -05:00
Erich Gubler f71d51a356 refactor(core): reverse conv. b/w wgt::ShaderStages and naga::ShaderStage
This will better prepare for the subsequent commit, which supplants
`naga::ShaderStage` as the source of truth in this code.
2025-12-23 16:09:17 -05:00
Erich Gubler 05c1746ac6 refactor(core): make Interface::shader_stage_from_stage_bit a free function 2025-12-23 16:09:17 -05:00
Marijn Suijten 234ec66152 Allow optional RawDisplayHandle in InstanceDescriptor (#8012) 2025-12-23 14:53:04 -05:00
Andy Leiserson df4ae64df6 Check GPUDepthStencilState.format even when neither is enabled (#8766)
Fixes #8736
2025-12-22 18:33:59 -08:00
Kevin Reid 592736efa0 Expand query set documentation.
This is intended to provide all the information necessary to make use of
occlusion and timestamp queries, without needing to read example code or
the WebGPU spec.
2025-12-22 21:01:26 -05:00
Kevin Reid 97ec4a0e40 Explain where Device::features() and Device::limits() come from.
This clarifies that they are under user control and do not necessarily
represent hard impossibilities.
2025-12-22 21:01:26 -05:00
Kevin Reid 70415d02c1 Replace docs.rs links in Features with link_to_wgpu_docs!. 2025-12-22 21:01:26 -05:00
Kevin Reid 022f041292 Markdown fixes. 2025-12-22 21:01:26 -05:00
SuchAFuriousDeath 490f1f4153 fix(core): set is_open only after begin_encoding succeeds (#8765) 2025-12-22 17:59:12 -05:00
renovate[bot] 615c801ac4 chore(deps): update actions/upload-artifact action to v6 (#8773)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-22 16:49:38 -05:00
Dzmitry Malyshau bff1f6d095 (Naga) Cooperative Matrix Support (#8251) 2025-12-22 13:14:57 -05:00
renovate[bot] 4f2246069c chore(deps): update cts digest to da73c1d (#8772) 2025-12-21 20:37:26 -08:00
Erich Gubler 56c654b08d style(info): remove trailing whitespace (again) (#8759) 2025-12-19 20:41:03 -05:00
Andy Leiserson b9324e9da9 [deno] Fix error reporting for async pipeline creation 2025-12-19 15:12:03 -08:00
Andy Leiserson 59dbd6b954 [deno] Remove error return from new_render_pipeline 2025-12-19 15:12:03 -08:00
Andy Leiserson 90e162c0e3 [deno] Add some WebIDL converters 2025-12-19 15:12:03 -08:00
Erich Gubler bdf7d9bb5d fix(core): s/COPY_SRC/COPY_DST/ for first transition in external texture init. (#8760) 2025-12-19 13:53:47 -08:00
Opstic 42582cdb1b Re-add support for memoryless storage on A7 (#8725) 2025-12-19 13:20:44 -05:00
Erich Gubler 01578c6234 Minor fixups for wgpu-info (#8718) 2025-12-18 20:46:37 -05:00
Connor Fitzgerald 3f02781bb5 update metal to 0.33 v28.0.0 2025-12-17 22:05:10 -05:00
Connor Fitzgerald e72a77c4a5 update release checklist 2025-12-17 22:05:10 -05:00
Connor Fitzgerald 68c74ff242 Update versions 2025-12-17 22:05:09 -05:00
Connor Fitzgerald 999dd28a88 Update changelog 2025-12-17 22:05:06 -05:00
Inner Daemons fa8afdf3e0 Fix mesh task workgroup limit on nvidia (#8754) 2025-12-17 19:59:02 -05:00
Andy Leiserson c5e460fea1 Fix regressions in logical operator handling in const exprs (#8721)
* Fix regressions in logical operator handling in const exprs

Fixes regressions introduced by #7339
Fixes #8711
2025-12-17 13:17:57 -08:00
Inner Daemons b74007fed3 Fix mesh shader validation (#8749) 2025-12-17 14:54:51 -05:00