From: Ilia Mirkin Date: Sun, 22 May 2016 22:21:55 +0000 (-0400) Subject: nv30: don't assert when running out of registers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=74e71cbfcb2950d0aa59e5b05ab817e93dfad4ee;p=mesa.git 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 --- diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c index 89ac208c155..dab42e17cfe 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c @@ -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); } diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c index 7ce51a118c8..b39c4b74eca 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c @@ -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); }