summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/src/FramebufferBase.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/src/FramebufferBase.cpp b/Graphics/GraphicsEngine/src/FramebufferBase.cpp
index 75c00d71..41943b09 100644
--- a/Graphics/GraphicsEngine/src/FramebufferBase.cpp
+++ b/Graphics/GraphicsEngine/src/FramebufferBase.cpp
@@ -49,6 +49,17 @@ void ValidateFramebufferDesc(const FramebufferDesc& Desc)
LOG_FRAMEBUFFER_ERROR_AND_THROW("attachment count is not zero, but ppAttachments is null.");
}
+ for (Uint32 i = 0; i < Desc.AttachmentCount; ++i)
+ {
+ if (Desc.ppAttachments[i] == nullptr)
+ {
+ // If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and attachmentCount is not 0,
+ // pAttachments must be a valid pointer to an array of attachmentCount valid VkImageView handles.
+ // https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-flags-02778
+ LOG_FRAMEBUFFER_ERROR_AND_THROW("framebuffer attachment ", i, " is null.");
+ }
+ }
+
const auto& RPDesc = Desc.pRenderPass->GetDesc();
if (Desc.AttachmentCount != RPDesc.AttachmentCount)
{