diff options
author | Ilia Mirkin <[email protected]> | 2015-09-10 03:49:36 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-10 04:30:45 -0400 |
commit | 641eda0c792e10c2792730b1833353564479a557 (patch) | |
tree | 77771abaea37c1e4d12a2ff22bf67d3d3a97b19d /src/gallium/drivers/nouveau/codegen | |
parent | a072ef8748a65d286e9b542bb9ea6e020fdcc7f8 (diff) |
nv50/ir: r63 is only 0 if we are using less than 63 registers
It is advantageous to use r63 instead of r127 since r63 can fit into the
shorter encoding. However if we've RA'd over 63 registers, we must use
r127 as the replacement instead.
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "11.0" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp | 5 |
1 files changed, 4 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 bea293bac99..d87cdfff851 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,10 @@ NV50LegalizePostRA::visit(Function *fn) Program *prog = fn->getProgram(); r63 = new_LValue(fn, FILE_GPR); - r63->reg.data.id = 63; + if (prog->maxGPR < 63) + r63->reg.data.id = 63; + else + r63->reg.data.id = 127; // this is actually per-program, but we can do it all on visiting main() std::list<Instruction *> *outWrites = |