[Mesa-dev] [PATCHES] enable GLX_EXT_texture_from_pixmap in software

Sylwester Wysocki sw143 at wp.pl
Sat Sep 17 05:25:20 PDT 2011


I'm trying to enable GLX_EXT_texture_from_pixmap in direct rendering
for swrast. After applying patches given in this thread glxinfo shows
TFP on GLX extensions string, but correlated functions don't work.

1) I found that GetGLXDRIDrawable() inside drisw_bind_tex_image()
   returns NULL, so function fails due to line:

   if (pdraw != NULL) {

   becouse there is no needed GLXDrawable key inside hash table

   if (__glxHashLookup(priv->drawHash, drawable, (void *) &pdraw) == 0)
      return pdraw;

   return NULL;

2) I took a look at i915 dri2 driver and i found this hash is normally
   added inside CreateDRIDrawable() function in glx_pbuffer.c at lines:

   if (__glxHashInsert(priv->drawHash, glxdrawable, pdraw)) {
      (*pdraw->destroyDrawable) (pdraw);
      return; /* FIXME: Check what we're supposed to do here... */
   }

   but this function fails on swrast for me due to:

   pdraw = psc->driScreen->createDrawable(psc, drawable,
                                          glxdrawable, config);
   if (pdraw == NULL) {
      fprintf(stderr, "failed to create drawable\n");
      return;
   }

   and finally due to condition inside driCreateDrawable() in
   drisw_glx.c:

   /* Old dri can't handle GLX 1.3+ drawable constructors. */
   if (xDrawable != drawable)
      return NULL;

3) I tried to comment out above condition, but then i get crash
   inside swrastGetImage() in drisw_glx.c.

Anybody can help?

/Sylwester

   

   

   





More information about the mesa-dev mailing list