webgl: Validate dimensions in TexImage3D properly with level#44367
Merged
yezhizhen merged 1 commit intoservo:mainfrom Apr 20, 2026
Merged
webgl: Validate dimensions in TexImage3D properly with level#44367yezhizhen merged 1 commit intoservo:mainfrom
yezhizhen merged 1 commit intoservo:mainfrom
Conversation
yezhizhen
approved these changes
Apr 20, 2026
The tex-3d-size-limit.html test verifies that TexImage3D errors out with gl.INVALID_VALUE if the width / height / depth parameters are greater than gl.MAX_3D_TEXTURE_SIZE / 2 ** level, in accordance with the mipmap levels definition. This patch adds this checks, and fixes a s/depth/level/ typo, and should stabilize tex-3d-size-limit.html: all its sub-tests will succeed until the first call to (not implemented) TexSubImage3D, that will end the test. It's still possible for the test to fail on environments where gl.MAX_3D_TEXTURE_SIZE is not 8192 (because the numbering of tests will be different), and this will have to be until we make all sub-tests pass, i.e. TexSubImage3D is implemented. Testing: A bunch of expected failures are removed. Fixes: servo#44280 Signed-off-by: Simon Martin <simon@nasilyan.com>
83e3530 to
b2f93be
Compare
Contributor
Author
|
Thanks @yezhizhen for the suggestion; I have just pushed a new version with the relevant information added. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tex-3d-size-limit.html test verifies that TexImage3D errors out with gl.INVALID_VALUE if the width / height / depth parameters are greater than gl.MAX_3D_TEXTURE_SIZE / 2 ** level, in accordance with the mipmap levels definition.
This patch adds this checks, and fixes a s/depth/level/ typo, and should stabilize tex-3d-size-limit.html: all its sub-tests will succeed until the first call to (not implemented) TexSubImage3D, that will end the test.
It's still possible for the test to fail on environments where gl.MAX_3D_TEXTURE_SIZE is not 8192 (because the numbering of tests will be different), and this will have to be until we make all sub-tests pass, i.e. TexSubImage3D is implemented.
Testing: A bunch of expected failures are removed.
Fixes: #44280