Commit Graph
10116 Commits
Author SHA1 Message Date
renovate[bot] b7ccd3323e chore(deps): update cts digest to 4637ae6 (#8860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 09:11:27 -05:00
renovate[bot] 5da230ad7f chore(deps): update jamesives/github-pages-deploy-action action to v4.8.0 (#8862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 09:11:04 -05:00
renovate[bot] 7f20fcf6a1 chore(deps): update cargo.lock (#8863)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 09:10:47 -05:00
cryvosh 1d520a098d Fix workgroupUniformLoad returning atomic types (#8791) 2026-01-10 12:21:48 -08:00
Andy Leiserson bed71efe59 Add AGENTS.md and skills (#8839) 2026-01-09 22:49:10 -05:00
Sam 11666170b4 expose adapter info on device (#8807)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-01-09 13:50:49 -07:00
Andy Leiserson 0a007b3117 chore(build): Waive unmaintained advisory for bincode (#8835) 2026-01-09 13:38:25 -07:00
Andy Leiserson 1481b23e55 Clean up imports/exports in wgpu_core::command (#8836) 2026-01-09 12:23:34 -08:00
Andy Leiserson cd7958561a Restore tracing support in wgpu
The loop/break changes in `play.rs` are reverting changes made in #4202.

Fixes #5974
2026-01-09 15:55:33 +01:00
Andy Leiserson d6b788829e docs(core): Update ID-related doc comments 2026-01-09 15:55:33 +01:00
Andy Leiserson 3bd29ef6eb Tracing tests 2026-01-09 15:55:33 +01:00
Andy Leiserson 985da29bcf Add in-memory tracing and inline data in traces 2026-01-09 15:55:33 +01:00
Andy Leiserson e412592b23 Store failed commands in traces 2026-01-09 15:55:33 +01:00
Moritz Zielke cb02f74aa4 fix(naga): avoid vector splat construction from invalid scalar type (#8829) 2026-01-08 15:06:14 -08:00
Teodor Tanasoaia 0cd51d20f3 [d3d12] fix panics in adapter creation (#8845) 2026-01-08 16:50:02 -05:00
Andy Leiserson a6d3f4f819 fix(naga): Validate sizes of override-sized arrays (#8822)
When validating in overrides-resolved mode, check that override-sized
arrays have a positive size.

Fixes #7806
2026-01-08 16:52:06 +00:00
Andy Leiserson e76c9e2fdb fix(naga): some cases of f16 construction from constants (#8816) 2026-01-08 17:21:34 +01:00
Andy Leiserson 7a6fe1c563 fix(naga): Fix constant evaluation of indexing by an i32 override 2026-01-08 17:19:37 +01:00
Andy Leiserson 2a895ea0fb refactor(naga): Consolidate some redundant constant "evaluation" helpers
* Eliminates code duplication between the `u32` and `bool` versions.
* Rename to `get_const_val` since these aren't really evaluating anything.
2026-01-08 17:19:37 +01:00
Andy Leiserson c4df1af1fd refactor(naga): Rename U32EvalError to ConstValueError 2026-01-08 17:19:37 +01:00
renovate[bot] bf075e7694 chore(deps): update crate-ci/typos action to v1.41.0 (#8811)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-07 11:35:58 -05:00
Andy Leiserson 376a36a9d2 fix(core): Validate storage texture formats when creating BGLs (#8735)
This moves existing validation from binding creation to BGL
creation. Binding creation already had a check that returns
`CreateBindGroupError::InvalidStorageTextureFormat` if the format
does not match the layout, so it is not necessary to revalidate
the format support at that point.
2026-01-07 17:00:57 +01:00
Moritz Zielke 6e55831aec fix(naga): don't crash on zero value of dynamically-sized array (#8741) 2026-01-07 01:48:34 +00:00
renovate[bot] cab1c37706 chore(deps): update cargo.lock (#8775)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-06 20:00:46 +00:00
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