diff options
author | Christoph Bumiller <[email protected]> | 2013-02-28 21:05:45 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-03-12 12:55:35 +0100 |
commit | d105b3df14283a4dd80cecc1e6cab58432368ef6 (patch) | |
tree | 0454647c2be3f5f0cd895c6cfc2551c616d09895 /src/gallium/drivers/nvc0/codegen | |
parent | 4506ed28de7f9d76bbc99c0758a7891b84528729 (diff) |
nvc0/ir: don't replace load from input in COMPUTE progs with VFETCH
Diffstat (limited to 'src/gallium/drivers/nvc0/codegen')
-rw-r--r-- | src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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: |