<br>Hello All<br>
<br>
   I am using Mesa-7.10.2 stack.<br>
<br>
I am trying to run EGL with egl_gallium state trackers<br>
(GLES=&gt;EGL=&gt;egl_gallium=&gt;<div id=":1gu">fbdev) over fbdev with following<br>
<br>
configuration<br>
<br>
<br>
./configure --prefix=/opt/mesa-arm-genoa-new --host=arm-linux<br>
--build=i686-linux --enable-gles2 --with-x=no<br>
<br>
--with-egl-platforms=fbdev  --with-egl-displays=fbdev --with-driver=no<br>
--disable-glu --disable-glw --disable-glut<br>
<br>
--disable-gl-osmesa --disable-opengl --enable-debug --enable-gles-overlay<br>
<br>
I am able to run applications which can draw directly on scanout<br>
surfaces/pbuffer (es2gears).<br>
<br>
I want to run application which uses eglCreateImageKHR (with user defined<br>
pixmap structures) to make textures<br>
and eglCreatePixmapSurface (with user defined pixmap structures) to create a<br>
Pixmap surfaces. Since Native_fbdev.c doesnot<br>
<br>
support pixmap surfaces both calls fail.<br>
       I tried to put pixmap support in native_fbdev.c with following steps<br>
1)putting a function in<br>
 fbdpy-&gt;base.destroy = fbdev_display_destroy;<br>
 fbdpy-&gt;base.get_param = fbdev_display_get_param;<br>
 fbdpy-&gt;base.get_configs = fbdev_display_get_configs;<br>
<br>
 /*Adding function to create PIXMAP surface*/<br>
 fbdpy-&gt;base.is_pixmap_supported = fbdev_display_is_pixmap_supported;<br>
 fbdpy-&gt;base.create_pixmap_surface = fbdev_display_create_pixmap_surface;<br>
<br>
2)Added support flag true in native_config<br>
  pixmap_bit=true;<br>
