vello_hybrid: Adjust atlas config to actual device capabilities#1568
Merged
Conversation
0fd6054 to
ec50ef4
Compare
ec50ef4 to
78cbc7d
Compare
taj-p
approved these changes
Apr 13, 2026
grebmeg
reviewed
May 5, 2026
| max_texture_dimension_2d, | ||
| get_max_texture_array_layers(&gl), | ||
| 1, | ||
| ); |
Collaborator
There was a problem hiding this comment.
The change in this PR is a bit controversial. Consider testing the renderer against edge cases to ensure it properly handles failure modes. Also, it now hides from the consumer that its configuration has been adjusted based on device capabilities.
Collaborator
Author
There was a problem hiding this comment.
Would you prefer a different implementation?
Collaborator
There was a problem hiding this comment.
It’s fine to leave this as it is for now, but whenever we’re working near this functionality, I’d consider updating it to make the config changes more explicit (or rather consider it's as setup-config) instead of silently applying them.
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.
Right now,
AtlasConfigimplementsDefaultwith the following configuration:Given that this is part of
RenderSettings, users should be able to assume that they can doRenderSettings::defaultand it just works everywhere. However, this is currently not the case, as we will blindly try to allocate the resources without checking the actual device capabilties.This PR proposes to change this by treating the config as a strong recommendation, but allowing backends to choose different values based on the capabilities of the device it runs on. I experimented with another approach where we instead introduce an
Autostruct for some fields to allow the users to explicitly opt in for that, and instead let the backend error out in case the user-requested parameters are not compatible with the device. However, this resulted in a much larger code diff, hence why I think just mutating the settings is the easier approach for now.