open-src/lib/mesa/6866668.patch
changeset 760 7c47c7633a24
equal deleted inserted replaced
759:d8cce37cfa08 760:7c47c7633a24
       
     1 --- src/mesa/drivers/dri/intel/intel_batchbuffer.h	Mon Jul  6 09:16:30 2009
       
     2 +++ src/mesa/drivers/dri/intel/intel_batchbuffer.h	Mon Jul  6 09:17:54 2009
       
     3 @@ -8,7 +8,8 @@
       
     4  #include "intel_reg.h"
       
     5  
       
     6  #define BATCH_SZ 16384
       
     7 -#define BATCH_RESERVED 16
       
     8 +#define BATCH_RESERVED16 16
       
     9 +#define BATCH_RESERVED4k 4096
       
    10  
       
    11  enum cliprect_mode {
       
    12     /**
       
    13 @@ -104,7 +105,10 @@
       
    14  static INLINE GLint
       
    15  intel_batchbuffer_space(struct intel_batchbuffer *batch)
       
    16  {
       
    17 -   return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);
       
    18 +    if (batch->intel->intelScreen->deviceID == PCI_CHIP_I865_G)
       
    19 +	return (batch->size - BATCH_RESERVED16) - (batch->ptr - batch->map);
       
    20 +    else
       
    21 +	return (batch->size - BATCH_RESERVED4k) - (batch->ptr - batch->map);
       
    22  }
       
    23  
       
    24  
       
    25 --- src/glx/x11/glxcurrent.c	Tue Jul 28 12:58:24 2009
       
    26 +++ src/glx/x11/glxcurrent.c	Tue Jul 28 13:01:07 2009
       
    27 @@ -412,7 +412,8 @@
       
    28  
       
    29  #ifdef GLX_DIRECT_RENDERING
       
    30     if ((dpy != oldGC->currentDpy || (gc && gc->driContext)) &&
       
    31 -       !oldGC->isDirect && oldGC != &dummyContext) {
       
    32 +      !oldGC->isDirect && oldGC != &dummyContext &&
       
    33 +      oldGC->xid != None) {
       
    34  #else
       
    35     if ((dpy != oldGC->currentDpy) && oldGC != &dummyContext) {
       
    36  #endif
       
    37 
       
    38 --- include/GL/internal/dri_interface.h	Wed Jul 29 10:00:29 2009
       
    39 +++ include/GL/internal/dri_interface.h	Wed Jul 29 10:01:03 2009
       
    40 @@ -657,6 +657,30 @@
       
    41       *                       into __DRIdri2ExtensionRec::createNewDrawable
       
    42       */
       
    43      void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
       
    44 +
       
    45 +    /**
       
    46 +     * Get list of buffers from the server
       
    47 +     *
       
    48 +     * Gets a list of buffer for the specified set of attachments.  Unlike
       
    49 +     * \c ::getBuffers, this function takes a list of attachments paired with
       
    50 +     * opaque \c unsigned \c int value describing the format of the buffer.
       
    51 +     * It is the responsibility of the caller to know what the service that
       
    52 +     * allocates the buffers will expect to receive for the format.
       
    53 +     *
       
    54 +     * \param driDrawable    Drawable whose buffers are being queried.
       
    55 +     * \param width          Output where the width of the buffers is stored.
       
    56 +     * \param height         Output where the height of the buffers is stored.
       
    57 +     * \param attachments    List of pairs of attachment ID and opaque format
       
    58 +     *                       requested for the drawable.
       
    59 +     * \param count          Number of attachment / format pairs stored in
       
    60 +     *                       \c attachments.
       
    61 +     * \param loaderPrivate  Loader's private data that was previously passed
       
    62 +     *                       into __DRIdri2ExtensionRec::createNewDrawable.
       
    63 +     */
       
    64 +    __DRIbuffer *(*getBuffersWithFormat)(__DRIdrawable *driDrawable,
       
    65 +                                         int *width, int *height,
       
    66 +                                         unsigned int *attachments, int count,
       
    67 +                                         int *out_count, void *loaderPrivate);
       
    68  };
       
    69  
       
    70  /**