From: Christoph Bumiller Date: Thu, 28 Feb 2013 20:05:45 +0000 (+0100) Subject: nvc0/ir: don't replace load from input in COMPUTE progs with VFETCH X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d105b3df14283a4dd80cecc1e6cab58432368ef6;p=mesa.git nvc0/ir: don't replace load from input in COMPUTE progs with VFETCH --- 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: