<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 19, 2017 at 2:37 AM, Daniel Stone <span dir="ltr"><<a href="mailto:daniels@collabora.com" target="_blank">daniels@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Intel hardware requires that all planes of an image come from the same<br>
buffer, which is currently implemented by testing that all FDs are<br>
numerically the same.<br>
<br>
However, when going through a winsys (e.g.) or anything which transits<br>
FDs individually, the FDs may be different even if the underlying buffer<br>
is the same.<br>
<br>
Since there is nothing we can do to detect this properly, just remove<br>
the test for now.<br></blockquote><div><br></div><div>That's not actually true.  If two FDs point to the same underlying GEM bo, then brw_bo_gem_create_from_prime (called below) will return the same pointers for both of them.  What we really want to do is call that on all of the FDs (or maybe all of the unique FDs?) and check that they're all the same.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Signed-off-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 5 -----<br>
 1 file changed, 5 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
index 91ed128f83..69c450a431 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -819,11 +819,6 @@ intel_create_image_from_fds(__<wbr>DRIscreen *dri_screen,<br>
    if (fds == NULL || num_fds < 1)<br>
       return NULL;<br>
<br>
-   /* We only support all planes from the same bo */<br>
-   for (i = 0; i < num_fds; i++)<br>
-      if (fds[0] != fds[i])<br>
-         return NULL;<br>
-<br>
    f = intel_image_format_lookup(<wbr>fourcc);<br>
    if (f == NULL)<br>
       return NULL;<br>
<span class="gmail-HOEnZb"><font color="#888888">--<br>
2.13.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>