From 89faa648a585a435d8a2ca6d3759891606d36a84 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 5 Feb 2008 15:17:58 +0800 Subject: [PATCH] i965: adjust the byte order of clear color. fix #14165 --- src/mesa/drivers/dri/i965/brw_metaops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index 005489689f1..56185dbf716 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, -- 2.30.2