<div dir="ltr"><div><div><div>Sorry this patch should not have gone in the v2 since it has been already reviewed by Emil. But thx for your review.<br>I experienced the crash when testing patch 5/<span class="">7</span> of this patch series, around "resource = pscreen->resource_from_handle" in the new vaCreateSurface2 function. Just passing a wrong fd.<br><br></div>I checked your remark for nv50 and nv30 and they don't make this step. From what I can see, nvc0 re-use nv50_miptree_from_handle from nv50 but still has its own nvc0_miptree_vtbl. But that's just a guess :)<br><br></div>Cheers<br></div>Julien<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 October 2015 at 18:04, samuel.pitoiset <span dir="ltr"><<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there a particular situation where nv50_miptree_from_handle() fails? And did you check nv50?<br>
<br>
Anyway, this patch is:<br>
Reviewed-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>><span class="im HOEnZb"><br>
<br>
On 20/10/2015 18:34, Julien Isorce wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Julien Isorce <<a href="mailto:j.isorce@samsung.com" target="_blank">j.isorce@samsung.com</a>><br>
---<br>
  src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++-<br>
  1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c<br>
index 12b5a02..15c803c 100644<br>
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c<br>
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c<br>
@@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,<br>
     } else {<br>
        struct pipe_resource *res = nv50_miptree_from_handle(screen,<br>
                                                             templ, whandle);<br>
-      nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;<br>
+      if (res)<br>
+         nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;<br>
        return res;<br>
     }<br>
  }<br>
</blockquote>
<br></span><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>