Mesa (nvc0): nvc0: use mov instead of ld for scalar const loads
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Tue Jan 4 15:19:46 UTC 2011
Module: Mesa
Branch: nvc0
Commit: 471025929c893d223668814ad0f8e2bee76aac63
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=471025929c893d223668814ad0f8e2bee76aac63
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Mon Jan 3 01:21:02 2011 +0100
nvc0: use mov instead of ld for scalar const loads
---
src/gallium/drivers/nvc0/nvc0_pc_emit.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_emit.c b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
index 2f99d5a..db8055d 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc_emit.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
@@ -812,7 +812,12 @@ emit_ld(struct nv_pc *pc, struct nv_instruction *i)
{
if (SFILE(i, 0) >= NV_FILE_MEM_C(0) &&
SFILE(i, 0) <= NV_FILE_MEM_C(15)) {
- emit_ld_const(pc, i);
+ if (SSIZE(i, 0) == 4 && i->indirect < 0) {
+ i->lanes = 0xf;
+ emit_mov(pc, i);
+ } else {
+ emit_ld_const(pc, i);
+ }
} else {
NOUVEAU_ERR("emit_ld(%u): not handled yet\n", SFILE(i, 0));
abort();
More information about the mesa-commit
mailing list