summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader_2.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_shader_2.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
index 2177413b66..0476b05f58 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
@@ -68,29 +68,15 @@ pass2_alloc_hw_temp(nvsPtr nvs)
return -1;
}
-static void
-pass2_free_hw_temp(nvsPtr nvs, int reg)
-{
- struct pass2_rec *rec = nvs->pass_rec;
- rec->hw_temps[reg] = 0;
-}
-
static nvsRegister
pass2_mangle_reg(nvsPtr nvs, nvsInstruction *inst, nvsRegister reg)
{
struct pass2_rec *rec = nvs->pass_rec;
if (reg.file == NVS_FILE_TEMP) {
- int hwidx;
-
if (rec->temps[reg.index] == -1)
rec->temps[reg.index] = pass2_alloc_hw_temp(nvs);
- hwidx = rec->temps[reg.index];
-
- if (nvs->temps[reg.index].last_use <= inst->header.position)
- pass2_free_hw_temp(nvs, hwidx);
-
- reg.index = hwidx;
+ reg.index = rec->temps[reg.index];
}
return reg;