From 029b81742ad474245e18e0b629d669afe588111c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 21 Jan 2007 09:31:00 +1100 Subject: nouveau: kill off shader pass1. It sucks, and we have someone who can do a much better job than I can starting work on it soon. alloc_temp/free_temp is left in pass2 to workaround fragprog temps/outputs overlapping, but this all belongs in the optimiser. --- src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader_2.c') 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; -- cgit v1.2.3