Add texture-compression-unaligned feature to relax texture size block alignment requirement.#6312
Add texture-compression-unaligned feature to relax texture size block alignment requirement.#6312castano wants to merge 1 commit into
texture-compression-unaligned feature to relax texture size block alignment requirement.#6312Conversation
…ck alignment requirement.
|
Marking non-substantative for IPR as it lifts a restriction and was contributed in discussions many times previously. |
| - New WGSL extensions: | ||
| - [=extension/subgroup_size_control=] | ||
|
|
||
| <h3 id=dom-gpufeaturename-texture-compression-unaligned data-dfn-type=enum-value data-dfn-for=GPUFeatureName>`"texture-compression-unaligned"` |
There was a problem hiding this comment.
The group will likely bikeshed the name but that should be minor, the blocker will be confidence in testing. Looks good otherwise!
|
Previews, as seen when this build job started (aec2074): |
jimblandy
left a comment
There was a problem hiding this comment.
Hard to disagree with the spec change, as long as it's implementable.
mwyrzykowski
left a comment
There was a problem hiding this comment.
Can @RafaelCintron please confirm if this is needed as a feature extension?
Based on https://github.com/gpuweb/gpuweb/wiki/System-Requirements and #2006 (comment) I think the answer is yes, since D3D12 on versions prior to 1909 would require this, but would be good to get confirmation from Microsoft.
|
@mwyrzykowski I think that comment is pretty unambiguous:
(https://github.com/gpuweb/gpuweb/wiki/System-Requirements and AFAICT Chrome still supports Windows 1507) Did you have a specific concern about it? IIUC it's not possible to query |
It’s unfortunate to introduce fragmentation for such a small feature but given the value, I am fine with it :) |
An interesting observation is that the alignment requirements only apply to the BC formats. These are the only formats that are supported under D3D11 & D3D12, so they are the only formats that can be subject to that constraint in practice. A potential simplification would be to only require alignment of BC formats, and to expose the "texture-compression-bc-unaligned" extension to relax that requirement. Applications that target ASTC or ETC formats then do not have to worry about querying and enabling the extension, since they are unaffected. If this seems like a good idea I'd be happy to do the necessary work to update the spec and the test suite. |
|
Oh, that's a good point. Yes, that seems preferable! It would mean we're adding unaligned ASTC/ETC2 textures to core, which is great but means we need some feature detection. This came up elsewhere recently so I've filed #6337 about it. |
|
@castano We discussed this in the working group meeting and there's a concern that it'll be more complicated to do it that way because, if this is also disallowed by OpenGL ES 3.1, then the validation will be affected by TWO features, We'll want more info on whether GLES3.1 disallows this before deciding which path to take. |
From the developer point of view it's certainly simpler to just consider one feature. It would have been nice if the constrain in WebGPU only existed for BC formats, but relaxing it now depending on format and OS/version adds unnecessary complexity. A single feature would serve developers better.
I believe GLES never imposed this constraint. However, WebGL did have that requirement for the BC formats:
Note that this language is not present in the ASTC and ETC WebGL extensions. |
GPU Web WG 2026-07-15 Atlantic-time
|
|
Testing on OpenGL with this WIP CL, the tests seem to pass on the Pixel 10 GLES driver, but not the Pixel 6 one with failures like below. Given this I'd feel more comfortable if we could enable / disable the feature based on drivers as well to avoid exposing the buggy feature (so that would mean |
|
kainino0x marked as non substantive for IPR from ash-nazg. |
|
I can't find anything about restrictions in OpenGL or OpenGL ES on the size of the texture (at base mip level) being a multiple of the block size, not even in Just a note: To reduce the illusion of fragmentation a bit, we could make it so that you can't create a device with ASTC or ETC2 without This doesn't have to be done now, it can wait until we have clearer results. It would just have a minor temporary impact on cross-browser compatibility if it comes after multiple browsers ship |
kainino0x
left a comment
There was a problem hiding this comment.
This should get one more stamp from the WG after the GLES discussions but otherwise I think this will be ready to land.
This PR updates the spec with the feature discussed in #2006
Update to the validation test suite is in the following PR: gpuweb/cts#4676