xserver: Branch 'master' - 4 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Nov 5 19:23:53 PST 2008


 hw/xquartz/GL/capabilities.c  |  100 +++++++++++++++++++++++++
 hw/xquartz/GL/capabilities.h  |    6 +
 hw/xquartz/GL/indirect.c      |   11 ++
 hw/xquartz/GL/visualConfigs.c |  162 +++++++++++++++++++++++-------------------
 hw/xquartz/bundle/Info.plist  |    6 -
 hw/xquartz/quartzAudio.c      |    3 
 6 files changed, 208 insertions(+), 80 deletions(-)

New commits:
commit 13d06f5aaf6120c902a323649615c1ce3d1b5359
Author: George Peter Staplin <gps at Georges-Workstation.local>
Date:   Tue Nov 4 12:53:12 2008 -0700

    XQuartz: GL: Add capability detection for depth buffers, and multisampling.
    
    GL/capabilities.c: Add handleDepthModes(), and extend
    handleRendererDescription() for the various depth and multisampling flags.
    
    Add initialization of the new config options to initConfig().
    
    GL/capabilities.h: Add depth and multisample config members.
    
    GL/visualConfigs.c: Add depth and multisampling support to the visual config
    setup.
    (cherry picked from commit f527381eea6a8ae6cd791475b2060d21fcf8efb2)

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index 23d7c25..bc3966f 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -295,11 +295,60 @@ static void handleAccumulationModes(struct glCapabilitiesConfig *c, GLint cmodes
     assert(c->total_accum_buffers < GLCAPS_COLOR_BUFFERS);
 }
 
