-
Notifications
You must be signed in to change notification settings - Fork 688
Add offset test to webgl-compressed-texture-astc #3750
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
base: main
Are you sure you want to change the base?
Add offset test to webgl-compressed-texture-astc #3750
Conversation
sdk/tests/conformance/extensions/webgl-compressed-texture-astc.html
Outdated
Show resolved
Hide resolved
| // ASTC block size is always 16 bytes (128 bits) | ||
| const offset = (width / blockSize.width + height / blockSize.height - 1) * 16; | ||
|
|
||
| gl.compressedTexSubImage2D(target, 0, x, y, blitWidth, blitHeight, format, data, offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness, please also test the length override parameter like
compressedTexSubImage2D(target, 0, x, y, blitWidth, blitHeight, format, data,
0, data.length - offset)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| checkResult(target, [gl.NO_ERROR, gl.INVALID_ENUM, gl.INVALID_ENUM ], "2D", true); | ||
|
|
||
| if (useES3) { | ||
| gl.compressedTexSubImage3D(target, 0, x, y, 0, blitWidth, blitHeight, 1, format, data, offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as well
Using
compressedTexSubImage3Don a layered texture with a non-null y offset is currently raising anINVALID_VALUEon Meta Quest 2.This PR adds a test that ensures using an offset works as expected.
EDIT: Looks like the behavior is broken on a lot of Qualcomm chips. Test fails on Browserstack for Samsung Galaxy Z Fold / S25, as well as OnePlus phones