From 9ae7d8bb799a8c5008c7c4824d414ca856e13ba5 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Thu, 25 Oct 2012 14:32:29 +0200 Subject: [PATCH] nv50/ir: restore use of long immediate encodings NOTE: This is a candidate for the 9.0 branch. --- src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp | 3 +++ src/gallium/drivers/nv50/codegen/nv50_ir_target_nv50.cpp | 6 ++++++ 2 files changed, 9 insertions(+) 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 bc4657c13b6..90ec9d0c74b 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 8b11c6a2fdd..6b4175edfcf 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)) -- 2.30.2