diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-12-03 06:32:10 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-12-03 06:32:10 +0100 |
commit | a60a5b850bde94c9c0c21f07800ed57436525998 (patch) | |
tree | 3a32ad6a20203b0d3c3a432d5443d5b76ca81801 /src/gallium/drivers/r300/r300_vs.c | |
parent | b088b255ecec68154d56db801151b5d7764b0837 (diff) | |
download | external_mesa3d-a60a5b850bde94c9c0c21f07800ed57436525998.zip external_mesa3d-a60a5b850bde94c9c0c21f07800ed57436525998.tar.gz external_mesa3d-a60a5b850bde94c9c0c21f07800ed57436525998.tar.bz2 |
r300g: do not remove unused constants if we are not near the limit
Diffstat (limited to 'src/gallium/drivers/r300/r300_vs.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_vs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index 6569655..78021e2 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -213,7 +213,6 @@ void r300_translate_vertex_shader(struct r300_context *r300, compiler.Base.max_temp_regs = 32; compiler.Base.max_constants = 256; compiler.Base.max_alu_insts = r300->screen->caps.is_r500 ? 1024 : 256; - compiler.Base.remove_unused_constants = TRUE; if (compiler.Base.Debug & RC_DBG_LOG) { DBG(r300, DBG_VP, "r300: Initial vertex program\n"); @@ -227,6 +226,10 @@ void r300_translate_vertex_shader(struct r300_context *r300, r300_tgsi_to_rc(&ttr, vs->state.tokens); + if (compiler.Base.Program.Constants.Count > 200) { + compiler.Base.remove_unused_constants = TRUE; + } + compiler.RequiredOutputs = ~(~0 << (vs->info.num_outputs + 1)); compiler.SetHwInputOutput = &set_vertex_inputs_outputs; |