+static void handleDepthModes(struct glCapabilitiesConfig *c, GLint dmodes) {
+    int offset = 0;
+#define DEPTH(flag,value) do { \
+	if(dmodes & flag) { \
+	    c->depth_buffers[offset++] = value; \
+	} \
+    } while(0)
+
+    /*1*/
+    DEPTH(kCGL0Bit, 0);
+    /*2*/
+    DEPTH(kCGL1Bit, 1);
+    /*3*/
+    DEPTH(kCGL2Bit, 2);
+    /*4*/
+    DEPTH(kCGL3Bit, 3);
+    /*5*/
+    DEPTH(kCGL4Bit, 4);
+    /*6*/
+    DEPTH(kCGL5Bit, 5);
+    /*7*/
+    DEPTH(kCGL6Bit, 6);
+    /*8*/
+    DEPTH(kCGL8Bit, 8);
+    /*9*/
+    DEPTH(kCGL10Bit, 10);
+    /*10*/
+    DEPTH(kCGL12Bit, 12);
+    /*11*/
+    DEPTH(kCGL16Bit, 16);
+    /*12*/
+    DEPTH(kCGL24Bit, 24);
+    /*13*/
+    DEPTH(kCGL32Bit, 32);
+    /*14*/
+    DEPTH(kCGL48Bit, 48);
+    /*15*/
+    DEPTH(kCGL64Bit, 64);
+    /*16*/
+    DEPTH(kCGL96Bit, 96);
+    /*17*/
+    DEPTH(kCGL128Bit, 128);
+
+#undef DEPTH
+
+    c->total_depth_buffer_depths = offset;
+    assert(c->total_depth_buffer_depths < GLCAPS_DEPTH_BUFFERS);
+}
+
 /* Return non-zero if an error occured. */
 static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r, 
 					   struct glCapabilitiesConfig *c) {
     CGLError err;
-    GLint accelerated = 0, flags = 0, aux = 0;
+    GLint accelerated = 0, flags = 0, aux = 0, samplebufs = 0, samples = 0;
 
     err = CGLDescribeRenderer (info, r, kCGLRPAccelerated, &accelerated);
 
@@ -323,7 +372,34 @@ static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r,
 	return err;
     
     c->aux_buffers = aux;
+
     
+    /* Depth buffer size */
+    err = CGLDescribeRenderer(info, r, kCGLRPDepthModes, &flags);
+    
+    if(err)
+	return err;
+
+    handleDepthModes(c, flags);
+
+
+    /* Multisample buffers */
+    err = CGLDescribeRenderer(info, r, kCGLRPMaxSampleBuffers, &samplebufs);
+
+    if(err)
+	return err;
+
+    c->multisample_buffers = samplebufs;
+    
+
+    /* Multisample samples per multisample buffer */
+    err = CGLDescribeRenderer(info, r, kCGLRPMaxSamples, &samples);
+
+    if(err)
+	return err;
+
+    c->multisample_samples = samples;
+
 
     /* Stencil bit depths */
     err = CGLDescribeRenderer(info, r, kCGLRPStencilModes, &flags);
@@ -362,8 +438,18 @@ static void initConfig(struct glCapabilitiesConfig *c) {
 
     c->accelerated = false;
     c->stereo = false;
-    c->buffers = 0;
     c->aux_buffers = 0;
+    c->buffers = 0;
+
+    c->total_depth_buffer_depths = 0;
+
+    for(i = 0; i < GLCAPS_DEPTH_BUFFERS; ++i) {
+	c->depth_buffers[i] = GLCAPS_INVALID_DEPTH_VALUE;
+    }
+
+    c->multisample_buffers = 0;
+    c->multisample_samples = 0;
+
     c->total_stencil_bit_depths = 0;
 
     for(i = 0; i < GLCAPS_STENCIL_BIT_DEPTH_BUFFERS; ++i) {
diff --git a/hw/xquartz/GL/capabilities.h b/hw/xquartz/GL/capabilities.h
index 20be30d..361856b 100644
--- a/hw/xquartz/GL/capabilities.h
+++ b/hw/xquartz/GL/capabilities.h
@@ -29,6 +29,8 @@ enum { GLCAPS_INVALID_STENCIL_DEPTH = -1 };
 enum { GLCAPS_COLOR_BUF_INVALID_VALUE = -1 };
 enum { GLCAPS_COLOR_BUFFERS = 20 };
 enum { GLCAPS_STENCIL_BIT_DEPTH_BUFFERS = 20 };
+enum { GLCAPS_DEPTH_BUFFERS = 20 };
+enum { GLCAPS_INVALID_DEPTH_VALUE = 1 };
 
 struct glColorBufCapabilities {
     char r, g, b, a;
@@ -40,6 +42,10 @@ struct glCapabilitiesConfig {
     bool stereo;
     int aux_buffers;
     int buffers;
+    int total_depth_buffer_depths;
+    int depth_buffers[GLCAPS_DEPTH_BUFFERS];
+    int multisample_buffers;
+    int multisample_samples;
     int total_stencil_bit_depths;
     char stencil_bit_depths[GLCAPS_STENCIL_BIT_DEPTH_BUFFERS];
     int total_color_buffers;
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index f7f253f..2f5c508 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -63,9 +63,9 @@ void setVisualConfigs(void) {
     void **visualPrivates = NULL;
     struct glCapabilities caps;
     struct glCapabilitiesConfig *conf = NULL;
-    int stereo, depth, aux, buffers, stencil, accum, color;
+    int stereo, depth, aux, buffers, stencil, accum, color, msample;
     int i = 0; 
-   
+    
     if(getGlCapabilities(&caps)) {
 	ErrorF("error from getGlCapabilities()!\n");
 	return;
@@ -86,7 +86,12 @@ void setVisualConfigs(void) {
       conf->total_color_buffers indicates the RGB/RGBA color depths.
       
       conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) 
-	 
+	
+      conf->total_depth_buffer_depths 
+
+      conf->multisample_buffers iterations (with at least 1 if equal to 0).  We add 1
+      for the 0 multisampling config.
+      
      */
 
     assert(NULL != caps.configurations);
@@ -103,7 +108,9 @@ void setVisualConfigs(void) {
 	    * conf->buffers
 	    * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1)
 	    * conf->total_color_buffers
-	    * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1);
+	    * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1)
+	    * conf->total_depth_buffer_depths
+	    * (conf->multisample_buffers + 1);
     }
 
     visualConfigs = xcalloc(sizeof(*visualConfigs), numConfigs);
@@ -133,79 +140,84 @@ void setVisualConfigs(void) {
 			for(color = 0; color < conf->total_color_buffers; ++color) {
 			    for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
 						    conf->total_accum_buffers : 1); ++accum) {
-				visualConfigs[i].vid = (VisualID)(-1);
-				visualConfigs[i].class = TrueColor;
-				
-				visualConfigs[i].rgba = true;
-				visualConfigs[i].redSize = conf->color_buffers[color].r;
-				visualConfigs[i].greenSize = conf->color_buffers[color].g;
-				visualConfigs[i].blueSize = conf->color_buffers[color].b;
-				visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+				for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) {
+				    for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) {
+					visualConfigs[i].vid = (VisualID)(-1);
+					visualConfigs[i].class = TrueColor;
+					
+					visualConfigs[i].rgba = true;
+					visualConfigs[i].redSize = conf->color_buffers[color].r;
+					visualConfigs[i].greenSize = conf->color_buffers[color].g;
+					visualConfigs[i].blueSize = conf->color_buffers[color].b;
+					visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+					
+					visualConfigs[i].bufferSize = conf->color_buffers[color].r +
+					    conf->color_buffers[color].g + conf->color_buffers[color].b +
+					    conf->color_buffers[color].a;
+					
+					/*
+					 * I'm uncertain about these masks.
+					 * I don't think we actually care what the values are in our
+					 * libGL, so it doesn't seem to make a difference.
+					 */
+					visualConfigs[i].redMask = -1;
+					visualConfigs[i].greenMask = -1;
+					visualConfigs[i].blueMask = -1;
+					visualConfigs[i].alphaMask = -1;
+					
+					if(conf->total_accum_buffers > 0) {
+					    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
+					    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
+					    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
+					    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
+						visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
+					    } else {
+						visualConfigs[i].accumAlphaSize = 0;
+					    }
+					} else {
+					    visualConfigs[i].accumRedSize = 0;
+					    visualConfigs[i].accumGreenSize = 0;
+					    visualConfigs[i].accumBlueSize = 0;
+					    visualConfigs[i].accumAlphaSize = 0;
+					}
+					
+					visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
+					visualConfigs[i].stereo = stereo ? TRUE : FALSE;
+
+  					visualConfigs[i].depthSize = conf->depth_buffers[depth];
 				
-				visualConfigs[i].bufferSize = conf->color_buffers[color].r +
-				    conf->color_buffers[color].g + conf->color_buffers[color].b +
-				    conf->color_buffers[color].a;
+					if(conf->total_stencil_bit_depths > 0) {
+					    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
+					} else {
+					    visualConfigs[i].stencilSize = 0;
+					}
+					visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
+					visualConfigs[i].level = 0;
 				
-				/*
-				 * I'm uncertain about these masks.
-				 * I don't think we actually care what the values are in our
-				 * libGL, so it doesn't seem to make a difference.
-				 */
-				visualConfigs[i].redMask = -1;
-				visualConfigs[i].greenMask = -1;
-				visualConfigs[i].blueMask = -1;
-				visualConfigs[i].alphaMask = -1;
-				
-				if(conf->total_accum_buffers > 0) {
-				    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
-				    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
-				    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
-				    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
-					visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
-				    } else {
-					visualConfigs[i].accumAlphaSize = 0;
+					if(conf->accelerated) {
+					    visualConfigs[i].visualRating = GLX_NONE;
+					} else {
+					    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
+					}
+					
+					visualConfigs[i].transparentPixel = GLX_NONE;
+					visualConfigs[i].transparentRed = GLX_NONE;
+					visualConfigs[i].transparentGreen = GLX_NONE;
+					visualConfigs[i].transparentBlue = GLX_NONE;
+					visualConfigs[i].transparentAlpha = GLX_NONE;
+					visualConfigs[i].transparentIndex = GLX_NONE;
+					
+					if(msample > 0) {
+					    visualConfigs[i].multiSampleSize = conf->multisample_samples;
+					    visualConfigs[i].nMultiSampleBuffers = conf->multisample_buffers;
+					} else {
+					    visualConfigs[i].multiSampleSize = 0;
+					    visualConfigs[i].nMultiSampleBuffers = 0;
+					}
+										
+					++i;
 				    }
-				} else {
-				    visualConfigs[i].accumRedSize = 0;
-				    visualConfigs[i].accumGreenSize = 0;
-				    visualConfigs[i].accumBlueSize = 0;
-				    visualConfigs[i].accumAlphaSize = 0;
-				}
-				
-				visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
-				visualConfigs[i].stereo = stereo ? TRUE : FALSE;
-				
-				visualConfigs[i].depthSize = 24;
-				
-				if(conf->total_stencil_bit_depths > 0) {
-				    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
-				} else {
-				    visualConfigs[i].stencilSize = 0;
-				}
-				visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
-				visualConfigs[i].level = 0;
-				
-				if(conf->accelerated) {
-				    visualConfigs[i].visualRating = GLX_NONE;
-				} else {
-				    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
 				}
-				
-				visualConfigs[i].transparentPixel = GLX_NONE;
-				visualConfigs[i].transparentRed = GLX_NONE;
-				visualConfigs[i].transparentGreen = GLX_NONE;
-				visualConfigs[i].transparentBlue = GLX_NONE;
-				visualConfigs[i].transparentAlpha = GLX_NONE;
-				visualConfigs[i].transparentIndex = GLX_NONE;
-				
-				/*
-				  TODO possibly handle:
-				  multiSampleSize;
-				  nMultiSampleBuffers;
-				  visualSelectGroup;
-				*/
-				
-				++i;
 			    }
 			}
 		    }
