Repository navigation
Protect from uploading deleted ArrayBuffers - #6665
Merged
Merged
Conversation
…f the Binder refers to a non state-dependent property expression. Ensure that Binder#upload does not attempt to re-upload the PaintVertexArray after a subsequent feature-state update.
anandthakker
approved these changes
May 15, 2018
mollymerp
pushed a commit
that referenced
this pull request
Aug 24, 2018
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport #6665 remove unpack function for pattern attrs backport #6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function
mollymerp
pushed a commit
that referenced
this pull request
Aug 24, 2018
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport #6665 remove unpack function for pattern attrs backport #6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function
mollymerp
pushed a commit
that referenced
this pull request
Aug 24, 2018
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport #6665 remove unpack function for pattern attrs backport #6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function refactor pattern bucket functions
mollymerp
pushed a commit
that referenced
this pull request
Aug 27, 2018
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport #6665 remove unpack function for pattern attrs backport #6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function refactor pattern bucket functions
melitele
pushed a commit
to pirxpilot/mapbox-gl-js
that referenced
this pull request
Mar 5, 2025
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport mapbox#6665 remove unpack function for pattern attrs backport mapbox#6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function refactor pattern bucket functions
melitele
pushed a commit
to pirxpilot/mapbox-gl-js
that referenced
this pull request
Mar 5, 2025
…ll-extrusion-pattern properties allow multiple attributes per style-spec property add CrossFadedDataDrivenProp for line-pattern DDS" convert line_pattern shaders to use pragmas create layouts for data-driven line-pattern vertex buffers add source function support for line-pattern to line bucket population and draw code use min, mid, max images for cross-fading data-driven patterns also use tile's IconAtlas for data constant line-pattern extend Binders to support line-pattern properties add initial render test nit fix ensure all possible icons for line-pattern camera funcs are added to the icon atlas make arguments needed for ddpattern required set binder type on property make pattern attributes independent of line layer implement data-driven styling for fill-pattern add dds render test for fill-pattern eliminate black flash on setPaintProperty with a pattern value extend integer-only evaluation to CrossFadedDataDrivenProps address review comments remove getPossibleOutputs and fix rendering extend feature state updating to CrossFadedCompositeBinder use getPossibleOutputs instead of iterating over all features add 1px padding wrap to sprites separate icon and pattern sprites in ImageAtlas to fix wrapping in -pattern properties rename imageAtlas --> iconAtlas now that it holds both icons and pattern images update to use new style-spec expression schema implement fill-extrusion-pattern dds address review comments simplify imageAtlas check remove redundant CrossFaded properties backport mapbox#6665 remove unpack function for pattern attrs backport mapbox#6745 and fix rebase flubs update with uniform binding state management expose possibleOutputs() at the StylePropertyExpression level add some query tests rebase fix Don't wait for pattern images to layout layers no -pattern property set bonus: remove limitation on non-deterministic expression outputs for pattern properties and reliance on `possibleOutputs()` state remove getPossibleOutputs from CrossFadedDataDrivenProperty refactor CrossFaded and CrossfadeParameters DRY bucket code with util function refactor pattern bucket functions
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6655.
The
PaintVertexArray's backing buffer is deleted afterBinder#uploadfor properties that are not dependent onfeature-stateexpressions.ProgramCongfigurationkeeps track of whether its binders need to be re-uploaded after a feature-state expression is re-evaluated, but it doesn't discriminate between binders and tried to re-upload them all.#6655 describes a scenario where multiple properties in a Program are data-driven, and the program tries (incorrectly) to re-upload them all even when they are not feature-state dependent.
Options for fixing this are:
In both cases, the fix is to check before attempting an upload. Protecting against using a null array buffer handles this and other potential situations, without needing an extra flag to indicate the valid state.