<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">Hi,<br>
      <br>
      On 19/11/2013, Axel Davy wrote :<br>
    </div>
    <blockquote cite="mid:528B1FF4.2050207@clipper.ens.fr" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <blockquote cite="mid:20131119073542.GK3252@gongzg-ivb"
        type="cite">
        <blockquote type="cite"> </blockquote>
        <pre wrap="">There is no plan for DRI3 support currently. If you have any
proposal which could support DIR3 in glamor, you are welcome
to submit it here for discussion. For now, this patch LGTM.
will push it latter.</pre>
      </blockquote>
      eglCreateImageKHR allows to create an image from a texture<br>
      (this is only supported on intel currently). Glamor could then<br>
      import the image as gbm_bo, get an handle from it,<br>
      and use the correct ioctl to get an fd.<br>
      <br>
      To convert an fd into pixmap, it could use the <br>
      eglCreateImageKHR extension to import an fd as an<br>
      image (only supported on intel currently), and import<br>
      it as a texture.<br>
      <br>
      That said, it would mean the DDX has less control over the <br>
      bo format used by pixmaps, since it would never allocate <br>
      the bo itself (tiling, etc, would be under the control of Mesa)<br>
      That can be a problem for using the pixmap bo <br>
      as scanout buffer.<br>
      <br>
    </blockquote>
    <br>
    I've looked in Mesa code to see how much work it would require to<br>
    implement these eglCreateImageKHR extensions for gallium drivers,<br>
    and it seems it can be implemented pretty fast: It would need the<br>
    support of __DRIimage v8, and there are pending patches on the <br>
    Mesa mailing list to support partially __DRIimage v7. The remaining<br>
    functions look not to need to much work to implement.<br>
    <br>
    I think it's worth it to implement the helpers pixmap to fd and <br>
    fd to pixmap in glamor. <br>
    Without this, the DDX would have to attach a bo everytime<br>
    it can when creating a pixmap, to be able to export an fd:<br>
    It would prevent glamor from fallback to the cpu.<br>
    <br>
    If we rely on glamor to export the fd, glamor knows the<br>
    pixmaps for which it never exported any fd,<br>
    and that it can fallback to the cpu for them.<br>
    <br>
    Axel Davy<br>
  </body>
</html>