Closed Bug 2087233 Opened 1 month ago Closed 23 days ago

[wpt-sync] Sync PR 64117 - webgl: Fix texImage3D size limits for levels and 2D arrays

Categories

(Core :: Graphics: CanvasWebGL, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64117 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64117
Details from upstream follow.

mxmgorin <102797145+mxmgorin@users.noreply.github.com> wrote:

webgl: Fix texImage3D size limits for levels and 2D arrays

This makes texImage3D validate level before using it to compute the size limits, and applies MAX_TEXTURE_SIZE and MAX_ARRAY_TEXTURE_LAYERS to TEXTURE_2D_ARRAY textures, as required by OpenGL ES 3.0 3.8.3.

Previously, a level of 32 or greater caused a division-by-zero panic that crashed the script thread. Additionally, 2D array textures were limited by MAX_3D_TEXTURE_SIZE in every dimension, and the maximum number of layers was halved at each mipmap level.

Part of #<!-- nolink -->37738.
Testing: Adds webgl/texImage3D-size-limits.html, which reproduces the crash without this change.
Reviewed in servo/servo#49201

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Graphics: CanvasWebGL
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 21 tests

Status Summary

Firefox

OK : 1
PASS: 4

Chrome

OK : 1
PASS: 4

Safari

OK : 1
PASS: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9d72f6e9c9ed https://hg.mozilla.org/integration/autoland/rev/4ff66ace7c1a [wpt PR 64117] - webgl: Fix texImage3D size limits for levels and 2D arrays, a=testonly
Status: NEW → RESOLVED
Closed: 23 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.