vulkan: Add more VU comments to justify framebuffer asserts
authorJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 30 Mar 2022 16:49:41 +0000 (11:49 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 30 Mar 2022 20:43:12 +0000 (20:43 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15674>

src/vulkan/runtime/vk_render_pass.c

index 15c9259273efa3fef1b8bf579d8433b75b318d8b..6780baf75debc45fbf9b5ae29779597baad8498d 100644 (file)
@@ -1754,6 +1754,16 @@ vk_common_CmdBeginRenderPass2(VkCommandBuffer commandBuffer,
       struct vk_attachment_state *att_state = &cmd_buffer->attachments[a];
 
       /* From the Vulkan 1.3.204 spec:
+       *
+       *    VUID-VkFramebufferCreateInfo-pAttachments-00880
+       *
+       *    "If renderpass is not VK_NULL_HANDLE and flags does not include
+       *    VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments
+       *    must have been created with a VkFormat value that matches the
+       *    VkFormat specified by the corresponding VkAttachmentDescription in
+       *    renderPass"
+       *
+       * and
        *
        *    VUID-VkRenderPassBeginInfo-framebuffer-03216
        *
@@ -1768,6 +1778,16 @@ vk_common_CmdBeginRenderPass2(VkCommandBuffer commandBuffer,
       assert(image_view->format == pass_att->format);
 
       /* From the Vulkan 1.3.204 spec:
+       *
+       *    VUID-VkFramebufferCreateInfo-pAttachments-00881
+       *
+       *    "If renderpass is not VK_NULL_HANDLE and flags does not include
+       *    VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments
+       *    must have been created with a samples value that matches the
+       *    samples value specified by the corresponding
+       *    VkAttachmentDescription in renderPass"
+       *
+       * and
        *
        *    UID-VkRenderPassBeginInfo-framebuffer-03217
        *