From 3ba562e62af0db0318ecebb356d5a3c514f4d1c8 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 1 Sep 2010 04:59:22 +0200 Subject: r300/compiler: add new compiler parameter max_constants --- src/mesa/drivers/dri/r300/compiler/radeon_compiler.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_compiler.c') diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c index 4aff69c8683..b410b2daf42 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c @@ -374,3 +374,12 @@ void rc_run_compiler(struct radeon_compiler *c, struct radeon_compiler_pass *lis } } } + +void rc_validate_final_shader(struct radeon_compiler *c, void *user) +{ + /* Check the number of constants. */ + if (c->Program.Constants.Count > c->max_constants) { + rc_error(c, "Too many constants. Max: 256, Got: %i\n", + c->Program.Constants.Count); + } +} -- cgit v1.2.3