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

[Feature Request] Get notified when a texture layout changes #2123

Closed
darksylinc opened this issue Aug 20, 2020 · 2 comments
Closed

[Feature Request] Get notified when a texture layout changes #2123

darksylinc opened this issue Aug 20, 2020 · 2 comments
Assignees
Milestone

Comments

@darksylinc
Copy link

Hi!

I just spend a couple hours finding a rogue/stray layout change in my code, which came from an incorrectly setup VkRenderPass.

I actually found the problem doing "by hand" what this feature suggests. I noticed the relevant code seems to be in
CoreChecks::SetImageLayout from source/Vulkan-ValidationLayers/layers/buffer_validation.cpp

I just waited with breakpoints until layout and image_state.image were the ones I was expecting; and walked up the stack.

It would be cool if there was an official way to do this, like registering a listener so we get:

  • old layout
  • new layout
  • image ptr
  • name (if vkDebugMarkerSetObjectNameEXT was called on it)
@mark-lunarg
Copy link
Contributor

@darksylinc, that sounds pretty cool, but might be slightly outside the purview of the default set of work done in the Validation Layers. I will add it to the Best Practices tracking issue (though it doesn't quite fit that either) just so it doesn't get lost. This might be something better suited to GfxReconstruct or RenderDoc maybe?

@darksylinc
Copy link
Author

darksylinc commented Aug 20, 2020

RenderDoc may be able to do it, but is not very well suited for this; as the goal is to break and evaluate the C++ state whenever that rogue transition changes.

Conceptually speaking, what I am proposing is very similar to _crtBreakAlloc

By the time RenderDoc or GFXReconstruct's replay is run, all the info I want to inspect has long been lost because it's not even part of Vulkan at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants