Vulkan: Fix freeze when closing pad view (#435)

This commit is contained in:
goeiecool9999 2022-11-06 00:40:00 +01:00 committed by GitHub
parent 948460cad7
commit 138510106c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 36 deletions

View file

@ -187,6 +187,7 @@ public:
const std::unique_ptr<SwapchainInfoVk>& GetChainInfoPtr(bool mainWindow) const;
SwapchainInfoVk& GetChainInfo(bool mainWindow) const;
void StopUsingPadAndWait();
bool IsPadWindowActive() override;
void HandleScreenshotRequest(LatteTextureView* texView, bool padView) override;
@ -432,6 +433,8 @@ private:
}m_state;
std::unique_ptr<SwapchainInfoVk> m_mainSwapchainInfo{}, m_padSwapchainInfo{};
Semaphore m_padCloseReadySemaphore;
bool m_destroyPadSwapchainNextAcquire = false;
bool IsSwapchainInfoValid(bool mainWindow) const;
VkRenderPass m_imguiRenderPass = nullptr;
@ -555,8 +558,8 @@ private:
void CreatePipelineCache();
VkPipelineShaderStageCreateInfo CreatePipelineShaderStageCreateInfo(VkShaderStageFlagBits stage, VkShaderModule& module, const char* entryName) const;
VkPipeline backbufferBlit_createGraphicsPipeline(VkDescriptorSetLayout descriptorLayout, bool padView, RendererOutputShader* shader);
void AcquireNextSwapchainImage(bool mainWindow);
void RecreateSwapchain(bool mainWindow);
bool AcquireNextSwapchainImage(bool mainWindow);
void RecreateSwapchain(bool mainWindow, bool skipCreate = false);
// streamout
void streamout_setupXfbBuffer(uint32 bufferIndex, sint32 ringBufferOffset, uint32 rangeAddr, uint32 rangeSize) override;