<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - High memory usage in Black Mesa"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108946#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - High memory usage in Black Mesa"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108946">bug 108946</a>
from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
<pre>(In reply to iive from <a href="show_bug.cgi?id=108946#c8">comment #8</a>)
<span class="quote">> (In reply to Ian Romanick from <a href="show_bug.cgi?id=108946#c6">comment #6</a>)
> > (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).</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>