commit 2d527ee9f79f4b914a48e00a35ba717f558d57e6 Author: Tom Hughes Date: Tue Jun 2 13:40:37 2015 +0100 Match swrast modes more loosely diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 63c8de3..031ec7b 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -313,10 +313,90 @@ driConfigEqual(const __DRIcoreExtension *core, if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) glxValue |= GLX_TEXTURE_RECTANGLE_BIT_EXT; if (config->bindToTextureTargets != GLX_DONT_CARE && - glxValue != config->bindToTextureTargets) + glxValue != (config->bindToTextureTargets & glxValue)) return GL_FALSE; break; + case __DRI_ATTRIB_STENCIL_SIZE: + if (value != 0 && value != config->stencilBits) + return GL_FALSE; + break; + + case __DRI_ATTRIB_ACCUM_RED_SIZE: + if (value != 0 && value != config->accumRedBits) + return GL_FALSE; + break; + + case __DRI_ATTRIB_ACCUM_GREEN_SIZE: + if (value != 0 && value != config->accumGreenBits) + return GL_FALSE; + break; + + case __DRI_ATTRIB_ACCUM_BLUE_SIZE: + if (value != 0 && value != config->accumBlueBits) + return GL_FALSE; + break; + + case __DRI_ATTRIB_ACCUM_ALPHA_SIZE: + if (value != 0 && value != config->accumGreenBits) + return GL_FALSE; + break; + + case __DRI_ATTRIB_SAMPLE_BUFFERS: + if (value > config->sampleBuffers) + return GL_FALSE; + break; + + case __DRI_ATTRIB_SAMPLES: + if (value > config->samples) + return GL_FALSE; + break; + + case __DRI_ATTRIB_DOUBLE_BUFFER: + if (value && !config->doubleBufferMode) + return GL_FALSE; + break; + + case __DRI_ATTRIB_AUX_BUFFERS: + if (value > config->numAuxBuffers) + return GL_FALSE; + break; + + case __DRI_ATTRIB_MAX_PBUFFER_WIDTH: + if (value > config->maxPbufferWidth) + return GL_FALSE; + break; + + case __DRI_ATTRIB_MAX_PBUFFER_HEIGHT: + if (value > config->maxPbufferHeight) + return GL_FALSE; + break; + + case __DRI_ATTRIB_MAX_PBUFFER_PIXELS: + if (value > config->maxPbufferPixels) + return GL_FALSE; + break; + + case __DRI_ATTRIB_BIND_TO_TEXTURE_RGB: + if (value && !config->bindToTextureRgb) + return GL_FALSE; + break; + + case __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA: + if (value && !config->bindToTextureRgba) + return GL_FALSE; + break; + + case __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE: + if (value && !config->bindToMipmapTexture) + return GL_FALSE; + break; + + case __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE: + if (value && !config->sRGBCapable) + return GL_FALSE; + break; + default: if (!scalarEqual(config, attrib, value)) return GL_FALSE;