summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_vertprog.c
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2009-08-20 23:02:37 +0300
committerPauli Nieminen <[email protected]>2009-08-21 19:12:30 +0300
commit66513ba884350c45226c3820d43bfa0b834b93c1 (patch)
tree36f5436abb4f2138c21910cf46d82a77afabe49c /src/mesa/drivers/dri/r300/r300_vertprog.c
parentd1a0ece9077b3de49c293a04c220b995424cef28 (diff)
r300: Clean emit code.
This fixes some state atom check functions from returing wrong emit size. There is emit code cleanup so that emit function selection is done in init time instead of runtime. Signed-off-by: Pauli Nieminen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index c5edbd0052b..862f2120850 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -298,6 +298,8 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
assert((code->length > 0) && (code->length % 4 == 0));
+ R300_STATECHANGE( r300, vap_flush );
+
switch ((dest >> 8) & 0xf) {
case 0:
R300_STATECHANGE(r300, vpi);
@@ -335,6 +337,7 @@ void r300SetupVertexProgram(r300ContextPtr rmesa)
((drm_r300_cmd_header_t *) rmesa->hw.vpi.cmd)->vpu.count = 0;
((drm_r300_cmd_header_t *) rmesa->hw.vps.cmd)->vpu.count = 0;
+ R300_STATECHANGE(rmesa, vap_flush);
R300_STATECHANGE(rmesa, vpp);
param_count = r300VertexProgUpdateParams(ctx, prog, (float *)&rmesa->hw.vpp.cmd[R300_VPP_PARAM_0]);
bump_vpu_count(rmesa->hw.vpp.cmd, param_count);