[Mesa-dev] [Bug 108946] High memory usage in Black Mesa

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 14 04:50:27 UTC 2018


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

--- Comment #9 from Ian Romanick <idr at freedesktop.org> ---
(In reply to iive from comment #8)
> (In reply to Ian Romanick from comment #6)
> > (I'm quite sure I submitted a similar comment earlier today, but it seems to
> > have just vanished.)
> > 
> > I ran the API trace in Valgrind massif memory profiler.  As far as I can
> > tell, the application never calls glDeleteShader.  We don't release any of
> > the memory because the app hasn't told us that we can.  In that trace there
> > is is about 2.6GB (on a 64-bit build of apitrace) of intermediate IR that
> > could be released by calling glDeleteShader on all the shaders that have
> > been linked.
> 
> Do you really need to keep all Intermediate Representations of all shaders?
> The standard does not deal with internal stuff and IR is just that.
> 
> I thought that in core context you do not need to recompile them and that
> there is a method to patch the prologue of the binary in compatibility mode
> (at least for radeon si).

The IR is needed in case the same shader is used to link with another program. 
It is common for the same vertex shader to be used with many different fragment
shaders.  Until the application calls glDeleteShader, it is impossible for the
driver to know that the application is done with it.

Separate data is stored with the linked programs for state-based recompiles.

-- 
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/mesa-dev/attachments/20181214/2e62a624/attachment.html>


More information about the mesa-dev mailing list