summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_render.c
diff options
context:
space:
mode:
authorVladimir Dergachev <[email protected]>2005-01-11 05:59:07 +0000
committerVladimir Dergachev <[email protected]>2005-01-11 05:59:07 +0000
commitd5432ac584f922527922c6813f39f6caa00b9037 (patch)
treebe00b8afc16b8d73405fe5981b1f7a1bfd0b6bc2 /src/mesa/drivers/dri/r300/r300_render.c
parent864137984a80b2ad2c26d54f9281546b4b43c6ae (diff)
Switch back to using immediate mode code - use of AGP space is interfering with texture management.
Ideally, r300_render is ready to be rewritten to use standard Mesa include files, but I don't think I'll get around to it.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_render.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 4e33781fc4f..249da09f27e 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -207,6 +207,11 @@ static void r300_render_immediate_primitive(r300ContextPtr rmesa,
if(type<0)return;
+ /* A packet cannot have more than 16383 data words.. */
+ if(((end-start)*8+4*rmesa->state.texture.tc_count)>16380){
+ fprintf(stderr, "%s:%s: Too many vertices to paint. Fix me !\n");
+ return;
+ }
start_immediate_packet(end-start, type, 8+4*rmesa->state.texture.tc_count);
@@ -484,7 +489,7 @@ static GLboolean r300_run_render(GLcontext *ctx,
#if 1
- #if 0
+ #if 1
return r300_run_immediate_render(ctx, stage);
#else
return r300_run_vb_render(ctx, stage);
@@ -584,7 +589,7 @@ static void r300_check_render(GLcontext *ctx, struct tnl_pipeline_stage *stage)
FALLBACK_IF(ctx->Multisample.Enabled); // GL_MULTISAMPLE_ARB
/* One step at a time - let one texture pass.. */
- for (i = 1; i < ctx->Const.MaxTextureUnits; i++)
+ for (i = 2; i < ctx->Const.MaxTextureUnits; i++)
FALLBACK_IF(ctx->Texture.Unit[i].Enabled);