Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from gpuweb:main #18

Merged
merged 28 commits into from
Nov 22, 2024
Merged

[pull] main from gpuweb:main #18

merged 28 commits into from
Nov 22, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 29, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

greggman and others added 28 commits October 29, 2024 16:55
textureLoad and textureGather and textureGatherComapre do not use GPU mix weights
so don't load them. This will make the these test run on Intel Mac
compute stage where the weights are bad.
Compat will not have rgba32float as a render target support
except as an optional feature so refactor to not use it.
It's a little confusing but depth textures used for
"sampling" are not filterable but used for "comparisons"
they are.

|                               | texture_?d<f32> with depth texture | texture_depth_?? |
| ----------------------------- | ---------------------------------- | ---------------- |
| sampler `'linear'`            |                bad                 |      bad         |
| sampler_comparison `'linear'` |                N/A                 |      OK          |
This PR fix the expectation of fragment shader subgroup_invocation_id.
Any invocation id (including 0) within subgroup can be assigned to
inactivate invocations, and ids of active invocations can go larger than
active invocations number but still smaller than subgroup size. This PR
also fix the draw call for fragment subgroup tests.
texture_depth_xxx can only be used with non-filtering samplers
or comparison samples, not with filtering samplers.

see table in #4026

Also enabled more depth tests
This makes toneMapping optional which required updating a few tests to
use the nullish coalescing operator when accessing it.

New vertex formats are added that require updating capability_info.ts
(and tests for unorm8x4-bgra is added at the same time).

Finally dictionary types for copies are renamed throughout the CTS even
if deprecated aliases are available.
Cube arrays are unsupported in Compatibility mode.
This CL modify the shader for fragment subgroup_size built-in test to
prevent using broadcasting (from invocation 0), because any invocation
id can be inactivate for fragment shader. This CL use ballot instead and
do more validation within the shader.
* test 2d, 2d-array, 3d textures
* test fragment stages
* test out of range values
* Change fragment builtin tests to avoid non-uniform branches around
  subgroup operations
* Add diagnostic filters to execution tests relying on non-uniformity
See CL/diff for details

Also fixed an issue with copyBufferToTextureViaRender that it was
using the source format to decide whether to render to a depth or
stencil format but it should be using the destination format for
that.
Co-authored-by: Peter McNeeley <[email protected]>
This bug broke all textureXXCompare tests with unencodable depth formats.
* Fix readTextureToTextureViews for multisampled textures

I'm not sure when this bug was introduced. These tests (textureLoad:multisampled) used
to pass. Fixed the bug and added a test to hopefully find it
quicker if it breaks in the future.

Also added a test for createTextureWithRandomDataAndGetTexels
with a generator. This was fixed in a previous PR without a
a specific test as the fact that it failed other tests showed
it needed fixing but I decided it's probably best to keep
these tests too.

* Update src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts

Co-authored-by: Kai Ninomiya <[email protected]>
* Do not query weights for `textureSampleBaseClampToEdge`

`textureSampleBaseClampToEdge` does not need the GPU weights.

Skip loading them. This will let the tests run on Mac Intel
where the weights are bad.
* Test texture mix weights separately

Before this change, the texture builtin utils would query
how the local GPU mixes texture mip levels. It expected
that to be close to a linear interpolation which is true
for most GPUs. The known exceptions are Mac AMD and Mac
Intel in a compute stage.

It would check how far from linear iterpolation the weights
are. If the weights were too far off linear interpolation
it would assert.

With this case, those asserts for linear interpolation are
moved from all the tests that use these weights to a separate
test.

This allows the texture builtin tests to run further on devices
that have bad mix weights with the new test at least documenting
a particular GPU's failure to implement linear interpolation
between mip levels.
We sample a compressed texture on the GPU and compare that
to expected. If they don't match we try to identify which texels
were sampled. This is done by doing a binary search, creating
textures with some pixels white and some black and then sampling
the texture to see if those white pixels contributed to the
sample values.

We can't do this for compressed textures because we can not easily
create a compressed texture with white and black pixels exactly
where we want them to appear.

So, for compressed textures we just use rgba8unorm when identifying
sample points.

That can be useful to help find major bugs either in the CTS itself
or in the GPU that are true for all texture formats. Unfortunately,
if the bug is specificially with compressed textures this doesn't
help.

So, print out a warning that the sample points might not match.

Also, change the diagram to show blocks. Eexample when blockWidth = 2, blockHeight = 2

```
   +===+===+===+===+
   # a |   #   |   #
   +---+---+---+---+
   #   |   #   |   #
   +===+===+===+===+
   #   |   #   |   #
   +---+---+---+---+
   #   |   #   | b #
   +===+===+===+===+
```
Compat: Don't test depth textures with non-comparison samplers
These should genearte a validation error in compat but not in core.
@ErichDonGubler ErichDonGubler merged commit 4ff5ad7 into mozilla:main Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants