All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 111077] link_shader and deserialize_glsl_program suddenly consume huge amount of RAM
Date: Mon, 09 Sep 2019 00:58:42 +0000	[thread overview]
Message-ID: <bug-111077-502-WTvXhXuHvU@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-111077-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 2010 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=111077

--- Comment #29 from Timothy Arceri <t_arceri@yahoo.com.au> ---
(In reply to roland@rptd.ch from comment #22)
> 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
> know 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
> talks about UBO maximum size so this might be a start. The OpenGL
> Capabilities from the GPU is this:
> 
> - UBO Maximum Block Size = 65536
> - UBO Buffer Offset Alignment = 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
> other respecting alignment and updated.
> 
> UBOs are created like this:
> 
> glBindBuffer(GL_UNIFORM_BUFFER, pUBO)  // <= done once
> glBufferData(GL_UNIFORM_BUFFER, bufferSize, NULL, GL_DYNAMIC_DRAW)  // <=
> done once
> glMapBufferRange(GL_UNIFORM_BUFFER, stride * elementCount, elementStride,
> GL_WRITE_ONLY | GL_MAP_INVALIDATE_RANGE_BIT)  // <= 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?

UBOs are written to the shader cache, and shade cache items are kept in memory
in a queue when all threads are busy compiling. If you have large UBOs this
could indeed be your problem.

The following merge request might be helpful. Are you able to give this a test?

https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1852

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3151 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-09-09  0:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06 17:46 [Bug 111077] link_shader and deserialize_glsl_program suddenly consume huge amount of RAM bugzilla-daemon
2019-07-06 18:01 ` bugzilla-daemon
2019-07-07 17:57 ` bugzilla-daemon
2019-07-08  2:04 ` bugzilla-daemon
2019-07-12 16:02 ` bugzilla-daemon
2019-07-12 16:03 ` bugzilla-daemon
2019-07-15 23:59 ` bugzilla-daemon
2019-07-16 16:42 ` bugzilla-daemon
2019-07-18 16:24 ` bugzilla-daemon
2019-07-20 17:46 ` bugzilla-daemon
2019-07-20 23:37 ` bugzilla-daemon
2019-07-22 16:57 ` bugzilla-daemon
2019-07-24 11:49 ` bugzilla-daemon
2019-07-26 17:11 ` bugzilla-daemon
2019-08-17  7:24 ` bugzilla-daemon
2019-08-17  7:25 ` bugzilla-daemon
2019-08-17 15:29 ` bugzilla-daemon
2019-08-24 16:33 ` bugzilla-daemon
2019-08-25 18:45 ` bugzilla-daemon
2019-08-28 18:35 ` bugzilla-daemon
2019-08-28 19:24 ` bugzilla-daemon
2019-09-02 17:47 ` bugzilla-daemon
2019-09-03 23:24 ` bugzilla-daemon
2019-09-04 17:30 ` bugzilla-daemon
2019-09-04 18:17 ` bugzilla-daemon
2019-09-06  0:27 ` bugzilla-daemon
2019-09-07 18:11 ` bugzilla-daemon
2019-09-08  8:57 ` bugzilla-daemon
2019-09-09  0:58 ` bugzilla-daemon [this message]
2019-09-09 17:03 ` bugzilla-daemon
2019-09-09 17:47 ` bugzilla-daemon
2019-09-10 19:26 ` bugzilla-daemon
2019-09-10 20:21 ` bugzilla-daemon
2019-09-10 22:36 ` bugzilla-daemon
2019-09-11  0:10 ` bugzilla-daemon
2019-09-11 16:39 ` bugzilla-daemon
2019-09-11 16:50 ` bugzilla-daemon
2019-09-12 16:40 ` bugzilla-daemon
2019-09-13 22:55 ` bugzilla-daemon
2019-09-15 13:31 ` bugzilla-daemon
2019-09-15 13:35 ` bugzilla-daemon
2019-09-19  5:01 ` bugzilla-daemon
2019-09-19 17:23 ` bugzilla-daemon
2019-09-19 20:20 ` bugzilla-daemon
2019-09-20 16:03 ` bugzilla-daemon
2019-09-21  9:11 ` bugzilla-daemon
2019-09-25 18:50 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111077-502-WTvXhXuHvU@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.