VulkanTools icon indicating copy to clipboard operation
VulkanTools copied to clipboard

monitor layer: problems after destroying a window

Open tracyliving opened this issue 3 years ago • 0 comments

Hello, I have a special use case to create a window and destroy it at runtime. To be specific, it looks like:

xcb_create_window creates 'window 0' vkCreateXcbSurfaceKHR creates 'surface 0' ... xcb_create_window creates 'window 1' vkCreateXcbSurfaceKHR creates 'surface 1' .. vkDestroySurfaceKHR destroys 'surface 1' xcb_destroy_window destroyes 'window 1' ...

Currently, the monitor layer always prints the FPS counter to the window last seen in the vkCreateXcbSurfaceKHR. As a result, it continues to print the FPS counter to the 'window 1', however, which has been destroyed already. It might be better to remember the association between the surface and the window (push/pop after vkCreateXcbSurfaceKHR/vkDestroySurfaceKHR ), so the FPS counter can be printed to a valid window.

tracyliving avatar Aug 13 '21 06:08 tracyliving