edunad / rawrbox

PSX..ish game engine made with DiligentCore and C++23
https://box.rawr.dev/
MIT License
18 stars 0 forks source link

[BUG] Vulkan is throwing validation errors on render target #139

Closed edunad closed 7 months ago

edunad commented 7 months ago

RawrBox lib


Description

Diligent Engine: ERROR: Vulkan debug message (validation): VUID-VkImageMemoryBarrier-oldLayout-01211
                 Validation Error: [ VUID-VkImageMemoryBarrier-oldLayout-01211 ] Object 0: handle = 0x852b56000000006a, name = RawrBox::RenderTarget, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x3e9335e3 | vkCmdPipelineBarrier(): pImageMemoryBarriers[1].oldLayout (VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) is not compatible with VkImage 0x852b56000000006a[RawrBox::RenderTarget] usage flags VK_IMAGE_USAGE_TRANSFER_SRC_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT. The Vulkan spec states: If srcQueueFamilyIndex and dstQueueFamilyIndex define a queue family ownership transfer or oldLayout and newLayout define an image layout transition, and oldLayout or newLayout is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then image must have been created with VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT (https://vulkan.lunarg.com/doc/view/1.3.275.0/windows/1.3-extensions/vkspec.html#VUID-VkImageMemoryBarrier-oldLayout-01211)
                 Object[0] (image): Handle 0x852b56000000006a, Name: 'RawrBox::RenderTarget'
edunad commented 7 months ago

Fixed by #137