Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5714          
     

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4868 is|0                           |1
           obsolete|                            |




------- Additional Comments From [EMAIL PROTECTED]  2006-10-04 14:16 -------
Created an attachment (id=7266)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=7266&action=view)
patch against head

Overview of the changes to the DRI interface.

The big change in this patch is moving the DRI drawable hash table out
of the DRI driver and into the libGL loader.  The DRI driver shouldn't
worry about server side resources, that's the protocol codes job.
When the DRI driver is loaded by AIGLX, we can register for a callback
when a window is destroyed and don't need this garbage collection, so
the hash table is just in the way there.

Furthermore in GLX 1.3, GLX drawables created using either
glXCreatePixmap or glXCreateWindow are managed by the client and the
client are expected to destroy these drawables once it has finished
using them.  This means that the DRI driver should not track or
garbage collect drawables that are created this way.

Also, there is currently a bug where __DRIscreen::createNewDrawable
always adds the created drawable to the hash, even .  When the DRI driver
tries to garbage collect that drawable, it ends up freeing structures
it didn't allocate and crashes.

Below is a few comments on the changes to dri_interface.h:

@@ -170,16 +170,6 @@ struct __DRIinterfaceMethodsRec {
      * the wire protocol (e.g., EGL) will implement glorified no-op functions.

      */                                                                       

     /[EMAIL PROTECTED]/                                                        
               

-    /**                                                                       

-     * Determine if the specified window ID still exists.                     

-     *                                                                        

-     * \note                                                                  

-     * Implementations may assume that the driver will only pass an ID into   

-     * this function that actually corresponds to a window.  On               

-     * implementations where windows can only be destroyed by the DRI driver  

-     * (e.g., EGL), this function is allowed to always return \c GL_TRUE.     

-     */                                                                       

-    GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);         

                                                                               

     /**                                                                       

      * Create the server-side portion of the GL context.                      

                                                                               

Since the garbage collection is now done in the libGL loader code, the         

DRI driver no longer needs to call into the loader and query existance         

of the corresponding X windows.                                                

                                                                               

@@ -287,12 +277,6 @@ struct __DRIscreenRec {
                               int renderType, const int *attrs);              

                                                                               

-    /**                                                                       

-     * Method to return a pointer to the DRI drawable data.                   

-     */                                                                       

-    __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw,      

-                                 void *drawablePrivate);                      

-                                                                              

                                                                               

The loader is expected to explicitly create and track the                      

__DRIdrawable's it needs, so the DRI driver doesn't need to provide            

this entrypoint.                                                               

                                                                               

@@ -361,27 +345,24 @@ struct __DRIcontextRec {
     void *private;                                                            

                                                                               

-    /**                                                                       

-     * Pointer to the mode used to create this context.                       

-     *                                                                        

-     * \since Internal API version 20040317.                                  

-     */                                                                       

-    const __GLcontextModes * mode;                                            

-                                                                              

                                                                               

The DRI interface function tables should not contain data fields like          

this.  This info should be stored in __DRIcontextPrivate by                    

driCreateNewContext, instead of requiring users of the DRI interface           

to manually set it after calling the context constructor.  However             

with the changes to move implicit GLX drawable to the loader, the DRI          

driver no longer needs this field at all.                                      

                                                                               

     /**                                                                       

      * Method to bind a DRI drawable to a DRI graphics context.               

      *                                                                        

      * \since Internal API version 20050727.                                  

      */                                                                       

-    GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, 

-                        __DRIid read, __DRIcontext *ctx);                     

+    GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn,               

+                            __DRIdrawable *pdraw,                             

+                            __DRIdrawable *pread,                             

+                            __DRIcontext *ctx);                               

                                                                               

We now pass in pointers to the previously created __DRIdrawables               

instead of XIDs.                                                               

                                                                               

     /**                                                                       

      * Method to unbind a DRI drawable from a DRI graphics context.           

      *                                                                        

      * \since Internal API version 20050727.                                  

      */                                                                       

-    GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid
draw\
,                                                                              

-                          __DRIid read, __DRIcontext *ctx);                   

+    GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn,             

+                              __DRIdrawable *pdraw,                           

+                              __DRIdrawable *pread,                           

+                              __DRIcontext *ctx);                             

                                                                               

As for bindContext.  In fact we don't need the drawable and readable           

here, they should just be dropped.
          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to