Skip to content

[wimp] fixes ubo padding size issue - #189958

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:webgl2-ubo-padding
Jul 27, 2026
Merged

[wimp] fixes ubo padding size issue#189958
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:webgl2-ubo-padding

Conversation

@gaaclarke

@gaaclarke gaaclarke commented Jul 23, 2026

Copy link
Copy Markdown
Member

issue #187212

This clamps the minimum bound size of a UBO to GL_UNIFORM_BLOCK_DATA_SIZE. This was causing a crash in firefox's webgl2 implementation.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically e: impeller Impeller rendering backend issues and features requests team-web Owned by Web platform team labels Jul 23, 2026
@gaaclarke
gaaclarke force-pushed the webgl2-ubo-padding branch from 4ee66b2 to fe6f517 Compare July 24, 2026 17:56
@github-actions github-actions Bot removed platform-web Web applications specifically team-web Owned by Web platform team labels Jul 24, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Jul 24, 2026
@gaaclarke
gaaclarke force-pushed the webgl2-ubo-padding branch from fe6f517 to 0d11bf6 Compare July 24, 2026 18:02
@gaaclarke
gaaclarke marked this pull request as ready for review July 24, 2026 18:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the GLES backend in Impeller to query and store the active uniform block data size, using the maximum of the buffer view length and the block data size when calling gl.BindBufferRange. It also introduces corresponding unit tests and mock GLES functions. The review feedback recommends clamping the retrieved block data size to at least zero to prevent potential integer underflow during type casting.

andywolff
andywolff previously approved these changes Jul 24, 2026

@andywolff andywolff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The new test passed for me locally with your changes and failed as expected without your changes. One minor comment to add to the Gemini review comment

andywolff
andywolff previously approved these changes Jul 24, 2026

@andywolff andywolff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, thanks

@gaaclarke

Copy link
Copy Markdown
Member Author

I've rerun mac_unopt twice and got 2 different results. One of the failures was in Play/AiksTest.VarietyOfTextScalesShowingRasterAndPath/OpenGLESSDF, but i've run that locally 100 times in a row and it passes for me.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 27, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Jul 27, 2026
Merged via the queue into flutter:master with commit 7adec80 Jul 27, 2026
20 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 27, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jul 28, 2026
flutter/flutter@9988960...0f02463

2026-07-28 [email protected] Roll Fuchsia Test Scripts from E8hJ1AfK8CtGtaES0... to 1frGe_KltAJKkeyPg... (flutter/flutter#190134)
2026-07-28 [email protected] iOS: Reject merged-platform-ui-thread=mergeAfterLaunch (flutter/flutter#190051)
2026-07-28 [email protected] iOS: Migrate TaskRunner tests to Swift Testing (flutter/flutter#190055)
2026-07-28 [email protected] Run Mac golden tests on ARM bots (flutter/flutter#189465)
2026-07-28 [email protected] iOS,macOS: Rename Swift test files to end in Tests.swift (flutter/flutter#190063)
2026-07-28 [email protected] Fix hcpp cliprect being behind by 1 frame when scrolling (flutter/flutter#189946)
2026-07-28 [email protected] Roll Fuchsia Linux SDK from vpboK5fPPIoFteqRq... to OZkZC_2CZ_G5rbMIS... (flutter/flutter#190115)
2026-07-27 [email protected] Add Ishaq Hassan to AUTHORS (flutter/flutter#190064)
2026-07-27 [email protected] [wimp] fixes ubo padding size issue (flutter/flutter#189958)
2026-07-27 [email protected] Roll pub packages (flutter/flutter#189872)
2026-07-27 [email protected] Move tool host_cross_arch tests into different shards (flutter/flutter#189470)
2026-07-27 49699333+dependabot[bot]@users.noreply.github.com Bump actions/labeler from 6.2.0 to 7.0.0 in the all-github-actions group (flutter/flutter#190099)
2026-07-27 [email protected] [ios]do not nuke user input path when running uiscene integration test (flutter/flutter#186436)
2026-07-27 [email protected] ci: verify_binaries_pre_codesigned part 2 (flutter/flutter#190078)
2026-07-27 [email protected] Roll Abseil to ff6e8ce3e932 (flutter/flutter#189998)
2026-07-27 [email protected] Android_hardware_smoke_test: clean up golden copy in CI (flutter/flutter#189948)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants