* There was a race condition where the newly created HWND surface could
be resized during swap chain creation. This causes a
`VK_ERROR_DEVICE_LOST`, but is very timing dependent.
* The fix was to finish the resize, via `ResourcePreview::setActive()` /
`QWidget::show()` before scheduling any async functions that could
create a swapchain, namely `IReplayOutput::AddThumbnail()`.
- Separate the pixel history copy pixel shader into two separate
shaders, one for colour copy and one for depth
- Allocate and update descriptor sets on demand
- Add another compute shader for pixel history depth copy
* We can have a RW lock so that once deferred slots are allocated there's little
contention, but we must ensure that allocating a new slot doesn't race with
access to a slot on another thread.
* If we don't do this, the application could create a buffer/memory and use it
then destroy it and create another one in the same capture. The driver could
assign the same opaque capture address to both buffers even though they
"overlap" in the capture because they don't overlap in actual execution.
* Slightly artificially extending the life of the resource to the end of the
capture ensures the driver gives them non-overlapping device addresses.
Add support for requesting pixel history for depth/stencil images.
Also, adjust which index is used to patch primitive ID and fixed
fragment color shaders. Before it was using the index of the target
image in the framebuffer attachments. But it should be the index of the
corresponding color attachment.
Add support for other depth/stencil formats (other than D32_SFLOAT).
Remember the depth/stencil attachment format to correctly update the
values.
* We save and restore the render state, but GLRenderState only sets the state
directly on GL, if we make state changes through the driver our tracking will
get out of sync.