[Impeller] create a 300 es variant of all GLES shaders to support UBO binding.#56960
[Impeller] create a 300 es variant of all GLES shaders to support UBO binding.#56960auto-submit[bot] merged 8 commits intoflutter:mainfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
| #include <cstring> | ||
| #include <memory> | ||
|
|
||
| #include "GLES3/gl3.h" |
There was a problem hiding this comment.
Like vk.h, the convention in the GL backend is to include //impeller/renderer/backend/gles/gles.h.
| gl.GetProgramiv(program, GL_ACTIVE_UNIFORM_BLOCKS, &uniform_blocks); | ||
| for (GLint i = 0; i < uniform_blocks; i++) { | ||
| GLint name_length = 0; | ||
| gl.GetActiveUniformBlockiv(program, i, GL_UNIFORM_BLOCK_NAME_LENGTH, |
There was a problem hiding this comment.
Paranoid note: Does the name include the NULL terminator?
There was a problem hiding this comment.
according to https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetActiveUniformBlock.xhtml it does
|
|
||
| std::vector<GLchar> name; | ||
| name.resize(name_length); | ||
| GLint length; |
There was a problem hiding this comment.
Like name_length above, zero this out so an error in the next call doesn't leave garbage in the variable that you will later use to create a string.
| std::make_pair(block_index, i); | ||
| } | ||
| use_ubo_ = true; | ||
| return ReadUniformsBindingsV2(gl, program); |
|
|
||
| void Flush(std::optional<Range> range = std::nullopt) const override; | ||
|
|
||
| std::optional<GLuint> GetHandle() const { |
| element_count, // count | ||
| buffer_data // data | ||
| ); | ||
| continue; |
There was a problem hiding this comment.
Perhaps add the default: case that logs the member type so we don't silently ignore stuff? But yeah, at this point, probably all types have shaken out.
… Android. (#159857) Required changes for flutter/engine#56960 This configures an additional shader target for Android devices.
…port UBO binding. (flutter/engine#56960)
flutter/engine@3a8204a...bbe33f2 2024-12-05 flar@google.com [DisplayList] Disable group opacity when a RuntimeEffect is in use (flutter/engine#56936) 2024-12-05 30870216+gaaclarke@users.noreply.github.com Removes ReactorGLES::Ref (flutter/engine#56981) 2024-12-05 jonahwilliams@google.com [Impeller] create a 300 es variant of all GLES shaders to support UBO binding. (flutter/engine#56960) 2024-12-05 dkwingsmt@users.noreply.github.com [Impeller] Add rounded superellipse (flutter/engine#56726) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC bdero@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
|
It looks like the code size hit for this is about ~120 Kb. I don't know if this is compressed or uncompressed. |
… binding. (flutter/engine#56960) Create a GLES3 "backend" by compiling a second set of GLES shaders to 300 es. This allows the usage of UBOs and SSBOs.
Create a GLES3 "backend" by compiling a second set of GLES shaders to 300 es. This allows the usage of UBOs and SSBOs.