This was a regression introduced by #8307.
For mipmapped multi-planar textures, requires that the size is a
multiple of a power of two determined by the mip level count, in lieu
of properly aligning the size of each mip level to an even
dimension. See #8491.
(The failure referred to by "fails due to missing validation" was
fixed before the regression, by #8402, but was not identified as fixed
and added to the test list at that time.)
This allows us to save some work when a bind group is replaced,
although WebGPU still requires us to fail a submission if any
resource in any bind group that was ever referenced during
encoding is destroyed.
Fixes#8399
Fixes a regression introduced by #8265 where we were mistakenly writing a comma before the first buffer argument (if no other arguments were printed before it).
Previously, the check was skipped if the copy was a single row, which is
not correct. The check should be made whenever bytes_per_row is
specified. It is permissible not to specify bytes_per_row if the copy is
a single row, but if it is specified, it must be aligned.
Also removes a redundant check of the `offset` alignment.
Since the offset and bytesPerRow alignment checks are not part of
"validating linear texture data", I chose to remove that instance of
them. These checks are now in `validate_texture_buffer_copy`, which
does not correspond 1:1 with the spec, but has a comment explaining how
it does correspond.
The WebGPU spec. `createBindGroup` [states][spec-ref] (emphasis mine):
> Device timeline initialization steps:
>
> …
>
> 2. If any of the following conditions are unsatisfied generate a
> validation error, invalidate _bindGroup_ and return.
>
> …
>
> For each `GPUBindGroupEntry` _bindingDescriptor_ in
> _descriptor_.`entries`:
>
> - …
>
> - If the defined binding member for _layoutBinding_ is:
>
> - …
>
> - `buffer`
>
> - …
>
> - If _layoutBinding_.`buffer`.`type` is
>
> - …
>
> - `"storage"` or `"read-only-storage"`
>
> - …
>
> - effective buffer binding size(_bufferBinding_) is a multiple of 4.
[spec-ref]: https://www.w3.org/TR/webgpu/#dom-gpudevice-createbindgroup
We were not implementing this check of effective buffer binding size.
Check that it's a multiple of 4, including
`webgpu:api,validation,createBindGroup:buffer,effective_buffer_binding_size:*`
that this is now implemented as intended.
* Restore allowance of unaligned buffer-texture copies
This fixes a regression introduced by #7948. However, it makes it
possible to reach a panic in initialize_buffer_memory if the copy
requires initializing a region of memory that is not 4B aligned.
* Fix CopyT2T of multi-layer depth/stencil textures
* Adjust test list
* Additional validation of buffer-texture copies
Fixes#7936, but leaves a TODO for #7947
* Skip tests failing on dx12
* Update comments and change unwrap_or to expect
* Additional validation of texture copies
* Copies must not overlap.
* Copies of multisampled or depth/stencil formats must span
the entire texture.
* Move no-op for zero-size copies after parameter validation.
Closes#2951Fixes#7844
* Fix issue with combined depth+stencil copy on dx12
* PR feedback
Limit to the `sampled_1d_coords` subtests for now as otherwise the tests
take a very long time to execute, and there are also some failures with
certain texture formats that are used in higher dimensions.
Adds a mode to compaction that removes unused functions, global
variables, and named types and overrides. This mode is used
everywhere except the compaction at the end of lowering, where
it is important to preserve unused items for type checking and
other validation of the module.
Pruning all but the active entry point and then compacting makes
`process_overrides` tolerant of missing values for overrides that are
not used by the active entry point.
Fixes#5885
Implementing it is tracked by #6495. In the mean time it is okay for it
to be a no-op. `destroy` just recovers the resources earlier than garbage
collection might, doing nothing is not a leak.