Fix format aspects validation for DRM format modifier images#2766
Merged
marc0246 merged 1 commit intovulkano-rs:masterfrom Feb 5, 2026
Merged
Fix format aspects validation for DRM format modifier images#2766marc0246 merged 1 commit intovulkano-rs:masterfrom
marc0246 merged 1 commit intovulkano-rs:masterfrom
Conversation
Contributor
|
Thank you! However, an early return in validation is something we don't do. And I wouldn't want to start doing it because it's inevitably going to be overlooked in the future. There even is commented-out validation later down pertaining to DRM format modifier. So instead, please put the other validation later down in an |
2dcfec9 to
38f2d4e
Compare
Contributor
Author
|
Thanks for the review! Done. |
Contributor
|
Thank you for the fix! |
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.
Update documentation to reflect any user-facing changes - in this repository.
Make sure that the changes are covered by unit-tests.
Run
cargo clippyon the changes.Run
cargo +nightly fmton the changes.Please put changelog entries in the description of this Pull Request
if knowledge of this change could be valuable to users. No need to put the
entries to the changelog directly, they will be transferred to the changelog
file by maintainers right after the Pull Request merge.
Please remove any items from the template below that are not applicable.
Describe in common words what is the purpose of this change, related
GitHub Issues, and highlight important implementation aspects.
When calling
subresource_layout()on aRawImagethat uses DRM format modifiers (ImageTiling::DrmFormatModifier), the validation would fall through into the format-aspects checks after correctly validating theMemoryPlaneaspect. This caused spurious validation errors because DRM format modifier images useMemoryPlaneaspects, not the usual format aspects (Color,Depth,Stencil,Plane0, etc.).The fix adds an extra
self.tiling != ImageTiling::DrmFormatModifieraround the validation which was previously failing.Changelog: