From d105b3df14283a4dd80cecc1e6cab58432368ef6 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Thu, 28 Feb 2013 21:05:45 +0100 Subject: nvc0/ir: don't replace load from input in COMPUTE progs with VFETCH --- src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nvc0/codegen') diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp index aa4ff35d966..94d3cea0112 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp @@ -1489,8 +1489,13 @@ NVC0LoweringPass::visit(Instruction *i) return handleWRSV(i); case OP_LOAD: if (i->src(0).getFile() == FILE_SHADER_INPUT) { - i->op = OP_VFETCH; - assert(prog->getType() != Program::TYPE_FRAGMENT); + if (prog->getType() == Program::TYPE_COMPUTE) { + i->getSrc(0)->reg.file = FILE_MEMORY_CONST; + i->getSrc(0)->reg.fileIndex = 0; + } else { + i->op = OP_VFETCH; + assert(prog->getType() != Program::TYPE_FRAGMENT); // INTERP + } } break; case OP_ATOM: -- cgit v1.2.3