diff options
author | Ben Skeggs <darktama@iinet.net.au> | 2007-01-21 09:31:00 +1100 |
---|---|---|
committer | Ben Skeggs <darktama@iinet.net.au> | 2007-01-21 09:31:00 +1100 |
commit | 029b81742ad474245e18e0b629d669afe588111c (patch) | |
tree | 2c3ec5dcd93234665077d2af024e6f392e249892 /src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | |
parent | ee3d0617f923cd4bcc8bfdc1ce878648480c2679 (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader_2.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 16 |
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; |