summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Gottschlag <[email protected]>2009-04-21 09:52:30 -0600
committerBrian Paul <[email protected]>2009-04-21 09:52:30 -0600
commitb8fff1f9f17a2488aa45e875104353814bf59da2 (patch)
treeed70baeb5d53b7213514eea0437256972da73556
parentdad1c1be18dc4e8e7f51cdb91652124e9427e644 (diff)
r300-gallium: Fix CS size mismatch
This fixes some warnings which appear because the driver assumes a wrong cs size (13 vs 16 register writes in some cases).
-rw-r--r--src/gallium/drivers/r300/r300_emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index a3d83376b66..417d5f6307d 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -340,7 +340,11 @@ void r300_emit_vertex_shader(struct r300_context* r300,
return;
}
- BEGIN_CS(13 + (vs->instruction_count * 4) + (constants->count * 4));
+ if (constants->count) {
+ BEGIN_CS(16 + (vs->instruction_count * 4) + (constants->count * 4));
+ } else {
+ BEGIN_CS(13 + (vs->instruction_count * 4) + (constants->count * 4));
+ }
OUT_CS_REG(R300_VAP_PVS_CODE_CNTL_0, R300_PVS_FIRST_INST(0) |
R300_PVS_LAST_INST(vs->instruction_count - 1));