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:
parent
36ff09cdfe
commit
74e71cbfcb
|
@ -51,7 +51,6 @@ temp(struct nvfx_fpc *fpc)
|
||||||
|
|
||||||
if (idx >= fpc->max_temps) {
|
if (idx >= fpc->max_temps) {
|
||||||
NOUVEAU_ERR("out of temps!!\n");
|
NOUVEAU_ERR("out of temps!!\n");
|
||||||
assert(0);
|
|
||||||
return nvfx_reg(NVFXSR_TEMP, 0);
|
return nvfx_reg(NVFXSR_TEMP, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,8 @@ temp(struct nvfx_vpc *vpc)
|
||||||
{
|
{
|
||||||
int idx = ffs(~vpc->r_temps) - 1;
|
int idx = ffs(~vpc->r_temps) - 1;
|
||||||
|
|
||||||
if (idx < 0) {
|
if (idx < 0 || (!vpc->is_nv4x && idx >= 16)) {
|
||||||
NOUVEAU_ERR("out of temps!!\n");
|
NOUVEAU_ERR("out of temps!!\n");
|
||||||
assert(0);
|
|
||||||
return nvfx_reg(NVFXSR_TEMP, 0);
|
return nvfx_reg(NVFXSR_TEMP, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue