From: Jerome Glisse Date: Fri, 6 Aug 2010 21:22:45 +0000 (-0400) Subject: r600g: fix rendering, only enable target we write too X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32251c34f06ef91759fa75271ce724a06483cc42;p=mesa.git r600g: fix rendering, only enable target we write too Signed-off-by: Jerome Glisse --- diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 223f2f39008..ff621084d47 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1224,14 +1224,14 @@ static struct radeon_state *r600_cb_cntl(struct r600_context *rctx) } if (pbs->independent_blend_enable) { - for (i = 0; i < 8; i++) { + for (i = 0; i < nr_cbufs; i++) { if (pbs->rt[i].blend_enable) { color_control |= S_028808_TARGET_BLEND_ENABLE(1 << i); } target_mask |= (pbs->rt[i].colormask << (4 * i)); } } else { - for (i = 0; i < 8; i++) { + for (i = 0; i < nr_cbufs; i++) { if (pbs->rt[0].blend_enable) { color_control |= S_028808_TARGET_BLEND_ENABLE(1 << i); }