<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang on AMD Raven"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108261">108261</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang on AMD Raven
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>RobusGrobus95@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>GPU hang appears when trying to render scene to FBO (framebuffer object) with
attached texture with resident handle, but if all the handles of attached
texture are not reesident (or if there is no handles), hang disappears. For
example this pseudocode causes GPU hang:
  GLuint renderbufId;
  glCreateRenderbuffers(1, &renderbufId);
  glNamedRenderbufferStorage(renderbufId, GL_DEPTH_COMPONENT, width(),
height());

  GLuint texId;
  glCreateTextures(GL_TEXTURE_2D, 1, &texId);
  glTextureStorage2D(texId, 1, GL_RGBA8, width(), height());

  GLuint64 handle = glGetTextureHandleARB(texId);
  glMakeTextureHandleResidentARB(handle);

  glBindFramebuffer(GL_FRAMEBUFFER, fboID);
  glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texId, 0);
  glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, rboId);
  //render some triangles
  glBindFramebuffer(GL_FRAMEBUFFER, 0);
  //render main scene
  glSwapBuffers();

And this not:
  GLuint renderbufId;
  glCreateRenderbuffers(1, &renderbufId);
  glNamedRenderbufferStorage(renderbufId, GL_DEPTH_COMPONENT, width(),
height());

  GLuint texId;
  glCreateTextures(GL_TEXTURE_2D, 1, &texId);
  glTextureStorage2D(texId, 1, GL_RGBA8, width(), height());

  GLuint64 handle = glGetTextureHandleARB(texId);
  std::cout << handle << std::endl; //prevent optimizing out

  glBindFramebuffer(GL_FRAMEBUFFER, fboID);
  glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texId, 0);
  glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, rboId);
  //render some triangles
  glBindFramebuffer(GL_FRAMEBUFFER, 0);
  //render main scene
  glSwapBuffers();

I can try to write full cpp sample for exposing the hang, if it's needed. There
is already open source graphic engine (my "pet" project) affected by the hang,
but code is quite complex (<a href="https://gitlab.com/KawaiiGraphics/Kawaii3D">https://gitlab.com/KawaiiGraphics/Kawaii3D</a>
<a href="https://gitlab.com/KawaiiGraphics/Misaka3D">https://gitlab.com/KawaiiGraphics/Misaka3D</a> ; 
workaround added in commit b53d98dacff2b0392c2143c8901289e93ddd8623, so only
previous versions are affected).

My hardware:
APU: AMD Ryzen 5 2400G (with integrated GPU Radeon Vega 11 Graphics)
System board: MSI AM4 X470 Gaming Pro
RAM: Goodram Iridium 16Gb (8+8 Gb dual-channel 2800MHz)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>