summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-01-03 01:21:02 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-01-04 16:14:42 +0100
commit471025929c893d223668814ad0f8e2bee76aac63 (patch)
tree1bb87855b533197ea9cd60728fb934031b121b6e
parentc024c1d75fdce72fe2de2d6b987b796fc9561115 (diff)
nvc0: use mov instead of ld for scalar const loads
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_emit.c7
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 2f99d5a339f..db8055d91cd 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();