summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_cmdbuf.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-22 19:11:46 +1000
committerDave Airlie <airlied@redhat.com>2009-03-22 19:11:46 +1000
commitc607a664dd005c001afda1fff1a68d41925fa86e (patch)
tree2c782c69823205ac215687f0f74ab82f8b1275c8 /src/mesa/drivers/dri/r300/r300_cmdbuf.c
parent06cb6f7aa799e25b4a53f8c547a8f4ca909fe245 (diff)
radeon fbo: add draw offset calcs
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 2c6618fc60..d85f106c11 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -213,6 +213,7 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
BATCH_LOCALS(&r300->radeon);
struct radeon_renderbuffer *rrb;
uint32_t cbpitch;
+ uint32_t offset = r300->radeon.state.color.draw_offset;
rrb = radeon_get_colorbuffer(&r300->radeon);
if (!rrb || !rrb->bo) {
@@ -231,7 +232,7 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
BEGIN_BATCH_NO_AUTOSTATE(6);
OUT_BATCH_REGSEQ(R300_RB3D_COLOROFFSET0, 1);
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_RELOC(offset, rrb->bo, offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
OUT_BATCH_REGSEQ(R300_RB3D_COLORPITCH0, 1);
OUT_BATCH(cbpitch);
END_BATCH();