nv30: don't assert when running out of registers

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>
This commit is contained in:
Ilia Mirkin 2016-05-22 18:21:55 -04:00
parent 36ff09cdfe
commit 74e71cbfcb
2 changed files with 1 additions and 3 deletions

View File

@ -51,7 +51,6 @@ temp(struct nvfx_fpc *fpc)
if (idx >= fpc->max_temps) {
NOUVEAU_ERR("out of temps!!\n");
assert(0);
return nvfx_reg(NVFXSR_TEMP, 0);
}

View File

@ -69,9 +69,8 @@ temp(struct nvfx_vpc *vpc)
{
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);
}