summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_state.c4
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 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);
}