From 1d15a4b2ca57a2400f2a7cc5369653448c714a9f Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 18 Jan 2016 00:01:15 +0100 Subject: [PATCH] Bump up maximum image attachments on framebuffer by 1 (8 colour + depth) --- renderdoc/driver/vulkan/vk_resources.h | 2 +- renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_resources.h b/renderdoc/driver/vulkan/vk_resources.h index 40a818850..c4fd994fa 100644 --- a/renderdoc/driver/vulkan/vk_resources.h +++ b/renderdoc/driver/vulkan/vk_resources.h @@ -806,7 +806,7 @@ struct VkResourceRecord : public ResourceRecord VkResourceRecord *bakedCommands; - static const int MaxImageAttachments = 8; + static const int MaxImageAttachments = 9; // 8 Colour and 1 Depth // pointer to either the pool this item is allocated from, or the children allocated // from this pool. Protected by the chunk lock diff --git a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp index 638f4edf2..3c33116f5 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp @@ -495,7 +495,7 @@ VkResult WrappedVulkan::vkCreateFramebuffer( record->AddChunk(chunk); record->imageAttachments = new VkResourceRecord*[VkResourceRecord::MaxImageAttachments]; - RDCASSERT(pCreateInfo->attachmentCount < VkResourceRecord::MaxImageAttachments); + RDCASSERT(pCreateInfo->attachmentCount <= VkResourceRecord::MaxImageAttachments); RDCEraseMem(record->imageAttachments, sizeof(ResourceId)*VkResourceRecord::MaxImageAttachments);