summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-02-16 03:55:16 -0800
committerCorbin Simpson <[email protected]>2009-02-16 04:12:42 -0800
commitf211da4c67fbe0e67475efcd9535b9cf9e5ae467 (patch)
tree38315f992a8cc2a76b46436de64727cc60d55c31 /src
parent1bb2fb498ee65ba29aa4098983116be3d81cc2da (diff)
r300-gallium: Fix BEGIN_CS and END_CS counting and mismatch.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c3
-rw-r--r--src/gallium/drivers/r300/r300_surface.c2
-rw-r--r--src/gallium/drivers/r300/r300_swtcl_emit.c5
3 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 32c9681d2b7..a2819294a4f 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -194,7 +194,7 @@ void r300_emit_rs_state(struct r300_context* r300, struct r300_rs_state* rs)
struct r300_screen* r300screen =
(struct r300_screen*)r300->context.screen;
CS_LOCALS(r300);
- BEGIN_CS(14);
+ BEGIN_CS(13);
OUT_CS_REG(R300_VAP_CNTL_STATUS, rs->vap_control_status);
OUT_CS_REG_SEQ(R300_SU_POLY_OFFSET_FRONT_SCALE, 6);
OUT_CS(rs->depth_scale_front);
@@ -216,6 +216,7 @@ void r300_emit_scissor_state(struct r300_context* r300,
OUT_CS_REG_SEQ(R300_SC_SCISSORS_TL, 2);
OUT_CS(scissor->scissor_top_left);
OUT_CS(scissor->scissor_bottom_right);
+ END_CS;
}
/* Emit all dirty state. */
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index 0a4710151a0..b2c4f4251d9 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -54,7 +54,7 @@ static void r300_surface_fill(struct pipe_context* pipe,
return;
}
- BEGIN_CS(161 + (caps->is_r500 ? 22 : 14) + (caps->has_tcl ? 4 : 2));
+ BEGIN_CS(163 + (caps->is_r500 ? 22 : 14) + (caps->has_tcl ? 4 : 2));
/* Flush PVS. */
OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0);
diff --git a/src/gallium/drivers/r300/r300_swtcl_emit.c b/src/gallium/drivers/r300/r300_swtcl_emit.c
index ca078d63e0e..76ef48962b9 100644
--- a/src/gallium/drivers/r300/r300_swtcl_emit.c
+++ b/src/gallium/drivers/r300/r300_swtcl_emit.c
@@ -48,8 +48,6 @@ static INLINE void r300_emit_vertex(struct r300_context* r300,
CS_LOCALS(r300);
uint i, j;
- BEGIN_CS(vinfo->size);
-
for (i = 0; i < vinfo->num_attribs; i++) {
j = vinfo->attrib[i].src_index;
switch (vinfo->attrib[i].emit) {
@@ -77,8 +75,6 @@ static INLINE void r300_emit_vertex(struct r300_context* r300,
break;
}
}
-
- END_CS;
}
static INLINE void r300_emit_prim(struct draw_stage* draw,
@@ -96,6 +92,7 @@ static INLINE void r300_emit_prim(struct draw_stage* draw,
OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2);
OUT_CS(r300->vertex_info.hwfmt[0]);
OUT_CS(r300->vertex_info.hwfmt[1]);
+ END_CS;
BEGIN_CS(2 + (count * r300->vertex_info.size) + 2);
OUT_CS(CP_PACKET3(R200_3D_DRAW_IMMD_2, count));