Mesa (master): nvc0/ir: allow 64-bit constant loads on nve4
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Tue May 29 15:02:07 UTC 2012
Module: Mesa
Branch: master
Commit: 79eed0d2246e8e7be505784af0078507c712a02c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=79eed0d2246e8e7be505784af0078507c712a02c
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Tue May 29 17:00:10 2012 +0200
nvc0/ir: allow 64-bit constant loads on nve4
Looks like only 128-bit access doesn't work.
---
.../drivers/nv50/codegen/nv50_ir_peephole.cpp | 2 ++
.../drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index cfbe3ec..6f34b1a 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -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());
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp
index e4b9dc1..0674f12 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp
@@ -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;
More information about the mesa-commit
mailing list