summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-12-18 10:41:44 -0800
committerEric Anholt <[email protected]>2007-12-18 10:42:30 -0800
commit0dc2c68ffc379aa04247eb48b84b2fac69949bbd (patch)
tree4de96d5d0f6971b3eebca5cd6560a4e6f6a8ae9d /src/mesa/drivers
parentdd1a868b74ac47ac26f600f2f1eb0dc3f535f31b (diff)
[915] Fix clear color when clearing with triangles.
The diffuse color format is always ARGB32, regardless of the destination surface format.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 38402ee9bff..c351cfcfbc4 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -400,8 +400,6 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
intel_get_rb_region(fb, BUFFER_BACK_LEFT);
struct intel_region *depthRegion =
intel_get_rb_region(fb, BUFFER_DEPTH);
- const GLuint clearColor = (backRegion && backRegion->cpp == 4)
- ? intel->ClearColor8888 : intel->ClearColor565;
intel->vtbl.meta_draw_region(intel, backRegion, depthRegion);
@@ -427,7 +425,7 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
fb->_Xmax,
fb->_Ymin,
fb->_Ymax,
- intel->ctx.Depth.Clear, clearColor,
+ intel->ctx.Depth.Clear, intel->ClearColor8888,
0, 0, 0, 0); /* texcoords */
mask &= ~(BUFFER_BIT_BACK_LEFT | BUFFER_BIT_STENCIL | BUFFER_BIT_DEPTH);
@@ -439,8 +437,6 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
if (mask & bufBit) {
struct intel_renderbuffer *irbColor =
intel_renderbuffer(fb->Attachment[buf].Renderbuffer);
- GLuint color = (irbColor->region->cpp == 4)
- ? intel->ClearColor8888 : intel->ClearColor565;
ASSERT(irbColor);
@@ -457,7 +453,7 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
fb->_Xmax,
fb->_Ymin,
fb->_Ymax,
- 0, color,
+ 0, intel->ClearColor8888,
0, 0, 0, 0); /* texcoords */
mask &= ~bufBit;