mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
Correct the ordering of the blend constant color.
This commit is contained in:
parent
4b9f1308e5
commit
c57be49099
2 changed files with 4 additions and 3 deletions
|
|
@ -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) */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue