Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern attributes 4-bytes alignment #9681

Merged
merged 3 commits into from
May 14, 2020

Conversation

karimnaaji
Copy link
Contributor

@karimnaaji karimnaaji commented May 12, 2020

  • On AMD graphics card, @astojilj experienced some failed render tests locally; this was traced and narrowed down to misalignment on 4 bytes boundaries, which is a common requirement on graphics cards. It can usually impact performance but in this instance the issue was visually noticeable.
  • Memory profiling did not show any difference for base map styles, using data-driven pattern is not a hot code path for most of the styles. Further work and profiling will be done as part of Profile memory usage of pattern vertex attributes #9407 if it is proven to be memory heavy under common use cases.
  • d2718b5 now adds a warning for layouts that do not respect this requirement

Launch Checklist

  • briefly describe the changes in this PR
  • [n/a] include before/after visuals or gifs if this PR includes visual changes
  • [n/a] write tests for all new functionality
  • [n/a] document any changes to public APIs
  • [n/a] post benchmark scores
  • manually test the debug page
  • [n/a] tagged @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes
  • [n/a] tagged @mapbox/gl-native if this PR includes shader changes or needs a native port
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog <changelog>Fix potential visual regression on pattern on AMD graphics card vendor.</changelog>

This was reported as being an issue on failed render tests on AMD graphics cards
$ yarn run codegen
Warning: The layout StructArrayLayout3ui6 is not aligned to 4-bytes boundaries.
Warning: The layout StructArrayLayout3i6 is not aligned to 4-bytes boundaries.
Warning: The layout StructArrayLayout3ui6 is not aligned to 4-bytes boundaries.
Warning: The layout StructArrayLayout1ui2 is not aligned to 4-bytes boundaries.
This test is non-deterministic on AMD, slight offset in the pattern. Excluding until root cause can be identified
on this hardware
@karimnaaji karimnaaji added the skip changelog Used for PRs that do not need a changelog entry label May 12, 2020
@karimnaaji karimnaaji requested a review from astojilj May 12, 2020 20:19
Copy link
Contributor

@astojilj astojilj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Potential severity of the issue, e.g. behavior visible in runtime and of failing test on AMD GPU,

fill-extrusion-pattern

overcomes additional memory cost (#9407).
Verified by running render tests on MacBook Pro (15-inch, 2018) 2.2 GHz Intel Core i7, Radeon Pro 560X 4 GB.

@karimnaaji karimnaaji merged commit 791a42b into master May 14, 2020
@karimnaaji karimnaaji deleted the karim/pattern-attributes-4-byte-alignment branch May 14, 2020 15:59
@karimnaaji karimnaaji added bug 🐞 and removed skip changelog Used for PRs that do not need a changelog entry labels May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants