summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c16
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h10
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c4
4 files changed, 19 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 779307f5eb..bbc7157595 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -274,23 +274,29 @@ static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
int i;
for(i = 0; i < numtmus; ++i) {
- BEGIN_BATCH_NO_AUTOSTATE(2);
- OUT_BATCH_REGSEQ(R300_TX_OFFSET_0 + (i * 4), 1);
radeonTexObj *t = r300->hw.textures[i];
if (t && !t->image_override) {
+ BEGIN_BATCH_NO_AUTOSTATE(4);
+ OUT_BATCH_REGSEQ(R300_TX_OFFSET_0 + (i * 4), 1);
OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
RADEON_GEM_DOMAIN_VRAM, 0, 0);
+ END_BATCH();
} else if (!t) {
- OUT_BATCH(r300->radeon.radeonScreen->texOffset[0]);
+ assert(0);
} else {
if (t->bo) {
+ BEGIN_BATCH_NO_AUTOSTATE(4);
+ OUT_BATCH_REGSEQ(R300_TX_OFFSET_0 + (i * 4), 1);
OUT_BATCH_RELOC(t->tile_bits, t->bo, 0,
RADEON_GEM_DOMAIN_VRAM, 0, 0);
- } else {
+ END_BATCH();
+ } else if (!r300->radeon.radeonScreen->kernel_mm) {
+ BEGIN_BATCH_NO_AUTOSTATE(2);
+ OUT_BATCH_REGSEQ(R300_TX_OFFSET_0 + (i * 4), 1);
OUT_BATCH(t->override_offset);
+ END_BATCH();
}
}
- END_BATCH();
}
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index a8592440da..4a18397aa8 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -361,7 +361,7 @@ void r300EmitCacheFlush(r300ContextPtr rmesa)
{
BATCH_LOCALS(&rmesa->radeon);
- BEGIN_BATCH(4);
+ BEGIN_BATCH_NO_AUTOSTATE(4);
OUT_BATCH_REGVAL(R300_RB3D_DSTCACHE_CTLSTAT,
R300_RB3D_DSTCACHE_CTLSTAT_DC_FREE_FREE_3D_TAGS |
R300_RB3D_DSTCACHE_CTLSTAT_DC_FLUSH_FLUSH_DIRTY_3D);
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index 94b0a7ebe8..290bd614c5 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -151,9 +151,9 @@ void static INLINE end_3d(r300ContextPtr rmesa)
BATCH_LOCALS(&rmesa->radeon);
if (!rmesa->radeon.radeonScreen->kernel_mm) {
- BEGIN_BATCH(1);
- OUT_BATCH(cmdpacify(rmesa->radeon.radeonScreen));
- END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(1);
+ OUT_BATCH(cmdpacify(rmesa->radeon.radeonScreen));
+ END_BATCH();
}
}
@@ -162,8 +162,8 @@ void static INLINE cp_delay(r300ContextPtr rmesa, unsigned short count)
BATCH_LOCALS(&rmesa->radeon);
if (!rmesa->radeon.radeonScreen->kernel_mm) {
- BEGIN_BATCH(1);
- OUT_BATCH(cmdcpdelay(rmesa->radeon.radeonScreen, count));
+ BEGIN_BATCH_NO_AUTOSTATE(1);
+ OUT_BATCH(cmdcpdelay(rmesa->radeon.radeonScreen, count));
END_BATCH();
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 7af9691cde..23d068c339 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -190,7 +190,7 @@ static void r300FireEB(r300ContextPtr rmesa, int vertex_count, int type)
BATCH_LOCALS(&rmesa->radeon);
if (vertex_count > 0) {
- BEGIN_BATCH(8);
+ BEGIN_BATCH(10);
OUT_BATCH_PACKET3(R300_PACKET3_3D_DRAW_INDX_2, 0);
OUT_BATCH(R300_VAP_VF_CNTL__PRIM_WALK_INDICES |
((vertex_count + 0) << 16) |
@@ -231,7 +231,7 @@ static void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset)
if (!rmesa->radeon.radeonScreen->kernel_mm) {
- BEGIN_BATCH(sz+2);
+ BEGIN_BATCH(sz+2+(nr * 2));
OUT_BATCH_PACKET3(R300_PACKET3_3D_LOAD_VBPNTR, sz - 1);
OUT_BATCH(nr);