<br>
I am able to get finctions  eglCreateImageKHR/eglCreatePixmapSurface run<br>
successfully able to get user defined pixmap<br>
to native_fbdev by typecasting it ot EGLNativePixmaptype. But I am not able<br>
to draw any texture on EGLImage. I suspect<br>
glEGLImageTargetTexture2DOES is not working properly with EGLImage returned<br>
from eglCreateImageKHR.<br>
<br>
I dont know how I can make it visible to GLES by calling function like<br>
glEGLImageTargetTexture2DOES.<br>
<br>
I am very new to GLES and EGL . Please provide me suggestions so that I can<br>
proceed further.<br>
<br>
For convenient i am putting my code which I have inserted to native_fbdev.c<br>
<br>
static struct native_surface *<br>
fbdev_display_create_pixmap_surface(struct native_display *ndpy,<br>
                                     EGLNativePixmapType pix,<br>
                                     const struct native_config *nconf)<br>
{<br>
   printf(&quot;START %s    %s\n&quot;, __FUNCTION__, __FILE__);<br>
   fbdev_pixmap  *pixmap = (fbdev_pixmap *)pix;<br>
   /*Trying To print pixmap detail*/<br>
<br>
   printf(&quot;pixmap-&gt;height                 ::%d\n&quot;, pixmap-&gt;height);<br>
   printf(&quot;pixmap-&gt;width                  ::%d\n&quot;,  pixmap-&gt;width);<br>
   printf(&quot;pixmap-&gt;bytes_per_pixel        ::%d\n&quot;, pixmap-&gt;bytes_per_pixel);<br>
   printf(&quot;pixmap-&gt;buffer_size            ::%d\n&quot;,  pixmap-&gt;buffer_size);<br>
   printf(&quot;pixmap-&gt;red_size               ::%d\n&quot;, pixmap-&gt;red_size);<br>
   printf(&quot;pixmap-&gt;green_size             ::%d\n&quot;,  pixmap-&gt;green_size);<br>
   printf(&quot;pixmap-&gt;red_size               ::%d\n&quot;, pixmap-&gt;blue_size);<br>
   printf(&quot;pixmap-&gt;alpha_size             ::%d\n&quot;,  pixmap-&gt;alpha_size);<br>
   printf(&quot;pixmap-&gt;luminance_size         ::%d\n&quot;, pixmap-&gt;luminance_size);<br>
   printf(&quot;pixmap-&gt;flags                  ::%d\n&quot;,  pixmap-&gt;flags);<br>
   printf(&quot;pixmap-&gt;data              ::%p\n&quot;,   pixmap-&gt;data);<br>
<br>
   struct fbdev_display *fbdpy = fbdev_display(ndpy);<br>
   struct fbdev_surface *fbsurf;<br>
   fbsurf = CALLOC_STRUCT(fbdev_surface);<br>
   if (!fbsurf)<br>
      return NULL;<br>
   fbsurf-&gt;fbdpy = fbdpy;<br>
   fbsurf-&gt;width = pixmap-&gt;width;<br>
   fbsurf-&gt;height =  pixmap-&gt;height;<br>
   fbsurf-&gt;type = FBDEV_SURFACE_TYPE_PIXMAP;<br>
   fbsurf-&gt;pixmap = pix;<br>
   fbsurf-&gt;rsurf = resource_surface_create(fbdpy-&gt;base.screen,<br>
         nconf-&gt;color_format,<br>
         PIPE_BIND_RENDER_TARGET |<br>
         PIPE_BIND_DISPLAY_TARGET |  PIPE_BIND_SCANOUT );<br>
<br>
   if (!fbsurf-&gt;rsurf) {<br>
      FREE(fbsurf);<br>
      return NULL;<br>
   }<br>
<br>
   resource_surface_set_size(fbsurf-&gt;rsurf, fbsurf-&gt;width, fbsurf-&gt;height);<br>
<br>
   fbsurf-&gt;base.destroy = fbdev_surface_destroy;<br>
   fbsurf-&gt;base.present = fbdev_surface_present;<br>
   fbsurf-&gt;base.validate = fbdev_surface_validate;<br>
   fbsurf-&gt;base.wait = fbdev_surface_wait;<br>
<br>
   printf(&quot;END %s    %s\n&quot;, __FUNCTION__, __FILE__);<br>
   return &amp;fbsurf-&gt;base;<br>
<br>
}<br>
<br>
static struct native_display *<br>
fbdev_display_create(int fd, struct native_event_handler *event_handler,<br>
                     void *user_data)<br>
{<br>
   struct fbdev_display *fbdpy;<br>
<br>
   fbdpy = CALLOC_STRUCT(fbdev_display);<br>
   if (!fbdpy)<br>
      return NULL;<br>
<br>
   fbdpy-&gt;fd = fd;<br>
   fbdpy-&gt;event_handler = event_handler;<br>
   fbdpy-&gt;base.user_data = user_data;<br>
<br>
   if (!fbdev_display_init(&amp;fbdpy-&gt;base)) {<br>
      FREE(fbdpy);<br>
      return NULL;<br>
   }<br>
<br>
   fbdpy-&gt;base.destroy = fbdev_display_destroy;<br>
   fbdpy-&gt;base.get_param = fbdev_display_get_param;<br>
   fbdpy-&gt;base.get_configs = fbdev_display_get_configs;<br>
<br>
   /*Vivek:: Adding function to create PIXMAP surface*/<br>
    fbdpy-&gt;base.is_pixmap_supported = fbdev_display_is_pixmap_supported;<br>
    fbdpy-&gt;base.create_pixmap_surface = fbdev_display_create_pixmap_surface;<br>
<br>
    fbdpy-&gt;base.modeset = &amp;fbdev_display_modeset;<br>
<br>
   return &amp;fbdpy-&gt;base;<br>
}<br>
<br>
static boolean<br>
fbdev_display_is_pixmap_supported(struct native_display *ndpy,<br>
                                   EGLNativePixmapType pix,<br>
                                   const struct native_config *nconf)<br>
{<br>
   printf(&quot;START   %s     %s\n&quot;, __FUNCTION__, __FILE__);<br>
   struct fbdev_display *fdpy = fbdev_display(ndpy);<br>
   enum pipe_format fmt;<br>
   uint depth;<br>
   depth =  32; //hard coded for 4bpp<br>
   switch (depth) {<br>
   case 32:<br>
      fmt = PIPE_FORMAT_B8G8R8A8_UNORM;<br>
      break;<br>
   case 24:<br>
      fmt = PIPE_FORMAT_B8G8R8X8_UNORM;<br>
      break;<br>
   case 16:<br>
      fmt = PIPE_FORMAT_B5G6R5_UNORM;<br>
      break;<br>
   default:<br>
      fmt = PIPE_FORMAT_NONE;<br>
      break;<br>
   }<br>
<br>
   return (fmt == nconf-&gt;color_format);<br>
}<br>
<br>
static boolean<br>
fbdev_surface_flush_frontbuffer(struct native_surface *nsurf)<br>
{<br>
  printf(&quot;%s    %s\n&quot;, __FUNCTION__, __FILE__);<br>
  struct fbdev_surface *fbsurf = fbdev_surface(nsurf);<br>
<br>
   if (!fbsurf-&gt;is_current)<br>
      return TRUE;<br>
<br>
   if(fbsurf-&gt;type == FBDEV_SURFACE_TYPE_PIXMAP)   //Vivek<br>
        {<br>
<br>
           return resource_surface_present(fbsurf-&gt;rsurf,<br>
NATIVE_ATTACHMENT_FRONT_LEFT, fbsurf-&gt;pixmap);<br>
        }<br>
   else<br>
        {<br>
           return resource_surface_present(fbsurf-&gt;rsurf,<br>
NATIVE_ATTACHMENT_FRONT_LEFT, NULL);<br>
        }<br>
<br>
}<br>
<br>
<br>
Regards<br>
Vivek</div><br><div class="gmail_quote">On Sat, Sep 24, 2011 at 11:08 PM,  <span dir="ltr">&lt;<a href="mailto:mesa-dev-request@lists.freedesktop.org">mesa-dev-request@lists.freedesktop.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Welcome to the <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a> mailing list!<br>
<br>
To post to this list, send your email to:<br>
<br>
  <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<br>
