Fix validation error reported by VulkanSDK 1.4.313.0 (#3471)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Adrian Cojocaru
2025-05-15 17:01:23 +03:00
committed by GitHub
parent 9987ccfc76
commit 9f034a36ab
5 changed files with 22 additions and 16 deletions

View File

@@ -157,19 +157,14 @@ private:
struct FrameResources {
vk::UniqueCommandBuffer commandBuffer;
vk::UniqueSemaphore surfaceSemaphore;
vk::UniqueSemaphore frameSemaphore;
vk::UniqueSemaphore acquireSurfaceSemaphore;
vk::UniqueFence flightFrameFence;
std::vector<std::function<void(Context&)>> deletionQueue;
FrameResources(vk::UniqueCommandBuffer& cb,
vk::UniqueSemaphore&& surf,
vk::UniqueSemaphore&& frame,
vk::UniqueFence&& flight)
FrameResources(vk::UniqueCommandBuffer& cb, vk::UniqueSemaphore&& surf, vk::UniqueFence&& flight)
: commandBuffer(std::move(cb)),
surfaceSemaphore(std::move(surf)),
frameSemaphore(std::move(frame)),
acquireSurfaceSemaphore(std::move(surf)),
flightFrameFence(std::move(flight)) {}
void runDeletionQueue(Context&);

View File

@@ -58,6 +58,7 @@ public:
uint32_t getAcquiredImageIndex() const { return acquiredImageIndex; };
void setAcquiredImageIndex(uint32_t index) { acquiredImageIndex = index; };
const vk::Image getAcquiredImage() const;
const vk::Semaphore& getAcquiredSemaphore() const;
bool hasSurfaceTransformSupport() const;
bool didSurfaceTransformUpdate() const;
@@ -86,6 +87,7 @@ protected:
std::vector<vk::Image> swapchainImages;
std::vector<vk::UniqueImageView> swapchainImageViews;
std::vector<vk::UniqueFramebuffer> swapchainFramebuffers;
std::vector<vk::UniqueSemaphore> swapchainSemaphores;
vk::Format colorFormat{vk::Format::eUndefined};
UniqueImageAllocation depthAllocation;