-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix display of depth-stencil image sampler ImageViews #1001
Open
mark-lunarg
wants to merge
1
commit into
google:main
Choose a base branch
from
mark-lunarg:markl-depth-stencil-imageview-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right place to put this. It looks like we are pretending the
srcFmt
is different for these two cases only for the purpose of conversion. IfD_U{16,24}_NORM
is the actual format of the data, we should make sure it's reported as such.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmuetschard, I can see about changing the original format of the surface, but did not choose this path originally due to the comments in commit 2bba7444f, I interpreted this to mean that the original format of the surface must be maintained. This pattern is also used in a handful of places, for example, wherever
getDepthImageFormatFromVulkanFormat()
is called or intranform_overdraw.go
ortranform_read_framebuffer.go
. With this in mind, is the right place to put this change in the capture code where the original surface data is saved?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in getting back to you. Thanks for the pointers, it helps clear things up a bit as to what is going on here.
I'm still not quite convinced we need this "translation", but assuming we do, I think we should push it up the stack. (e.g. the name field in the proto is meant only for display purposes, so having our
core
library look at it is surprising.) Since this is called from the texture resource resolve, we should handle it at that level.However, it makes me wonder, why does the texture's data not match the expected size? From the screenshot, a 2048x2048 texture with format
VK_FORMAT_X8_D24_UNORM_PACK32
should have a size of2k*2k*4
, not2k*2k*3
, or am I reading the spec wrong? It seems to me that we are not serializing this data correctly and cutting out theX8
parts - this makes me think it's an MEC bug and this fix just works around it, but would make stuff blow up if we were to pass a trueVK_FORMAT_X8_D24_UNORM_PACK32
image.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmuetschard, I imagined that the authors didn't want to 'waste' the space for copying/saving/resolving the X channel in this class of formats, though it seems like it'd be much more straightforward to just save the original data in its original format. If you wish, I could look at what it'd take to go that route, or we move it to the texture resource resolve level as mentioned.