Mesa (master): r600g: fix rendering, only enable target we write too

Jerome Glisse glisse at kemper.freedesktop.org
Fri Aug 6 14:24:02 PDT 2010


Module: Mesa
Branch: master
Commit: 32251c34f06ef91759fa75271ce724a06483cc42
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=32251c34f06ef91759fa75271ce724a06483cc42

Author: Jerome Glisse <jglisse at redhat.com>
Date:   Fri Aug  6 17:22:45 2010 -0400

r600g: fix rendering, only enable target we write too

Signed-off-by: Jerome Glisse <jglisse at redhat.com>

---

 src/gallium/drivers/r600/r600_state.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 223f2f3..ff62108 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);
 			}



More information about the mesa-commit mailing list