summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-02-05 15:17:58 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-02-05 15:17:58 +0800
commit89faa648a585a435d8a2ca6d3759891606d36a84 (patch)
treee38485d9b7925baef927934f3bf0f74fa827ca58
parentfd776e10b327b6a49b76c5082e4cc48059c6ad2e (diff)
i965: adjust the byte order of clear color. fix #14165
-rw-r--r--src/mesa/drivers/dri/i965/brw_metaops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c
index 005489689f..56185dbf71 100644
--- a/src/mesa/drivers/dri/i965/brw_metaops.c
+++ b/src/mesa/drivers/dri/i965/brw_metaops.c
@@ -419,7 +419,8 @@ static void meta_draw_quad(struct intel_context *intel,
brw->metaops.vbo);
/* Convert incoming ARGB to required RGBA */
- color = (color >> 24) | (color << 8);
+ /* Note this color is stored as GL_UNSIGNED_BYTE */
+ color = (color & 0xff00ff00) | (((color >> 16) | (color << 16)) & 0xff00ff);
ctx->Driver.BufferSubData(ctx,
GL_ARRAY_BUFFER_ARB,