diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2015-12-08 21:01:15 -0500 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-12-12 19:39:02 +0000 |
commit | 3c9e76fc24189e1af3c43e913610a78d280bbbd9 (patch) | |
tree | bbf03edc7112d2e91c6744b7d30d10200fd391a4 /src/gallium/drivers/nouveau/codegen | |
parent | 67b1e7b94739d7a48a1256853862f97d8a9a711e (diff) |
nv50/ir: fix cutoff for using r63 vs r127 when replacing zero
The only effect here is a space savings - 822 programs in shader-db
affected with the following overall change:
total bytes used in shared programs : 44154976 -> 44139880 (-0.03%)
Fixes: 641eda0c (nv50/ir: r63 is only 0 if we are using less than 63 registers)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f920f8eb026d39c0adb547a90399e76b8351fec6)
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp index 397c5a952e1..f9c7f3a91f0 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp @@ -202,7 +202,8 @@ NV50LegalizePostRA::visit(Function *fn) Program *prog = fn->getProgram(); r63 = new_LValue(fn, FILE_GPR); - if (prog->maxGPR < 63) + // GPR units on nv50 are in half-regs + if (prog->maxGPR < 126) r63->reg.data.id = 63; else r63->reg.data.id = 127; |