summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_cmdbuf.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-01-31 01:59:57 +1000
committerDave Airlie <airlied@redhat.com>2009-01-31 01:59:57 +1000
commite45213d89bf26c68c9f4c9074eaec9ab3311de7d (patch)
treef4ca6a1fdec732dc2d5faba6d700ea54b14ff995 /src/mesa/drivers/dri/r300/r300_cmdbuf.c
parent08bb7eedfbba839676ab63fb20dd22e4f27722cb (diff)
r200/r300: add aperture space checks
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 04bb76bb30..9098931602 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -296,12 +296,8 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
BATCH_LOCALS(&r300->radeon);
struct radeon_renderbuffer *rrb;
uint32_t cbpitch;
- GLframebuffer *fb = r300->radeon.dri.drawable->driverPrivate;
- rrb = r300->radeon.state.color.rrb;
- if (r300->radeon.radeonScreen->driScreen->dri2.enabled) {
- rrb = (struct radeon_renderbuffer *)fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
- }
+ rrb = radeon_get_colorbuffer(&r300->radeon);
if (!rrb || !rrb->bo) {
fprintf(stderr, "no rrb\n");
return;
@@ -331,7 +327,7 @@ static void emit_zb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
struct radeon_renderbuffer *rrb;
uint32_t zbpitch;
- rrb = r300->radeon.state.depth.rrb;
+ rrb = radeon_get_depthbuffer(&r300->radeon);
if (!rrb)
return;