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

Metal backend: QRhiTextureRenderTarget::PreserveColorContents doesn't work with render buffers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.8.0 FF
    • 6.6.2
    • Qt RHI
    • None
    • macOS Sonoma
    • macOS
    • 1b374fc4c (dev)

      You can reproduce the issue using the msaarenderbuffer manual test.

      https://github.com/qt/qtbase/blob/418dcf88f827effb2981dcd1699b395e2aeaac2f/tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp#L80

      Replace the line

      d.rt = m_r->newTextureRenderTarget(rtDesc);
      

      with

      d.rt = m_r->newTextureRenderTarget(rtDesc, QRhiTextureRenderTarget::PreserveColorContents);
      

      You can observe that the buffer is indeed not cleared between frames when rendering is done via the Vulkan and OpenGL backends.

      When using Metal, the flag doesn't have any effect.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lagocs Laszlo Agocs
            bkre Berthold Krevert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes