This happens with dEQP tests. The code doesn't at all protect against
this condition, so while unhandled, this is an expected situation.
Also avoid using more than the first 16 registers for nv3x vertex
programs.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
if (idx >= fpc->max_temps) {
NOUVEAU_ERR("out of temps!!\n");
- assert(0);
return nvfx_reg(NVFXSR_TEMP, 0);
}
{
int idx = ffs(~vpc->r_temps) - 1;
- if (idx < 0) {
+ if (idx < 0 || (!vpc->is_nv4x && idx >= 16)) {
NOUVEAU_ERR("out of temps!!\n");
- assert(0);
return nvfx_reg(NVFXSR_TEMP, 0);
}