Created
December 14, 2022 16:57
-
-
Save jonahwilliams/cbb6e260c6121679b0e786e2279d3d6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/web_ui/lib/src/engine/canvaskit/painting.dart b/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
index 8cd9fc1ab8..3f7e536ac4 100644 | |
--- a/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
+++ b/lib/web_ui/lib/src/engine/canvaskit/painting.dart | |
@@ -423,11 +423,12 @@ class CkFragmentProgram implements ui.FragmentProgram { | |
if (type == UniformType.SampledImage) { | |
textureCount += 1; | |
} else { | |
+ final Object? rows = rawUniformData['rows']; | |
final Object? bitWidth = rawUniformData['bit_width']; | |
- if (bitWidth is! int) { | |
+ if (bitWidth is! int || rows is! int) { | |
throw const FormatException('Invalid Shader Data'); | |
} | |
- floatCount += bitWidth ~/ 32; | |
+ floatCount += (bitWidth ~/ 32) * rows; | |
} | |
uniforms[location] = UniformData( | |
name: name, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment