Mesa (radeon-rewrite): radeon: r100 clean up CS packet size calc
Dave Airlie
airlied at kemper.freedesktop.org
Wed Mar 4 12:26:33 UTC 2009
Module: Mesa
Branch: radeon-rewrite
Commit: 31f129880719f75c491fa2ad269055fbc2fb9b95
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31f129880719f75c491fa2ad269055fbc2fb9b95
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Mar 4 22:26:44 2009 +1000
radeon: r100 clean up CS packet size calc
---
src/mesa/drivers/dri/radeon/radeon_state_init.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index bc4c221..8b6caf1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -426,10 +426,11 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
}
/* output the first 7 bytes of context */
+ dwords = 10;
if (drb)
- dwords += 2;
+ dwords += 6;
if (rrb)
- dwords += 2;
+ dwords += 6;
BEGIN_BATCH_NO_AUTOSTATE(dwords);
/* In the CS case we need to split this up */
@@ -453,9 +454,7 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLOROFFSET, 0));
OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- }
- if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLORPITCH, 0));
OUT_BATCH(cbpitch);
}
More information about the mesa-commit
mailing list