[Bug 103274] BRW allocates too much heap memory

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 14 14:38:10 UTC 2017


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

            Bug ID: 103274
           Summary: BRW allocates too much heap memory
           Product: Mesa
           Version: git
          Hardware: x86 (IA32)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/DRI/i965
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: fvogt at suse.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

With current mesa git it is not possible to play various 32bit games with wine,
as the d3d hlsl to glsl translator generates many non-trivial shaders.
For unity games like "Ori and the blind forest", they just crash after the
whole 4 GiB address space is exhausted and malloc cannot return any more space.
The vast majority of the allocation calls are caused by ralloc_size called from
brw_* and other shader related functions.

As a workaround I built i965_dri.so from
https://cgit.freedesktop.org/~jljusten/mesa/commit/?h=i965-shader-cache and I
was able to run the game by letting it compile the shaders until it runs out of
memory, repeated until the shader cache is sufficiently filled so that
subsequent starts do not run out of memory anymore. Now the game uses barely
more than 1GiB after startup. The ~/.cache/mesa directory contains 26MiB, which
indicates (AFAICT) that some stage in the shader compilation process does not
free its resources correctly.

So it's likely a memory leak somewhere, but I don't know how to debug that to
provide more information.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20171014/d751dcfd/attachment.html>


More information about the intel-3d-bugs mailing list