Mesa (master): nv50/ir: restore use of long immediate encodings
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Sun Oct 28 12:56:50 UTC 2012
Module: Mesa
Branch: master
Commit: 9ae7d8bb799a8c5008c7c4824d414ca856e13ba5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ae7d8bb799a8c5008c7c4824d414ca856e13ba5
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Thu Oct 25 14:32:29 2012 +0200
nv50/ir: restore use of long immediate encodings
NOTE: This is a candidate for the 9.0 branch.
---
.../drivers/nv50/codegen/nv50_ir_emit_nv50.cpp | 3 +++
.../drivers/nv50/codegen/nv50_ir_target_nv50.cpp | 6 ++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
index bc4657c..90ec9d0 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
@@ -1284,6 +1284,9 @@ CodeEmitterNV50::emitLogicOp(const Instruction *i)
assert(i->op == OP_AND);
break;
}
+ if (i->src(0).mod & Modifier(NV50_IR_MOD_NOT))
+ code[0] |= 1 << 22;
+
emitForm_IMM(i);
} else {
switch (i->op) {
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_target_nv50.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_target_nv50.cpp
index 8b11c6a..6b4175e 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_target_nv50.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_target_nv50.cpp
@@ -323,6 +323,12 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
ldSize = typeSizeof(ld->dType);
}
+ if (sf == FILE_IMMEDIATE)
+ return true;
+
+
+ // Check if memory access is encodable:
+
if (ldSize < 4 && sf == FILE_SHADER_INPUT) // no < 4-byte aligned a[] access
return false;
if (ld->getSrc(0)->reg.data.offset > (int32_t)(127 * ldSize))
More information about the mesa-commit
mailing list