commit 34bb06b292dc8b07d8602941aab3e69a73811314
Author: George Peter Staplin <gps at Georges-Workstation.local>
Date:   Mon Nov 3 19:52:48 2008 -0700

    XQuartz: GL: Work around problems with really deep visuals.
    
    GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel,
    because they introduce drawing problems.
    
    GL/indirect.c: Comment out some visual setup code that shouldn't be running, and
    actually seemed to cause some problems.  The current visualConfigs.c code seems
    to do a reasonable job of setting up visuals for XQuartz.
    
    GL/visualConfigs.c: Make use of the proper visual .class.   Eliminate depth 0.
    It seems we really just want 24 for now, and 0 I think was a flaw in the original
    code.
    (cherry picked from commit 1e5f63f15e13a40a6e69a1505934d10d6990b6a2)

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index b38dba8..23d7c25 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -204,6 +204,15 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
 	++offset;
     }
 
+#if 0
+    /* 
+     * Disable this path, because some part of libGL, X, or Xplugin 
+     * doesn't work with sizes greater than 8.
+     * When this is enabled and visuals are chosen using depths
+     * such as 16, the result is that the windows don't redraw
+     * and are often white, until a resize.
+     */
+
     /*12*/
     if(kCGLRGB101010Bit & cmodes) {
 	c[offset].r = 10;
@@ -265,6 +274,7 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
 	c[offset].a = 16;
 	++offset;
     }
