Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140107

Postproc effects recreate intermediate buffers multiple times with different sizes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8, 6.9, 6.10, 6.11
    • Quick: 3D
    • None

      From the SSGI effect. This is incorrect, recreating blurredIndirectAndAoBuffer (and indirectAndAoBuffer, in this particular example) with different sizes within the same frame.

      This is because the commands are not cloned (copied) for the render thread's use, but is rather using the gui thread data structures. All of which, after updateSpatialNode() returns and things move on from the sync phase to the render phase, may change on the gui thread (when one moves a slider for example that leads to changing some properties) in parallel with the render thread. So when the QSSGRhiEffectSystem loops through the commands on the render thread, it may see different values over time, for properties such as the size multiplier in a Buffer. That is very wrong.

       

      Allocate "indirectAndAoBuffer" QSize(238, 374)
      needsRebuild "indirectAndAoBuffer" QSize(238, 374) QSize(252, 397)
      BindBuffer "indirectAndAoBuffer"
      Allocate "blurredIndirectAndAoBuffer" QSize(238, 374)
      needsRebuild "blurredIndirectAndAoBuffer" QSize(238, 374) QSize(248, 391)
      Render
      Allocate "tempBuffer1" QSize(116, 182)
      needsRebuild "tempBuffer1" QSize(116, 182) QSize(126, 199)
      BindBuffer "tempBuffer1"
      Allocate "indirectAndAoBuffer" QSize(232, 365)
      needsRebuild "indirectAndAoBuffer" QSize(232, 365) QSize(238, 374)
      Render
      Allocate "tempBuffer2" QSize(58, 91)
      needsRebuild "tempBuffer2" QSize(58, 91) QSize(63, 99)
      BindBuffer "tempBuffer2"
      Allocate "tempBuffer1" QSize(116, 182)
      Render
      Allocate "tempBuffer1" QSize(116, 182)
      BindBuffer "tempBuffer1"
      Allocate "tempBuffer2" QSize(58, 91)
      Render
      Allocate "blurredIndirectAndAoBuffer" QSize(232, 365)
      needsRebuild "blurredIndirectAndAoBuffer" QSize(232, 365) QSize(238, 374)
      BindBuffer "blurredIndirectAndAoBuffer"
      Allocate "tempBuffer1" QSize(116, 182)
      Render
      BindTarget "__output_5"
      Allocate "blurredIndirectAndAoBuffer" QSize(232, 365)
      Render
      vkDebug: Validation Error: [ VUID-VkDescriptorImageInfo-imageLayout-00344 ] Object 0: handle = 0x153a9adb510, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x4553c60000000b92, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xde55a405 | vkCmdDrawIndexed(): Cannot use VkImage 0x4553c60000000b92[] (layer=0 mip=0) with specific layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL that doesn't match the previous known layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
      The Vulkan spec states: imageLayout must match the actual VkImageLayout of each subresource accessible from imageView at the time this descriptor is accessed as defined by the image layout matching rules (https://vulkan.lunarg.com/doc/view/1.4.304.1/windows/antora/spec/latest/chapters/descriptorsets.html#VUID-VkDescriptorImageInfo-imageLayout-00344)
      vkDebug: Validation Error: [ VUID-vkCmdDrawIndexed-None-08114 ] Object 0: handle = 0xee3cd000000043d, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0x3f6fd836 | vkCmdDrawIndexed(): Descriptor set VkDescriptorSet 0xee3cd000000043d[] Image layout specified by vkCmdBindDescriptorSets doesn't match actual image layout at time descriptor is used. See previous error callback for specific details.

        For Gerrit Dashboard: QTBUG-140107
        # Subject Branch Project Status CR V

            lagocs Laszlo Agocs
            lagocs Laszlo Agocs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change