[Bug 111077] link_shader and deserialize_glsl_program suddenly consume huge amount of RAM

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 2 17:47:14 UTC 2019


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

--- Comment #22 from roland at rptd.ch <roland at 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 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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190902/d919ca90/attachment.html>


More information about the dri-devel mailing list