Lines 520-532
static const struct { unsigned int attrib, offset; } attribMap[] = {
Link Here
|
520 |
static int |
520 |
static int |
521 |
scalarEqual(__GLcontextModes *mode, unsigned int attrib, unsigned int value) |
521 |
scalarEqual(__GLcontextModes *mode, unsigned int attrib, unsigned int value) |
522 |
{ |
522 |
{ |
523 |
unsigned int driValue; |
523 |
unsigned int glxValue; |
524 |
int i; |
524 |
int i; |
525 |
|
525 |
|
526 |
for (i = 0; i < ARRAY_SIZE(attribMap); i++) |
526 |
for (i = 0; i < ARRAY_SIZE(attribMap); i++) |
527 |
if (attribMap[i].attrib == attrib) { |
527 |
if (attribMap[i].attrib == attrib) { |
528 |
driValue = *(unsigned int *) ((char *) mode + attribMap[i].offset); |
528 |
glxValue = *(unsigned int *) ((char *) mode + attribMap[i].offset); |
529 |
return driValue == value; |
529 |
return glxValue == GLX_DONT_CARE || glxValue == value; |
530 |
} |
530 |
} |
531 |
|
531 |
|
532 |
return GL_TRUE; /* Is a non-existing attribute equal to value? */ |
532 |
return GL_TRUE; /* Is a non-existing attribute equal to value? */ |
Lines 572-578
driConfigEqual(const __DRIcoreExtension *core,
Link Here
|
572 |
glxValue |= GLX_TEXTURE_2D_BIT_EXT; |
572 |
glxValue |= GLX_TEXTURE_2D_BIT_EXT; |
573 |
if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) |
573 |
if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) |
574 |
glxValue |= GLX_TEXTURE_RECTANGLE_BIT_EXT; |
574 |
glxValue |= GLX_TEXTURE_RECTANGLE_BIT_EXT; |
575 |
if (glxValue != modes->bindToTextureTargets) |
575 |
if (modes->bindToTextureTargets != GLX_DONT_CARE && |
|
|
576 |
glxValue != modes->bindToTextureTargets) |
576 |
return GL_FALSE; |
577 |
return GL_FALSE; |
577 |
break; |
578 |
break; |
578 |
|
579 |
|