r600g: send correct surface base update for multi-cbufs
authorDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 00:15:26 +0000 (10:15 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 00:15:26 +0000 (10:15 +1000)
src/gallium/winsys/r600/drm/r600_state.c

index b04885a85f736f8f045c5745db0478f384b7e3f0..57fc12ccf1a363348b84082b228d5aa01b8599c6 100644 (file)
@@ -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;
 }