General information about the mailing list is at:<br>
<br>
  <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
<br>
If you ever want to unsubscribe or change your options (eg, switch to<br>
or from digest mode, change your password, etc.), visit your<br>
subscription page at:<br>
<br>
  <a href="http://lists.freedesktop.org/mailman/options/mesa-dev/vivek.siwan%40gmail.com" target="_blank">http://lists.freedesktop.org/mailman/options/mesa-dev/vivek.siwan%40gmail.com</a><br>
<br>
<br>
You can also make such adjustments via email by sending a message to:<br>
<br>
  <a href="mailto:mesa-dev-request@lists.freedesktop.org">mesa-dev-request@lists.freedesktop.org</a><br>
<br>
with the word `help&#39; in the subject or body (don&#39;t include the<br>
quotes), and you will get back a message with instructions.<br>
<br>
You must know your password to change your options (including changing<br>
the password, itself) or to unsubscribe.  It is:<br>
<br>
  himmatwala<br>
<br>
Normally, Mailman will remind you of your <a href="http://lists.freedesktop.org" target="_blank">lists.freedesktop.org</a><br>
mailing list passwords once every month, although you can disable this<br>
if you prefer.  This reminder will also include instructions on how to<br>
unsubscribe or change your account options.  There is also a button on<br>
your options page that will email your current password to you.<br>
</blockquote></div><br>