nvc0/ir: allow 64-bit constant loads on nve4
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 29 May 2012 15:00:10 +0000 (17:00 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 29 May 2012 15:00:10 +0000 (17:00 +0200)
Looks like only 128-bit access doesn't work.

src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp

index cfbe3ecf784fe8519151a43f459422a460ba2422..6f34b1aeb3cf87b3193fe89931e9fe237017803c 100644 (file)
@@ -1939,6 +1939,8 @@ FlatteningPass::visit(BasicBlock *bb)
           !isTextureOp(insn->op) && // probably just nve4
           insn->op != OP_LINTERP && // probably just nve4
           insn->op != OP_PINTERP && // probably just nve4
+          ((insn->op != OP_LOAD && insn->op != OP_STORE) ||
+           typeSizeof(insn->dType) <= 4) &&
           !insn->isNop()) {
          insn->join = 1;
          bb->remove(bb->getExit());
index e4b9dc18311cc2118b341f706b6401680820fa44..0674f12704d7fff73237e31b5c827e5409c8c637 100644 (file)
@@ -448,7 +448,7 @@ TargetNVC0::isAccessSupported(DataFile file, DataType ty) const
    if (ty == TYPE_NONE)
       return false;
    if (file == FILE_MEMORY_CONST && getChipset() >= 0xe0) // wrong encoding ?
-      return typeSizeof(ty) <= 4;
+      return typeSizeof(ty) <= 8;
    if (ty == TYPE_B96)
       return (file == FILE_SHADER_INPUT) || (file == FILE_SHADER_OUTPUT);
    return true;