Correct the ordering of the blend constant color.
authorEric Anholt <anholt@FreeBSD.org>
Fri, 28 Oct 2005 06:15:11 +0000 (06:15 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Fri, 28 Oct 2005 06:15:11 +0000 (06:15 +0000)
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_state.c

index cb2e4bb321848f730c64da50b6c73cb75dfc9594..96f4ff6afa74e385186de7cc06b4c731152b222e 100644 (file)
@@ -454,7 +454,7 @@ struct r300_hw_state {
        struct r300_state_atom unk4E00; /* (4E00) */
        struct r300_state_atom bld;     /* blending (4E04) */
        struct r300_state_atom cmk;     /* colormask (4E0C) */
-       struct r300_state_atom unk4E10; /* (4E10) */
+       struct r300_state_atom unk4E10; /* constant blend color + ??? (4E10) */
        struct r300_state_atom cb;      /* colorbuffer (4E28) */
        struct r300_state_atom unk4E50; /* (4E50) */
        struct r300_state_atom unk4E88; /* (4E88) */
index 90304a05fd39c087de630af287b8fc3a8f06d10d..6ab7d97faf67959bdb5efec0827cc1285a6a6b11 100644 (file)
@@ -118,13 +118,13 @@ static void r300BlendColor(GLcontext * ctx, const GLfloat cf[4])
 
        R300_STATECHANGE(rmesa, unk4E10);
 
-       /* Ordering might be wrong */
        CLAMPED_FLOAT_TO_UBYTE(color[0], cf[0]);
        CLAMPED_FLOAT_TO_UBYTE(color[1], cf[1]);
        CLAMPED_FLOAT_TO_UBYTE(color[2], cf[2]);
        CLAMPED_FLOAT_TO_UBYTE(color[3], cf[3]);
 
-       rmesa->hw.unk4E10.cmd[1]=r300PackColor(4, color[0], color[1], color[2], color[3]);
+       rmesa->hw.unk4E10.cmd[1] = r300PackColor(4, color[3], color[0],
+                                                color[1], color[2]);
 }
 
 /**
@@ -194,6 +194,7 @@ static int blend_factor(GLenum factor, GLboolean is_src)
                func = R200_BLEND_GL_ONE_MINUS_CONST_ALPHA;
                break;
        default:
+               fprintf(stderr, "unknown blend factor %x\n", factor);
                func = (is_src) ? R200_BLEND_GL_ONE : R200_BLEND_GL_ZERO;
        }
        return func;