VideoBackends:Vulkan: Don't try to present if swapchain acquire failed

This commit is contained in:
TellowKrinkle
2024-09-30 18:29:38 -05:00
parent c7cbac538a
commit 7e1a9490c0
18 changed files with 64 additions and 31 deletions

View File

@ -365,10 +365,11 @@ void Gfx::DispatchComputeShader(const AbstractShader* shader, u32 groupsize_x, u
m_dirty_bits |= DirtyState_Pipeline;
}
void Gfx::BindBackbuffer(const ClearColor& clear_color)
bool Gfx::BindBackbuffer(const ClearColor& clear_color)
{
CheckForSwapChainChanges();
SetAndClearFramebuffer(m_swap_chain->GetCurrentFramebuffer(), clear_color);
return true;
}
void Gfx::CheckForSwapChainChanges()

View File

@ -68,7 +68,7 @@ public:
void DrawIndexed(u32 base_index, u32 num_indices, u32 base_vertex) override;
void DispatchComputeShader(const AbstractShader* shader, u32 groupsize_x, u32 groupsize_y,
u32 groupsize_z, u32 groups_x, u32 groups_y, u32 groups_z) override;
void BindBackbuffer(const ClearColor& clear_color = {}) override;
bool BindBackbuffer(const ClearColor& clear_color = {}) override;
void PresentBackbuffer() override;
SurfaceInfo GetSurfaceInfo() const override;