[windows]: adjusts uniform buffers to hit hlsl optimization by gaaclarke · Pull Request #188538 · flutter/flutter · GitHub
Skip to content

[windows]: adjusts uniform buffers to hit hlsl optimization#188538

Open
gaaclarke wants to merge 6 commits into
flutter:masterfrom
gaaclarke:hlsl-structured-uniforms
Open

[windows]: adjusts uniform buffers to hit hlsl optimization#188538
gaaclarke wants to merge 6 commits into
flutter:masterfrom
gaaclarke:hlsl-structured-uniforms

Conversation

@gaaclarke

@gaaclarke gaaclarke commented Jun 24, 2026

Copy link
Copy Markdown
Member

issue #188348

This removes the following class of HLSL warnings:

WARN: ProgramD3D.cpp:711 (rx::ProgramD3D::linkJobImpl): Uniform block 'FragInfo' will be slow to compile. See UniformBlockToStructuredBufferTranslation.md (https://shorturl.at/drFY7) for details.

By putting large uniform arrays into their own uniform buffer the HLSL compiler in ANGLE is able to optimize the compilation using a StructuredBuffer. This removes the warning about long compilation time.

testing: refactor, no logical change

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.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 24, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jun 24, 2026
@gaaclarke

Copy link
Copy Markdown
Member Author

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 25, 2026
@gaaclarke gaaclarke marked this pull request as ready for review June 25, 2026 16:44

@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 refactors several shaders and their corresponding host-side rendering code to move large arrays (such as colors, stop pairs, and kernel samples) into dedicated uniform blocks, preventing size and alignment issues on certain graphics platforms. Feedback recommends passing the temporary returned by GenerateBlurInfo directly to LerpHackKernelSamples to enable copy elision and avoid copying a large struct.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Jun 25, 2026
@gaaclarke gaaclarke requested review from b-luk and walley892 June 25, 2026 17:18
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Jun 25, 2026
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.

1 participant