From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 108261] [amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang on AMD Raven Date: Sat, 06 Oct 2018 20:07:38 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0865298306==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id B5DEB89FE6 for ; Sat, 6 Oct 2018 20:07:38 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0865298306== Content-Type: multipart/alternative; boundary="15388564580.aCB066A4.18189" Content-Transfer-Encoding: 7bit --15388564580.aCB066A4.18189 Date: Sat, 6 Oct 2018 20:07:38 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D108261 Bug ID: 108261 Summary: [amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang on AMD Raven Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: RobusGrobus95@gmail.com QA Contact: dri-devel@lists.freedesktop.org GPU hang appears when trying to render scene to FBO (framebuffer object) wi= th 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 =3D 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 =3D 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. T= here is already open source graphic engine (my "pet" project) affected by the ha= ng, but code is quite complex (https://gitlab.com/KawaiiGraphics/Kawaii3D https://gitlab.com/KawaiiGraphics/Misaka3D ;=20 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) --=20 You are receiving this mail because: You are the assignee for the bug.= --15388564580.aCB066A4.18189 Date: Sat, 6 Oct 2018 20:07:38 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 108261
Summary [amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang on AMD R= aven
Product Mesa
Version git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component Drivers/Gallium/radeonsi
Assignee dri-devel@lists.freedesktop.org
Reporter RobusGrobus95@gmail.com
QA Contact dri-devel@lists.freedesktop.org

GPU hang appears when trying to render scene to FBO (framebuff=
er 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 =3D 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 =3D 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. T=
here
is already open source graphic engine (my "pet" project) affected=
 by the hang,
but code is quite complex (https://gitlab.com/KawaiiGraphics/Kawaii3D
https://gitlab.com/K=
awaiiGraphics/Misaka3D ;=20
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)


You are receiving this mail because:
  • You are the assignee for the bug.
= --15388564580.aCB066A4.18189-- --===============0865298306== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0865298306==--