r300g: Independent blend enables only work on r500.
This commit is contained in:
@@ -152,7 +152,11 @@ static int r300_get_param(struct pipe_screen* pscreen, int param)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case PIPE_CAP_INDEP_BLEND_ENABLE:
|
case PIPE_CAP_INDEP_BLEND_ENABLE:
|
||||||
|
if (r300screen->caps->is_r500) {
|
||||||
return 1;
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
case PIPE_CAP_INDEP_BLEND_FUNC:
|
case PIPE_CAP_INDEP_BLEND_FUNC:
|
||||||
return 0;
|
return 0;
|
||||||
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
|
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
|
||||||
|
@@ -161,6 +161,7 @@ static boolean blend_discard_if_src_alpha_color_1(unsigned srcRGB, unsigned srcA
|
|||||||
static void* r300_create_blend_state(struct pipe_context* pipe,
|
static void* r300_create_blend_state(struct pipe_context* pipe,
|
||||||
const struct pipe_blend_state* state)
|
const struct pipe_blend_state* state)
|
||||||
{
|
{
|
||||||
|
struct r300_screen* r300screen = r300_screen(pipe->screen);
|
||||||
struct r300_blend_state* blend = CALLOC_STRUCT(r300_blend_state);
|
struct r300_blend_state* blend = CALLOC_STRUCT(r300_blend_state);
|
||||||
|
|
||||||
if (state->rt[0].blend_enable)
|
if (state->rt[0].blend_enable)
|
||||||
@@ -290,11 +291,17 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
|
|||||||
|
|
||||||
/* Color channel masks for all MRTs. */
|
/* Color channel masks for all MRTs. */
|
||||||
blend->color_channel_mask = state->rt[0].colormask;
|
blend->color_channel_mask = state->rt[0].colormask;
|
||||||
if (state->independent_blend_enable) {
|
if (r300screen->caps->is_r500 && state->independent_blend_enable) {
|
||||||
|
if (state->rt[1].blend_enable) {
|
||||||
blend->color_channel_mask |= (state->rt[1].colormask << 4);
|
blend->color_channel_mask |= (state->rt[1].colormask << 4);
|
||||||
|
}
|
||||||
|
if (state->rt[2].blend_enable) {
|
||||||
blend->color_channel_mask |= (state->rt[2].colormask << 8);
|
blend->color_channel_mask |= (state->rt[2].colormask << 8);
|
||||||
|
}
|
||||||
|
if (state->rt[3].blend_enable) {
|
||||||
blend->color_channel_mask |= (state->rt[3].colormask << 12);
|
blend->color_channel_mask |= (state->rt[3].colormask << 12);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (state->dither) {
|
if (state->dither) {
|
||||||
blend->dither = R300_RB3D_DITHER_CTL_DITHER_MODE_LUT |
|
blend->dither = R300_RB3D_DITHER_CTL_DITHER_MODE_LUT |
|
||||||
|
Reference in New Issue
Block a user