summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 9c780d40cc..d8ac4d3663 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -314,6 +314,10 @@ intel_create_renderbuffer(gl_format format)
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;
@@ -340,7 +344,6 @@ intel_create_renderbuffer(gl_format format)
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;
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 62c322b4ed..789135b49f 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -361,7 +361,7 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
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;
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index b0484a9959..927e4fd982 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -666,7 +666,7 @@ intel_set_span_functions(struct intel_context *intel,
}
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) {