compiler.Base.max_temp_regs = compiler.Base.is_r500 ? 128 : 32;
compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32;
compiler.Base.max_alu_insts = compiler.Base.is_r500 ? 512 : 64;
- compiler.Base.remove_unused_constants = TRUE;
compiler.AllocateHwInputs = &allocate_hardware_inputs;
compiler.UserData = &shader->inputs;
r300_tgsi_to_rc(&ttr, tokens);
+ if (!r300->screen->caps.is_r500 ||
+ compiler.Base.Program.Constants.Count > 200) {
+ compiler.Base.remove_unused_constants = TRUE;
+ }
+
/**
* Transform the program to support WPOS.
*
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");
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;