irb->Base.DataType = GL_UNSIGNED_BYTE;
break;
case MESA_FORMAT_XRGB8888:
+ /* XXX this is a hack since XRGB surfaces don't seem to work
+ * properly yet. Reading the alpha channel returns 0 instead of 1.
+ */
+ format = MESA_FORMAT_ARGB8888;
irb->Base._BaseFormat = GL_RGB;
irb->Base.DataType = GL_UNSIGNED_BYTE;
break;
return NULL;
}
- assert(irb->Base._BaseFormat == _mesa_get_format_base_format(format));
irb->Base.Format = format;
irb->Base.InternalFormat = irb->Base._BaseFormat;
irb->texformat = format;
if (mesaVis->redBits == 5)
rgbFormat = MESA_FORMAT_RGB565;
else if (mesaVis->alphaBits == 0)
- rgbFormat = MESA_FORMAT_ARGB8888; /* XXX change to XRGB someday */
+ rgbFormat = MESA_FORMAT_XRGB8888;
else
rgbFormat = MESA_FORMAT_ARGB8888;
}
break;
case MESA_FORMAT_ARGB8888:
- if (0 /*rb->AlphaBits == 0*/) { /* XXX: Need xRGB8888 Mesa format */
+ if (rb->_BaseFormat == GL_RGB) {
/* XXX remove this code someday when we enable XRGB surfaces */
/* 8888 RGBx */
switch (tiling) {