Zorro666 / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org/builds
MIT License
3 stars 1 forks source link

Improve tracking of MTLDrawables (swapchains) #90

Closed Zorro666 closed 2 years ago

Zorro666 commented 2 years ago

Description

Serialize the presented texture (presentedImage) as part of presentDrawable serialization. Use the present texture resource ID in the action name ie. presentDrawable(Texture 23219) Track the most recently presented image and use that in SystemChunk::CaptureEnd if the PresentedImage serialized data is an empty resource. Track the CAMetalDrawable's created via the hooked CAMetalLayer::nextDrawable() method.

Implements TODO in WrappedMTLCommandBuffer::presentDrawable remove the (CA::MetalDrawable*) cast. Associate created texture and layer in hooked nextDrawable with MTL::Drawable*

Zorro666 commented 2 years ago

https://github.com/baldurk/renderdoc/pull/2718