From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 97879] [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?) Date: Sun, 12 Feb 2017 15:08:22 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1362582451==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id B59476E31E for ; Sun, 12 Feb 2017 15:08:22 +0000 (UTC) In-Reply-To: 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 --===============1362582451== Content-Type: multipart/alternative; boundary="14869121024.12f8825a.19360"; charset="UTF-8" --14869121024.12f8825a.19360 Date: Sun, 12 Feb 2017 15:08:22 +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=3D97879 --- Comment #81 from Marek Ol=C5=A1=C3=A1k --- I merged a different patch that just improves GL_MAP_READ_BIT and returns a mapping with CPU caches enabled, with the downside that it does a copy from= the uncached buffer into a cached temporary buffer, maps that, and if GL_MAP_WRITE_BIT is set, the temporary buffer is copied into the original buffer on unmap. The reason GPU drivers prefer uncached allocations is that the GPU access to the buffer is faster while the CPU access is slower (except for sequential writes). If we enabled caching, the GPU access would be slower, but the CPU access would be faster. Or we could have 2 buffers and do copying back and forth like for GL_MAP_READ_BIT, but again the copy also isn't free and it's worse if you have to do 2 copies - one in Map and the other in Unmap. The malloc + memcpy solution on the app side is probably the best one. --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.= --14869121024.12f8825a.19360 Date: Sun, 12 Feb 2017 15:08:22 +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

Commen= t # 81 on bug 97879<= /a> from Marek Ol=C5=A1=C3=A1k
I merged a different patch that just improves GL_MAP_READ_BIT =
and returns a
mapping with CPU caches enabled, with the downside that it does a copy from=
 the
uncached buffer into a cached temporary buffer, maps that, and if
GL_MAP_WRITE_BIT is set, the temporary buffer is copied into the original
buffer on unmap.

The reason GPU drivers prefer uncached allocations is that the GPU access to
the buffer is faster while the CPU access is slower (except for sequential
writes). If we enabled caching, the GPU access would be slower, but the CPU
access would be faster. Or we could have 2 buffers and do copying back and
forth like for GL_MAP_READ_BIT, but again the copy also isn't free and it's
worse if you have to do 2 copies - one in Map and the other in Unmap.

The malloc + memcpy solution on the app side is probably the best one.


You are receiving this mail because:
  • You are on the CC list for the bug.
  • You are the assignee for the bug.
= --14869121024.12f8825a.19360-- --===============1362582451== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1362582451==--