<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 22.03.2014 23:33, schrieb Brian
Paul:<br>
</div>
<blockquote
cite="mid:CAEUUzO95TYWQsyCaPSSNYSGZmYOS81KXqWDuxHhRQB6CcOzd0w@mail.gmail.com"
type="cite">
<div dir="ltr">On Sat, Mar 22, 2014 at 2:49 PM, Christian König <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:deathsimple@vodafone.de" target="_blank">deathsimple@vodafone.de</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
<br>
recently some XBMC users complained about crashes with the
relatively new NV_vdpau_interop support.<br>
<br>
That turned out to be a problem with how st_atom_texture.c
caches the sampler view for a texture. Since the texture
in question is shared between two GLX contexts the pipe
object the sampler view was originally created for doesn't
necessary match the pipe object it is used with.<br>
<br>
Now my question is am I missing something or is this case
really not correctly supported? Where is the check if a
texture is used in more than one context? The attached
patch fixes the issue, but I'm not sure if it is the right
approach.<br>
</blockquote>
<div><br>
</div>
<div>I've run into this too. I think the best thing to do
(short of removing the sampler view from the
st_texture_object) is to walk over all the textures in the
share group at context-destroy time, looking for sampler
views belonging to the context being destroyed, then free
those sampler views.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Yeah, that's also a problem, but not what I'm currently dealing
with.<br>
<br>
My problem is that we pass a sampler view to a pipe context which
doesn't belong to this context. Surprisingly the driver doesn't
crash immediately, but instead works fine for at least some time.<br>
<br>
Our radeonsi driver keeps an internal reference to all sample views
bound to it, and so when some times later a new sampler view is
bound we unreference the sampler view in question and crash because
the context where this sampler view was created with no longer
exists.<br>
<br>
So it's reference inside the driver that crashes, not the one in the
mesa state tracker. So there is probably nothing I can do except for
what the attached patch does and try to never bind a sampler view to
a context it doesn't belong to. <br>
<br>
<blockquote
cite="mid:CAEUUzO95TYWQsyCaPSSNYSGZmYOS81KXqWDuxHhRQB6CcOzd0w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>
I could probably whip up a patch next week.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Would you mind if I try to fix that? Doesn't sounds so complicated
to me.<br>
<br>
Regards,<br>
Christian.<br>
<br>
<blockquote
cite="mid:CAEUUzO95TYWQsyCaPSSNYSGZmYOS81KXqWDuxHhRQB6CcOzd0w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>-Brian<br>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>