+#endif
 
     /* FIXME should we handle the floating point color modes, and if so, how? */
       
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 2a15a81..22157e2 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -1155,8 +1155,15 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) {
   screen->base.createDrawable = __glXAquaScreenCreateDrawable;
   screen->base.pScreen       = pScreen;
 
-  init_screen_visuals(screen);
-    
+  /* 
+   * These are both commented out, because they cause problems with
+   * the other visual config code, and visuals.
+   * This probe function is called normally on startup in direct
+   * mode too.
+   * They don't seem to be needed now that we have better visual
+   * setup.
+   */
+  //init_screen_visuals(screen);
   //glAquaInitVisualConfigs();
 
   return &screen->base;
diff --git a/hw/xquartz/GL/visualConfigs.c b/hw/xquartz/GL/visualConfigs.c
index 12e9777..f7f253f 100644
--- a/hw/xquartz/GL/visualConfigs.c
+++ b/hw/xquartz/GL/visualConfigs.c
@@ -86,6 +86,7 @@ void setVisualConfigs(void) {
       conf->total_color_buffers indicates the RGB/RGBA color depths.
       
       conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) 
+	 
      */
 
     assert(NULL != caps.configurations);
@@ -98,7 +99,6 @@ void setVisualConfigs(void) {
 	    continue;
 
 	numConfigs += (conf->stereo ? 2 : 1) 
-	    * 2 /*depth*/ 
 	    * (conf->aux_buffers ? 2 : 1) 
 	    * conf->buffers
 	    * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1)
@@ -126,80 +126,86 @@ void setVisualConfigs(void) {
     i = 0; /* current buffer */
     for(conf = caps.configurations; conf; conf = conf->next) {
 	for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) {
-	    for(depth = 0; depth < 2; ++depth) {
-		for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) {
-		    for(buffers = 0; buffers < conf->buffers; ++buffers) {
-			for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? 
-						    conf->total_stencil_bit_depths : 1); ++stencil) {
-			    for(color = 0; color < conf->total_color_buffers; ++color) {
-				for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
-							conf->total_accum_buffers : 1); ++accum) {
-				    visualConfigs[i].vid = -1;
-				    visualConfigs[i].class = -1;
-		     
-				    visualConfigs[i].rgba = true;
-				    visualConfigs[i].redSize = conf->color_buffers[color].r;
-				    visualConfigs[i].greenSize = conf->color_buffers[color].g;
-				    visualConfigs[i].blueSize = conf->color_buffers[color].b;
-				    visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+	    for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) {
+		for(buffers = 0; buffers < conf->buffers; ++buffers) {
+		    for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? 
+						conf->total_stencil_bit_depths : 1); ++stencil) {
+			for(color = 0; color < conf->total_color_buffers; ++color) {
+			    for(accum = 0; accum < ((conf->total_accum_buffers > 0) ?
+						    conf->total_accum_buffers : 1); ++accum) {
+				visualConfigs[i].vid = (VisualID)(-1);
+				visualConfigs[i].class = TrueColor;
 				
-				    visualConfigs[i].redMask = -1;
-				    visualConfigs[i].greenMask = -1;
-				    visualConfigs[i].blueMask = -1;
-				    visualConfigs[i].alphaMask = -1;
-
-				    if(conf->total_accum_buffers > 0) {
-					visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
-					visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
-					visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
-					if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
-					    visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
-					} else {
-					    visualConfigs[i].accumAlphaSize = 0;
-					}
+				visualConfigs[i].rgba = true;
+				visualConfigs[i].redSize = conf->color_buffers[color].r;
+				visualConfigs[i].greenSize = conf->color_buffers[color].g;
+				visualConfigs[i].blueSize = conf->color_buffers[color].b;
+				visualConfigs[i].alphaSize = conf->color_buffers[color].a;
+				
+				visualConfigs[i].bufferSize = conf->color_buffers[color].r +
+				    conf->color_buffers[color].g + conf->color_buffers[color].b +
+				    conf->color_buffers[color].a;
+				
+				/*
+				 * I'm uncertain about these masks.
+				 * I don't think we actually care what the values are in our
+				 * libGL, so it doesn't seem to make a difference.
+				 */
+				visualConfigs[i].redMask = -1;
+				visualConfigs[i].greenMask = -1;
+				visualConfigs[i].blueMask = -1;
+				visualConfigs[i].alphaMask = -1;
+				
+				if(conf->total_accum_buffers > 0) {
+				    visualConfigs[i].accumRedSize = conf->accum_buffers[accum].r;
+				    visualConfigs[i].accumGreenSize = conf->accum_buffers[accum].g;
+				    visualConfigs[i].accumBlueSize = conf->accum_buffers[accum].b;
+				    if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) {
+					visualConfigs[i].accumAlphaSize = conf->accum_buffers[accum].a;
 				    } else {
-					visualConfigs[i].accumRedSize = 0;
-					visualConfigs[i].accumGreenSize = 0;
-					visualConfigs[i].accumBlueSize = 0;
 					visualConfigs[i].accumAlphaSize = 0;
 				    }
-
-				    visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
-				    visualConfigs[i].stereo = stereo ? TRUE : FALSE;
-				    visualConfigs[i].bufferSize = -1;
-				    
-				    visualConfigs[i].depthSize = depth ? 24 : 0;
-				    
-				    if(conf->total_stencil_bit_depths > 0) {
-					visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
-				    } else {
-					visualConfigs[i].stencilSize = 0;
-				    }
-				    visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
-				    visualConfigs[i].level = 0;
-
-				    if(conf->accelerated) {
-					visualConfigs[i].visualRating = GLX_NONE;
-				    } else {
-					visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
-				    }
-
-				    visualConfigs[i].transparentPixel = GLX_NONE;
-				    visualConfigs[i].transparentRed = GLX_NONE;
-				    visualConfigs[i].transparentGreen = GLX_NONE;
-				    visualConfigs[i].transparentBlue = GLX_NONE;
-				    visualConfigs[i].transparentAlpha = GLX_NONE;
-				    visualConfigs[i].transparentIndex = GLX_NONE;
-
-				    /*
-				      TODO possibly handle:
-				      multiSampleSize;
-				      nMultiSampleBuffers;
-				      visualSelectGroup;
-				    */
-
-				    ++i;
+				} else {
+				    visualConfigs[i].accumRedSize = 0;
+				    visualConfigs[i].accumGreenSize = 0;
+				    visualConfigs[i].accumBlueSize = 0;
+				    visualConfigs[i].accumAlphaSize = 0;
 				}
+				
+				visualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE;
+				visualConfigs[i].stereo = stereo ? TRUE : FALSE;
+				
+				visualConfigs[i].depthSize = 24;
+				
+				if(conf->total_stencil_bit_depths > 0) {
+				    visualConfigs[i].stencilSize = conf->stencil_bit_depths[stencil];
+				} else {
+				    visualConfigs[i].stencilSize = 0;
+				}
+				visualConfigs[i].auxBuffers = aux ? conf->aux_buffers : 0;
+				visualConfigs[i].level = 0;
+				
+				if(conf->accelerated) {
+				    visualConfigs[i].visualRating = GLX_NONE;
+				} else {
+				    visualConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
+				}
+				
+				visualConfigs[i].transparentPixel = GLX_NONE;
+				visualConfigs[i].transparentRed = GLX_NONE;
+				visualConfigs[i].transparentGreen = GLX_NONE;
+				visualConfigs[i].transparentBlue = GLX_NONE;
+				visualConfigs[i].transparentAlpha = GLX_NONE;
+				visualConfigs[i].transparentIndex = GLX_NONE;
+				
+				/*
+				  TODO possibly handle:
+				  multiSampleSize;
+				  nMultiSampleBuffers;
+				  visualSelectGroup;
+				*/
+				
+				++i;
 			    }
 			}
 		    }
commit 39e82a9b1250b23768136f3c397377a97f8b908c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Nov 2 15:52:22 2008 -0800

    XQuartz: Replace deprecated API usage thanks to Robery Murphy
    (cherry picked from commit 71dd052412400362793f2f0c7c02bf4f4309738c)

diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 2e8f3a4..603ca4a 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -337,7 +337,8 @@ void QuartzAudioInit(void)
     // fixme assert fadeLength<framesPerBuffer
 
     // Prepare for playback
-    status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data);
+    AudioDeviceIOProcID sInputIOProcID = NULL;
+    status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, NULL, &sInputIOProcID );
     if (status) {
         ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status);
         return;
commit b4db46320a437ba8894cb8cfd4ee3abdcc894b01
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Oct 31 20:18:27 2008 -0700

    XQuartz: version string updated for 2.3.2_beta3
    (cherry picked from commit 81bb4128570b44d779126a8dffcd3c5620747383)

diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist
index ea37725..208f8e5 100644
--- a/hw/xquartz/bundle/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -19,11 +19,11 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleVersion</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleVersionString</key>
-		<string>2.3.2</string>
+		<string>2.3.1.91.3</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>


More information about the xorg-commit mailing list