Commit graph

3715 commits

Author SHA1 Message Date
22311d997d Remove old sync-upstream.yml, superseded by Cold-Air-Networks/mirror-sync
Some checks failed
push / build (push) Failing after 43s
2026-08-01 19:39:27 -08:00
a37a0eff23 ci: add manual sync-from-upstream workflow 2026-08-01 18:52:13 -08:00
dan sinclair
dc20b8682a
Add frag_depth validation tests. (#4679)
Some checks are pending
push / build (push) Waiting to run
Add validation tests for the `fragment_depth` extension.

Issue: https://github.com/gpuweb/gpuweb/issues/5342
2026-07-29 13:04:05 -04:00
Natalie Chouinard
a152afa827
Add chained swizzle assignment tests (#4688)
Add validation and execution tests for chained swizzles on the LHS of an
assignment. These are valid with the swizzle_assignment language feature
as long as the final indices actually assigned are free from duplicate
targets.

Bug: crbug.com/539634915
2026-07-29 10:37:48 -04:00
Natalie Chouinard
63cb9fcd6c
Test index into swizzle for assignment (#4687)
Array-like indexing into swizzle views was added to the swizzle
assignment WGSL language feature specification in a recent change to the
spec PR:
4b8daf8f0c
2026-07-28 09:59:48 -04:00
alan-baker
499044af47
Fix buffer_view validation tests (#4686)
* bufferView and bufferArrayView tests had invalid checks for the
  parameter type tests (copypasta)
2026-07-21 15:03:28 -04:00
alan-baker
a5da757654
Fix more instances of arrays in immediate vars (#4685)
* Filter invalid variants in required_alignment test
2026-07-20 10:46:07 -04:00
alan-baker
f4186348cf
Fixup pointer tests after buffer_view landed (#4684)
* Pointers to runtime arrays can be declared in workgroup and uniform
  storage classes with the buffer_view language feature
2026-07-17 16:09:41 -04:00
alan-baker
8dc100410a
Fix pipeline_immediate:required_slots (#4683)
* Fix pipeline_immediate:required_slots

* Arrays cannot be used in immediate variables so switch to dynamic
  indexing of a vector

* fix test
2026-07-17 11:54:01 -04:00
Natalie Chouinard
9fb8ce60d1
Correct swizzle assignment on pointer tests (#4682)
The swizzle assignment spec was updated so that creating a SwizzleView
from pointer requires support for pointer_composite_access, so CTS tests
here are updated to correctly handle the interaction between
swizzle_assignment and pointer_composite_access. Execution tests for
swizzle assignment via pointer are now skipped if the
pointer_composite_access language feature is not available, and
validation tests are added to validate both cases.

Bug: crbug.com/534329233
2026-07-16 10:58:45 -04:00
alan-baker
af9a578195
buffer_view CTS (#4652)
* Validation of buffer type and related builtin functions
* Execution tests for buffer_view
2026-07-14 19:54:46 +00:00
Ignacio Castaño
70c1848940
Texture compression unaligned (#4676)
* Add 'texture-compression-unaligned' feature name.

* createTexture tests pass when texture-compression-unaligned feature is supported.

* Add test to ensure createTexture with unaligned extents fails without texture-compression-unaligned, but succeeds otherwise.

* Add test to validate correctness of copyTextureToTexture for block compressed textures with unaligned sizes.

* Validate correctness of image copies of compressed textures with unaligned dimensions.

* Fix test `texture_size,3d_texture,compressed_format`.
2026-07-14 11:57:42 +00:00
dan sinclair
79f4a4897b
Remove the listing_meta.json file. (#4681)
The last references in CTS are removed, and the updating code in Dawn
has been deleted. So, remove the listing_meta.json file itself.

Fixed #4592
2026-07-13 13:42:17 -07:00
dan sinclair
1d676e4895
Remove code using the listing_meta.json file. (#4680)
* Remove code using the listing_meta.json file.

This CL removes the infrastructure which validates and uses the
listing_meta.json file. The listing_meta.json file itself will be
removed in a followup CL.

Issue: #4592

* remove chunked2sec

* run lint fix

* fix lint warnings

* Restore case count report
2026-07-09 20:18:43 -07:00
Jiawei Shao
1aae59469a
Test using 0 as the override value of @subgroup_size (#4678)
This patch adds a regression test that uses 0 as the override value
of `@subgroup_size` for Dawn.
2026-07-01 15:58:49 +08:00
shaoboyan091
663ea46471
Add type tests for WGSL immediate pointers (#4675)
This patch extends type validation for the `immediate` address space.

The pointer tests cover `ptr<immediate>` parsing, missing store types,
invalid access modes, read-only pointer use, and immediate store types
that must be rejected, including arrays and atomics.

The type suites also recognize `immediate` as an address-space
enumerant and check that `ref<immediate, T>` is not a nameable type.
2026-06-29 08:58:07 +08:00
Jiawei Shao
e8389d86fc
Bump @webgpu/types to 0.1.71 (#4674)
This patch bumps @webgpu/types to 0.1.71 with below changes:
- `setImmediates` is a required method.
- `maxImmediateSize` is a required property.
- `subgroup-size-control` is a valid `GPUFeatureName`.
2026-06-25 03:26:21 +00:00
shaoboyan091
7da6bb4999
Add declaration tests for WGSL immediate variables (#4661)
* Add declaration tests for WGSL immediate variables

This patch adds a focused declaration suite for `var<immediate>`.

The new tests cover accepted scalar, vector, matrix, and struct store
types, rejected store types, module-scope-only declarations, rejection
of binding attributes, rejection of explicit access modes, and the
one-immediate-variable-per-entry-point rule.

It also threads `immediate` through the existing declaration tests so
the generic address space coverage checks the same declaration access
rules as storage, uniform, private, workgroup, and function variables.
The context-dependent resolution table now recognizes
`immediate_address_space` as a language feature name.

* Treat f16 immediate store types as valid per spec

The WGSL spec allows f16 in the immediate address space: f16 is a
host-shareable constructible scalar, and immediate store types only
exclude arrays and structures containing arrays. Remove the f16
immediate skip so the validation tests assert the spec-correct result
(f16 immediate compiles). An implementation that rejects f16 immediate
is non-conformant and will be flagged by these tests.

* Restrict f16 immediate store types and simplify scope test

The WGSL spec is restricting f16 in the immediate address space
(gpuweb/gpuweb#6297), so move f16 and vec3h to the rejected immediate
store types and exclude f16 types from the accepted immediate store
types in the shared module-scope coverage.

Simplify the scope test to declare the variable at function scope for
both cases and vary only the address space, using the function address
space as the control. Module-scope validity is already covered by the
module_scope_types test.

* Allow f16 immediate store types per spec

The WGSL spec allows f16 in the immediate address space, so f16 and
vec3h are valid immediate store types and are expected to compile.

No skip is added for implementations that reject f16 immediate data; an
implementation that does so is non-conformant, and these tests flag it.
2026-06-25 10:16:06 +08:00
shaoboyan091
b128863553
Handle setImmediates command in encoder open-state tests (#4673)
The render pass, render bundle, and compute pass command switches listed
setImmediates as a parameter but had no matching case. Once an implementation
exposes setImmediates, the feature-presence guard no longer skips and the
command falls through to unreachable().

Add a setImmediates case to each switch that issues a minimal valid call,
keeping the existing feature-presence guards so the cases still skip when the
feature is unavailable.

Issue #4669
2026-06-23 19:22:30 -07:00
Jiawei Shao
51467800a4
Add test to verify all the valid subgroup sizes work for subgroup size attribute (#4666)
* Add test to verify all the valid subgroup sizes work for subgroup size attribute

This patch adds an execution test to verify all the power-of-two values
in [SubgroupMinSize, SubgroupMaxSize] can be used as @subgroup_size
attribute in a simple compute pipeline.

* Address reviewer's comment

* Verify an error occurs when subgroup size is too small or too large
2026-06-22 22:16:30 +00:00
Luo Zhihao
5aac18f1af
Change RangeError to OperationError in SetImmediatesTest (#4646) 2026-06-22 20:49:35 +00:00
David Neto
c6a3620cf2
update test list: add fragment_builtins:primitive_index (#4672) 2026-06-22 13:41:07 +00:00
David Neto
8d64795d00
sample_mask input: allow either full coverage mask or (1<<sample_index) (#4671)
This allows the varying behaviour observed on different platforms.

Generalize the "findFailedPixels" utility to allow two reference
"expected" texel views.  A pixel comparison succeeds if the "actual"
texel matches the texel from either of the "expected" or the "alternate
expected" texel views.

See https://github.com/gpuweb/gpuweb/issues/5457

Co-authored-by: alan-baker <alanbaker@google.com>
2026-06-22 09:31:18 -04:00
alan-baker
f529c5ae64
Extra WGSL validation for @align (#4667)
* Extra WGSL validation for @align

* Cover no value decl usage
* Cover more address spaces
* Cover other types of decls

* reduce parameterizations by adding subcases

* change for review
2026-06-19 20:20:50 -04:00
Marc Stampfli
cf0073691a
Add i32 remainder tests for negative dividends across non-power-of-two moduli (#4665)
The existing remainder cases only use moduli 10 and 256 (from the sparse i32 range), missing value-dependent codegen paths such as modulus 768 where some implementations compute signed % as unsigned for negative operands (e.g. -1 % 768 returns 255 instead of -1). Add a remainder_negative test covering negative dividends across moduli 3/7/100/256/768/1000. See https://github.com/gfx-rs/wgpu/issues/8191.
2026-06-16 14:40:53 -04:00
dan sinclair
048fece46a
CTS validation/execution for atomic_vec2u_min_max (#4662)
Add CTS tests for the Atomic Vec2u Min/Max extension. These tests were created by @petermcneeleychromium.

The tests have been run and pass on Dawn on Metal.

---------

Co-authored-by: Peter McNeeley <petermcneeley@google.com>
2026-06-15 23:38:20 -04:00
Yang Gu
47babb2760
Access subgroupMinSize/subgroupMaxSize directly on GPUAdapterInfo (#4663)
These properties are now exposed on GPUAdapterInfo, so the local
`SubgroupProperties` interface and the `adapterInfo as SubgroupProperties`
casts are no longer needed. Read them directly via
`adapterInfo.subgroupMinSize` / `adapterInfo.subgroupMaxSize`.

They are still declared optional in @webgpu/types (number | undefined),
so a non-null assertion (!) is used at these call sites, which are all
gated on the `subgroups` (or `subgroup-size-control`) feature where the
values are guaranteed to be present.

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-06-13 05:19:17 +00:00
Natalie Chouinard
d7791c8417
Add insertBits edge case regression test (#4664)
This reproduces a GPU hang on Mac for the Dawn implementation (see
crbug.com/506180954).
2026-06-13 00:56:51 +00:00
shaoboyan091
12200d24a6
Add shared support for WGSL immediate validation (#4658)
* Add shared support for WGSL immediate validation

This patch adds the shared CTS plumbing needed by the follow-up
WGSL `immediate` address space validation tests.

It adds `immediate_address_space` to the known WGSL language feature
list, models `immediate` in the address space metadata, and treats it
as a module-scope, unbound, read-only address space with
host-shareable store types.

The validation helpers emit the required WGSL `requires` directive and
skip immediate tests when immediate data is not exposed by the browser.
The skip checks `setImmediates`/`maxImmediateSize` because current
Chrome Canary exposes the API before advertising the WGSL feature.

This also removes two now-unnecessary address-space type assertions
that became redundant once the shared metadata was typed by
`AddressSpace`.

* Apply suggestions from code review

Will remove them when real immediate case added.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Revert "Apply suggestions from code review"

This reverts commit 55434a1ea18b176b33c1a25866938c99282f755c.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-11 08:45:44 +08:00
Yang Gu
70b970834c
Skip quadBroadcast/quadSwap split tests when subgroup size < 8 (#4656)
When the implementation selects a subgroup size < 8 for the test's
workgroup, the split predicate `id < subgroupSize / 2` bisects the
only quad in the subgroup, leaving no fully active quad — which is
undefined behavior for quad operations. This is observed on WARP
(which selects its native D3D12 wave size: 4 on arm64 NEON, often 4
on x86 for small workgroups) and may occur on any implementation
that picks a small native subgroup size at runtime.

Two coordinated guards:

  * In the shader, the quad call is wrapped in
    `if subgroupSize >= 8u { ... }` so it never executes when the
    split predicate would be unsafe.
  * In the JS checker, the actual subgroupSize is read out of
    metadata.subgroup_size[0] and the test is skipped with t.skip
    when it is < 8, so the missing output doesn't get flagged as a
    failure.

Querying GPUAdapterInfo.subgroupMinSize would not be sufficient: the
size the implementation actually selects depends on the shader (its
workgroup size, register pressure, etc.), not just the adapter's
minimum supported size. Reading subgroupSize from inside the test
shader itself is the only reliable signal.
2026-06-04 16:18:19 +00:00
Luo Zhihao
a4af861a04
Allow view usage 0 for transient textures in texture_view_usage_of_multiple_usages test (#4651) 2026-06-03 01:56:58 +00:00
Jiawei Shao
9964a05b4d
Ensure WorkgroupSizeX never exceeds the maximum value in subgroup size control tests (#4655)
Issue: #4640
2026-06-02 09:40:55 -07:00
James Price
b507bd117e
Add validation coverage for const SHIFT override (#4649)
Test that we correctly reject excessive shift amounts when the LHS is
constant and the RHS is an override.

Missing coverage as per a recent Tint bug.
2026-05-28 20:52:45 -04:00
Jiawei Shao
16f8a068db
Add shader validation tests on subgroup-size-control - Part II (#4648)
* Add shader validation tests on subgroup-size-control - Part II

This patch adds the second part of the shader validation tests on the
extension subgroup-size-control:

- The value of @subgroup_size must be a constant expression or an
  override expression that resolves to an i32 or an u32.
- The value of @subgroup_size must be a power of 2.
- The x-dimension of the entry point's workgroup_size must be a
  multiple of the @subgroup_size value, or a pipeline creation error
  occurs

Issue: #4640

* Address reviewer's comments
2026-05-27 08:44:05 +08:00
Jiawei Shao
9a848e6eae
Add shader execution tests on the feature subgroup-size-control (#4643)
* Add shader execution tests on the feature `subgroup-size-control`

This patch adds the shader execution tests on the feature
`subgroup-size-control`:
- The value of the built-in variable `subgroup_size` must equal the
  value of the `@subgroup_size` attribute.
- At least one value in the range of [GPUAdapterInfo.subgroupMinSize,
  GPUAdapterInfo.subgroupMaxSize] can be used as `@subgroup_size`
  attribute in a simple compute pipeline.

* Address reviewer's comments

* Address reviewer's comments
2026-05-26 09:12:13 +08:00
Jiawei Shao
d5d1f9df60
Add API validation tests on the extension subgroup-size-control (#4642)
This patch adds the API validation tests on the extension
`subgroup-size-control`:
- Enabling subgroup-size-control on the creation of device should
  also enable subgroups.
2026-05-22 23:18:32 +00:00
Kai Ninomiya
f72cf53bbe
Test viewFormats with TRANSIENT_ATTACHMENT (#4647)
* Test viewFormats with TRANSIENT_ATTACHMENT

This should not be allowed.

Issue: https://github.com/gpuweb/gpuweb/issues/6263

* also see what happens if we do try to create a view

* fix for compat
2026-05-21 14:13:14 -07:00
Jiawei Shao
f08551b0fc
Add shader validation tests on subgroup-size-control - Part I (#4641)
* Add shader validation tests on `subgroup-size-control` - Part I

This patch adds the first part of the shader validation tests on
the extension `subgroup-size-control`:
- Enabling `subgroup_size_control` must also enable `subgroups`.
- The WGSL attribute `@subgroup_size` must be used when
  `subgroup_size_control` is enabled.
- `@subgroup_size` can only be used in the compute stage

issue: #4640

* Fix comments

* Address reviewer's comments
2026-05-19 18:39:32 +00:00
Corentin Wallez
97b4991bf9
Add tests for validation that stripIndexFormat and indexFormat must match (#4644) 2026-05-19 17:25:21 +02:00
Corentin Wallez
3b327ebc44
Check that an unused, destroyed occlusion query causes submit to fail (#4639)
See https://github.com/gpuweb/gpuweb/issues/6247
2026-04-29 18:10:30 +02:00
alan-baker
cea97a80a7
Add tests for override-sized array pointer parameters (#4632)
Fixes #4629

* Validation and execution tests
2026-04-28 18:21:10 +00:00
Kai Ninomiya
9211907025
Test that createBuffer/createTexture only allows exposed usages (#4634)
* Test that createBuffer/createTexture only allows exposed usages

For any buffer/texture usages known by the CTS, check that the browser
only accepts it if it also exposes it.

Currently the buffer test passes in all browsers - there haven't been any
new usages in a long time. But next time we add a usage, this makes sure
that when they start accepting the usage, they also start exposing it.

The texture test fails in Safari because it's missing validation of
unknown texture usages (this is also caught by another new test that
tests an invalid usage). Passes in Chrome/Firefox.

Unrelated cleanup: filter out redundant cases in createBuffer usage tests.

* Apply suggestions from code review

Co-authored-by: François Beaufort <beaufort.francois@gmail.com>

---------

Co-authored-by: François Beaufort <beaufort.francois@gmail.com>
2026-04-28 12:21:22 +00:00
Kai Ninomiya
5170f8a2cd
Test createTexture() with invalid usages or combinations of usages (#4636)
* Test createTexture() with invalid usages or combinations of usages

Per spec, TRANSIENT_ATTACHMENT cannot be used in any combination of
usages other than RENDER_ATTACHMENT | TRANSIENT_ATTACHMENT.

* address comments
2026-04-28 11:30:16 +00:00
Kai Ninomiya
0d85e34736
Test createView and resolveTarget with TRANSIENT_ATTACHMENT (#4635)
This restriction is missing from the spec, but textures with
TRANSIENT_ATTACHMENT must not be used as resolve targets.

This must apply regardless of any usage subsetting in createView(). For
simplicity (to better avoid bugs in validation elsewhere), it's proposed
that createView() simply cannot subset a TRANSIENT_ATTACHMENT texture.
This test implements that proposal.
2026-04-28 11:12:07 +00:00
Kai Ninomiya
1a90098810
Correct MAINTENANCE_TODO about TRANSIENT_ATTACHMENT (#4633) 2026-04-28 10:14:11 +00:00
Natalie Chouinard
408288e0d3
Add vec function var uniformity cases (#4630)
Add cases to the uniformity tests for vector function variables,
including cases to test the uniformity rules for swizzle assignment as
specified in: https://github.com/gpuweb/gpuweb/pull/5268

All tests pass in Tint following this fix:
https://dawn-review.googlesource.com/c/dawn/+/304176
2026-04-27 10:27:43 -04:00
Greggman
5c6b119c4f
Add more timestamp tests (#4631)
* Test that resolving a timestamp twice produces the same result.
* Test that slots that are never used resolve to zero.
2026-04-22 19:02:13 -07:00
Kai Ninomiya
5234d6547f
Change subcases to cases in api,validation,buffer,create:limit (#4628) 2026-04-20 21:20:14 -07:00
Greggman
ded8b7750b
Check clearing of 3d textures when rendering to a slice (#4625)
* Check clearing of 3d textures when rendering to a slice

There was an issue in some browsers where, when rendering
to a slice of a 3d texture, they'd mark the entire texture
as initialized even though only the individual slice was
initialized.

Updated the tests so they check the entire texture.
Also updated them to try every format.
2026-04-20 17:51:16 +00:00
Greggman
3962314d06
Test Reusing the same query in the same command buffer (#4626)
Queries are not allowed to be used more than once in
the same render pass but they are allowed to be used
more than once in the same command buffer, without
resolving inbetween use.

Add a test this works as expected.
2026-04-18 02:02:35 +00:00