r300/compiler: fix the instruction limit in vertex shaders
authorMarek Olšák <maraeo@gmail.com>
Sat, 4 Sep 2010 22:43:34 +0000 (00:43 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 4 Sep 2010 22:44:52 +0000 (00:44 +0200)
Broken with commit d774b0c710bb7d833d17bd12f5151a0176baad96.

Reported by Chris Rankin.

src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c

index 4076825b48346cd03cb1a0caa907acb8c4d00ad8..08785716db5614e89518c04cf77685efe4f1c3cf 100644 (file)
@@ -503,7 +503,7 @@ static void translate_vertex_program(struct radeon_compiler *c, void *user)
                        }
                }
 
-               if (compiler->code->length >= c->max_alu_insts) {
+               if (compiler->code->length >= c->max_alu_insts * 4) {
                        rc_error(&compiler->Base, "Vertex program has too many instructions\n");
                        return;
                }