Skip to content

Texture compression unaligned#4676

Merged
kainino0x merged 8 commits into
gpuweb:mainfrom
castano:texture-compression-unaligned
Jul 14, 2026
Merged

Texture compression unaligned#4676
kainino0x merged 8 commits into
gpuweb:mainfrom
castano:texture-compression-unaligned

Conversation

@castano

@castano castano commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Issue: gpuweb/gpuweb#2006

Add tests to support the proposed 'texture-compression-unaligned' feature. gpuweb/gpuweb#6312


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Results for build job (at 359fd6c):

-webgpu:api,operation,adapter,requestDevice:features,known:* - 24 cases, 24 subcases (~1/case)
+webgpu:api,operation,adapter,requestDevice:features,known:* - 25 cases, 25 subcases (~1/case)
+webgpu:api,operation,command_buffer,copyTextureToTexture:color_textures,compressed,unaligned,non_array:* - 94 cases, 1974 subcases (~21/case)
+webgpu:api,operation,command_buffer,image_copy:compressed_textures,unaligned_mip_level_0:* - 156 cases, 780 subcases (~5/case)
+webgpu:api,validation,capability_checks,features,texture_compression_unaligned:createTexture,unaligned_size:* - 416 cases, 416 subcases (~1/case)
-TOTAL: 283187 cases, 2326095 subcases
+TOTAL: 283854 cases, 2329266 subcases

@Kangz
Kangz requested a review from kainino0x June 26, 2026 11:42
Comment thread src/webgpu/api/validation/createTexture.spec.ts
@Kangz

Kangz commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

I added experimental support for the extension in Chromium that you can try with --enable-unsafe-webgpu. It should appear in a Chromium Canary today or tomorrow (see when releases are listed here)

@castano

castano commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

I added experimental support for the extension in Chromium that you can try with --enable-unsafe-webgpu. It should appear in a Chromium Canary today or tomorrow (see when releases are listed here)

Thanks @Kangz! I tried with --enable-unsafe-webgpu on Chrome Canary 152.0.7939.2 and still don't see the feature exposed. Is this only exposed in Chromium? Are there any other flags that I may be missing?

@Kangz

Kangz commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

My bad, I thought the Chromium change trivial so I didn't check and I missed something. With that CL I can see the feature exposed locally (on mac M1) with --enable-unsafe-webgpu. So on Monday it should be in Canary.

@Kangz

Kangz commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

And I can't land that last CL because the existing tests will enable texture-compression-unaligned and fail. We should land this PR and follow up with completing tests afterwards. I checked earlier that the test pass with dawn.node. @kainino0x PTAL!

@kainino0x
kainino0x enabled auto-merge (squash) July 14, 2026 00:27
@kainino0x
kainino0x disabled auto-merge July 14, 2026 00:27
@kainino0x
kainino0x enabled auto-merge (squash) July 14, 2026 00:27
@kainino0x
kainino0x merged commit 70c1848 into gpuweb:main Jul 14, 2026
1 check passed
@Kangz

Kangz commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Looking at the coverage, I think we should have at least one more test that samples a texture with unaligned mip level 0 and checks that the correct texel value is returned for the border (so the value in the middle of the block and not the border of the block itself).

I'll land the Chromium CL and try to get agreement in the WebGPU WG to land the feature in the spec after testing is done.

@Kangz

Kangz commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

https://chromium-review.git.corp.google.com/c/chromium/src/+/8064574 landed in Chromium so it should soon be possible to test texture-compression-unaligned in Canary. I'm also giving a try at adding it to the GL backend.

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.

3 participants