Mesa (master): r600g: send correct surface base update for multi-cbufs

Dave Airlie airlied at kemper.freedesktop.org
Sun Sep 19 17:37:23 PDT 2010


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Sep 20 10:15:26 2010 +1000

r600g: send correct surface base update for multi-cbufs

---

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

diff --git a/src/gallium/winsys/r600/drm/r600_state.c b/src/gallium/winsys/r600/drm/r600_state.c
index b04885a..57fc12c 100644
--- a/src/gallium/winsys/r600/drm/r600_state.c
+++ b/src/gallium/winsys/r600/drm/r600_state.c
@@ -335,12 +335,14 @@ static void r600_state_pm4_with_flush(struct radeon_state *state, u32 flags, int
 static int r600_state_pm4_cb0(struct radeon_state *state)
 {
 	int r;
-
+	uint32_t sbu;
 	r = r600_state_pm4_generic(state);
 	if (r)
 		return r;
+
+	sbu = (2 << (state->stype->stype - R600_STATE_CB0));
 	state->pm4[state->cpm4++] = PKT3(PKT3_SURFACE_BASE_UPDATE, 0);
-	state->pm4[state->cpm4++] = 0x00000002;
+	state->pm4[state->cpm4++] = sbu;
 	return 0;
 }
 



More information about the mesa-commit mailing list