Mesa (master): r600g: fix lockups with and enable dual source blending on evergreen

Marek Olšák mareko at kemper.freedesktop.org
Tue Jul 17 19:56:35 UTC 2012


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul 15 03:38:42 2012 +0200

r600g: fix lockups with and enable dual source blending on evergreen

GL_ARB_blend_func_extended is now enabled on all chipsets.

---

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

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 8f037e2..5486a96 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1652,7 +1652,9 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
 	for (i = 0; i < state->nr_cbufs; i++) {
 		evergreen_cb(rctx, rstate, state, i);
 	}
-
+	/* CB_COLOR1_INFO is already initialized for possible dual-src blending */
+	if (i == 1)
+		i++;
 	for (; i < 8 ; i++) {
 		r600_pipe_state_add_reg(rstate, R_028C70_CB_COLOR0_INFO + i * 0x3C, 0);
 	}
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 48e94f5..2a10262 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -384,6 +384,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_USER_CONSTANT_BUFFERS:
 	case PIPE_CAP_COMPUTE:
 	case PIPE_CAP_START_INSTANCE:
+	case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
 		return 1;
 
 	case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
@@ -451,9 +452,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
 	case PIPE_CAP_MAX_TEXEL_OFFSET:
 		return 7;
-
-	case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
-		return family < CHIP_CEDAR ?  1 : 0;
 	}
 	return 0;
 }




More information about the mesa-commit mailing list