diff options
author | Christoph Bumiller <[email protected]> | 2013-04-06 14:52:05 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-04-12 13:02:18 +0200 |
commit | 4da54c91d24da891c56957f29274e7821c8254f6 (patch) | |
tree | 8bd4fa434f7494a3bc9049d7304f49bb8dd7f264 /src/gallium/drivers/nvc0/codegen | |
parent | 71c1c8a9b89ca1ecca1857c53cd8c648c9c9a871 (diff) |
nvc0: implement multisample textures
Diffstat (limited to 'src/gallium/drivers/nvc0/codegen')
-rw-r--r-- | src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp | 5 |
1 files changed, 3 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 c459d60759b..4d1d37281bc 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp @@ -662,6 +662,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i) { const int dim = i->tex.target.getDim() + i->tex.target.isCube(); const int arg = i->tex.target.getArgCount(); + const int lyr = arg - (i->tex.target.isMS() ? 2 : 1); if (prog->getTarget()->getChipset() >= NVISA_GK104_CHIPSET) { if (i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) { @@ -683,7 +684,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i) } if (i->tex.target.isArray()) { LValue *layer = new_LValue(func, FILE_GPR); - Value *src = i->getSrc(arg - 1); + Value *src = i->getSrc(lyr); const int sat = (i->op == OP_TXF) ? 1 : 0; DataType sTy = (i->op == OP_TXF) ? TYPE_U32 : TYPE_F32; bld.mkCvt(OP_CVT, TYPE_U16, layer, sTy, src)->saturate = sat; @@ -696,7 +697,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i) if (dim != arg || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) { LValue *src = new_LValue(func, FILE_GPR); // 0xttxsaaaa - Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(arg - 1) : NULL; + Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL; for (int s = dim; s >= 1; --s) i->setSrc(s, i->getSrc(s - 1)); i->setSrc(0, arrayIndex); |