[Impeller] Use 32-bit index values in the tessellator if the platform supports it#178088
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for 32-bit index values in the tessellator for platforms that support it, addressing potential overflows with 16-bit indices for paths with a large number of points. The changes correctly add a new capability, Supports32BitPrimitiveIndices, and implement it for Vulkan and GLES backends. The Tessellator class is refactored to use a templated implementation that can be instantiated with either uint16_t or uint32_t for indices, based on the detected capability. This is a solid approach to handle the different index sizes. I have one suggestion to reduce code duplication in the new tessellator implementation.
| } | ||
|
|
||
| bool CapabilitiesVK::Supports32BitPrimitiveIndices() const { | ||
| return true; |
There was a problem hiding this comment.
Seems unnecessary as this is the default.
74839ca to
c45ee37
Compare
… supports it Applications may try to render paths whose point count exceeds the bounds of a 16-bit index. This PR changes the tessellator to use 32-bit indices when available but will fall back to 16-bit on platforms that do not support it (specifically OpenGL ES implementations without the necessary extension). Fixes flutter#175031 Fixes flutter#178022
acc64f9 to
a3b5cf7
Compare
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
…platform supports it (flutter/flutter#178088)
… supports it (flutter#178088) Applications may try to render paths whose point count exceeds the bounds of a 16-bit index. This PR changes the tessellator to use 32-bit indices when available but will fall back to 16-bit on platforms that do not support it (specifically OpenGL ES implementations without the necessary extension). Fixes flutter#175031 Fixes flutter#178022
… supports it (flutter#178088) Applications may try to render paths whose point count exceeds the bounds of a 16-bit index. This PR changes the tessellator to use 32-bit indices when available but will fall back to 16-bit on platforms that do not support it (specifically OpenGL ES implementations without the necessary extension). Fixes flutter#175031 Fixes flutter#178022
… supports it (flutter#178088) Applications may try to render paths whose point count exceeds the bounds of a 16-bit index. This PR changes the tessellator to use 32-bit indices when available but will fall back to 16-bit on platforms that do not support it (specifically OpenGL ES implementations without the necessary extension). Fixes flutter#175031 Fixes flutter#178022
…platform supports it (flutter/flutter#178088)
Applications may try to render paths whose point count exceeds the bounds of a 16-bit index. This PR changes the tessellator to use 32-bit indices when available but will fall back to 16-bit on platforms that do not support it (specifically OpenGL ES implementations without the necessary extension).
Fixes #175031
Fixes #178022