aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_fbo.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-30 09:12:11 -0600
committerBrian Paul <[email protected]>2009-10-30 09:13:04 -0600
commit409469fb70682cd819ab405e0f92a4659381cfbe (patch)
treefd9caf913c6db20cc849ad60d68eb24102339dd8 /src/mesa/drivers/dri/intel/intel_fbo.c
parent730a3de9f9774710ad5bbea2f32dc3af3c764732 (diff)
intel: fix up some XRGB breakage
We weren't choosing the right XRGB span functions for reading the framebuffer. XRGB formats still aren't turned on yet though.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 9c780d40ccd..d8ac4d36637 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;