From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111077] link_shader and deserialize_glsl_program suddenly consume huge amount of RAM Date: Mon, 02 Sep 2019 17:47:14 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0932677836==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 98094898B7 for ; Mon, 2 Sep 2019 17:47:14 +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 --===============0932677836== Content-Type: multipart/alternative; boundary="15674464341.cFE1.24960" Content-Transfer-Encoding: 7bit --15674464341.cFE1.24960 Date: Mon, 2 Sep 2019 17:47:14 +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=3D111077 --- Comment #22 from roland@rptd.ch --- Hi Marek, This is going to be complicated. The application is not yet free to use by others (working on getting it to release shape). I would have to figure out first how to break this down into a reproducible test case since I don't kn= ow myself what triggers the bug. If you can think of some corner values to narrow down in what direction to search I can fully mess with the source code over here. The faulty commit t= alks about UBO maximum size so this might be a start. The OpenGL Capabilities fr= om the GPU is this: - UBO Maximum Block Size =3D 65536 - UBO Buffer Offset Alignment =3D 4 So the maximum size used by the application is 65536 bytes. UBOs are used as shared buffers so blocks of data are placed next to each o= ther respecting alignment and updated. UBOs are created like this: glBindBuffer(GL_UNIFORM_BUFFER, pUBO) // <=3D done once glBufferData(GL_UNIFORM_BUFFER, bufferSize, NULL, GL_DYNAMIC_DRAW) // <=3D= done once glMapBufferRange(GL_UNIFORM_BUFFER, stride * elementCount, elementStride, GL_WRITE_ONLY | GL_MAP_INVALIDATE_RANGE_BIT) // <=3D done for each data bl= ock written Data then written and unmapped In particular this means a larger UBO is created once then individual blocks are written to it using ranged mapping. Just a wield guess but could the problem be related to this kind of usage pattern? --=20 You are receiving this mail because: You are the assignee for the bug.= --15674464341.cFE1.24960 Date: Mon, 2 Sep 2019 17:47:14 +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

Comme= nt # 22 on bug 11107= 7 from roland@rptd.ch
Hi Marek,

This is going to be complicated. The application is not yet free to use by
others (working on getting it to release shape). I would have to figure out
first how to break this down into a reproducible test case since I don't kn=
ow
myself what triggers the bug.

If you can think of some corner values to narrow down in what direction to
search I can fully mess with the source code over here. The faulty commit t=
alks
about UBO maximum size so this might be a start. The OpenGL Capabilities fr=
om
the GPU is this:

- UBO Maximum Block Size =3D 65536
- UBO Buffer Offset Alignment =3D 4

So the maximum size used by the application is 65536 bytes.

UBOs are used as shared buffers so blocks of data are placed next to each o=
ther
respecting alignment and updated.

UBOs are created like this:

glBindBuffer(GL_UNIFORM_BUFFER, pUBO)  // <=3D done once
glBufferData(GL_UNIFORM_BUFFER, bufferSize, NULL, GL_DYNAMIC_DRAW)  // <=
=3D done
once
glMapBufferRange(GL_UNIFORM_BUFFER, stride * elementCount, elementStride,
GL_WRITE_ONLY | GL_MAP_INVALIDATE_RANGE_BIT)  // <=3D done for each data=
 block
written

Data then written and unmapped

In particular this means a larger UBO is created once then individual blocks
are written to it using ranged mapping. Just a wield guess but could the
problem be related to this kind of usage pattern?


You are receiving this mail because:
  • You are the assignee for the bug.
= --15674464341.cFE1.24960-- --===============0932677836== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0932677836==--