-
Notifications
You must be signed in to change notification settings - Fork 6k
fix: consider array size on canvaskit shader data #49754
Conversation
Still missing some tests, thats why its draft. |
This looks like the right change! In terms of testing, we have a test file: https://github.com/flutter/engine/blob/main/lib/web_ui/test/canvaskit/fragment_program_test.dart You could copy down the JSON format for a shader with array uniform and assert that it had the correct structure? |
This comment was marked as outdated.
This comment was marked as outdated.
Hello mr @jonahwilliams , updated the PR with tests and fixed flutter/flutter#141838 |
Thanks, i will try and take a look this week - but I'm at a conference today and tomorrow so there will be some delay. |
floatCount += value; | ||
} | ||
uniforms[location] = UniformData( | ||
uniforms[i] = UniformData( |
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.
To reviewer: Attention to this change, in the current impl we get an out of bounds error as the location value also considers the array size.
* Use the original kJsonIPLR shader source and metadata to match the test expectations * Make kJsonArrayIPLR a Dart raw string
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.
LGTM
This PR changes the ShaderData construction on canvaskit to consider array uniforms. flutter/flutter#141296 flutter/flutter#141838 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-02-15 [email protected] Added tool to easily check golden diffs locally. (flutter/engine#50654) 2024-02-15 [email protected] Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689) 2024-02-15 [email protected] Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545) 2024-02-15 [email protected] [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486) 2024-02-15 [email protected] Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686) 2024-02-15 [email protected] Pin OSV-Scanner reusable workflow (flutter/engine#50649) 2024-02-15 [email protected] Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685) 2024-02-15 [email protected] fix: consider array size on canvaskit shader data (flutter/engine#49754) 2024-02-15 [email protected] Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683) 2024-02-15 [email protected] Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
2024-02-15 [email protected] Added tool to easily check golden diffs locally. (flutter/engine#50654) 2024-02-15 [email protected] Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689) 2024-02-15 [email protected] Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545) 2024-02-15 [email protected] [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486) 2024-02-15 [email protected] Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686) 2024-02-15 [email protected] Pin OSV-Scanner reusable workflow (flutter/engine#50649) 2024-02-15 [email protected] Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685) 2024-02-15 [email protected] fix: consider array size on canvaskit shader data (flutter/engine#49754) 2024-02-15 [email protected] Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683) 2024-02-15 [email protected] Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
This PR changes the ShaderData construction on canvaskit to consider array uniforms. flutter/flutter#141296 flutter/flutter#141838 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This PR changes the ShaderData construction on canvaskit to consider array uniforms. flutter/flutter#141296 flutter/flutter#141838 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Hi @renancaraujo. Im just just fighting with same problem on flutter web with some custom shaders that works perfect on native platforms. Seams that all shaders with issues in my side has array uniforms. I just try today all flutter channels (master included), but any of the channels fix the problem. Your fix is working for you? Appreciate your comments!!! :) |
Hey @rlealfacephi now for me i was not able to reproduce the problem described in the issue. Would you open another issues decribing what is the output for you? Thanks. |
This PR changes the ShaderData construction on canvaskit to consider array uniforms.
flutter/flutter#141296
flutter/flutter#141838
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.