summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-04-05 23:14:33 +0200
committerChristoph Bumiller <[email protected]>2012-04-14 21:54:03 +0200
commit99319328d4c249090d3e4a387f6bdc00f711b688 (patch)
tree0c819c45a95eb69225fa3d1f2028e9a66f53a16d /src/gallium/drivers/nv50/codegen
parent12a2f5121d42f6f7cd94fe01f3cabe59280c62f8 (diff)
nv50/ir/tgsi: only export x-component of PSIZE
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
index 81d5d55f780..c419a7dca6e 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -946,6 +946,9 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
else
info->out[dst.getIndex(0)].mask |= dst.getMask();
+ if (info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_PSIZE)
+ info->out[dst.getIndex(0)].mask &= 1;
+
if (isEdgeFlagPassthrough(insn))
info->io.edgeFlagIn = insn.getSrc(0).getIndex(0);
} else
@@ -1393,7 +1396,8 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c,
mkOp2(OP_WRSV, TYPE_U32, NULL, dstToSym(dst, c), val);
} else
if (f == TGSI_FILE_OUTPUT && prog->getType() != Program::TYPE_FRAGMENT) {
- mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
+ if (ptr || (info->out[idx].mask & (1 << c)))
+ mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
} else
if (f == TGSI_FILE_TEMPORARY ||
f == TGSI_FILE_TEMPORARY_ARRAY ||