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

RHI - QRhiResourceUpdateBatch::readBackBuffer() fails to read compute buffer on Metal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.6.3, 6.7.0 Beta3, 6.8.0 FF
    • 6.6.1, 6.7
    • Qt RHI
    • None
    • macOS
    • f21af7f88 (dev), 86cdd53a6 (6.7), ae6e5a6b8 (6.6)

    Description

      After successfully running (verified in xcode metal profiler) a simple compute shader, QRhiResourceUpdateBatch::readBackBuffer() fails to return the results. I've attached a simple program to reproduce the issue. The program creates 3 buffers. The first two buffers of 10 float are added and outputted to the 3 buffer. 

      Example code can be found here: https://github.com/vpicaver/qt_rhi_compute_shader

      The output on my machine is:

       

      Metal QRhiDriverInfo(deviceName="AMD Radeon Pro 580" deviceId=0x0 vendorId=0x0 deviceType=Integrated)
      compute supported: true
      read non uniform buffer: true
      Shader valid: true
      endComputePass
      endOffscreenFrame
      i: 0 value: -1
      i: 1 value: -1
      i: 2 value: -1
      i: 3 value: -1
      i: 4 value: -1
      i: 5 value: -1
      i: 6 value: -1
      i: 7 value: -1
      i: 8 value: -1
      i: 9 value: -1
      finish
      Finished with frame!
       
      

      There shouldn't be -1 for the values of the output buffer.

      This code works on an nvidia 1070 on windows 11 running with Directx12 and Vulkan.

       

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            vpicaver Philip Schuchardt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes