summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-03-15 23:39:01 +0100
committerChristoph Bumiller <[email protected]>2013-03-20 12:25:21 +0100
commit529dbbfcf7a674f2d82eed5e88ce92615721d5f2 (patch)
treec1d6b2f2255392e9cd1909bee38d2d4d579bf689 /src/gallium/drivers/nv50/codegen
parent8acaf862dfeac62550514b0e46f5aa6212b08992 (diff)
nvc0: fix max varying count, move CLIPVERTEX,FOG out of the way
The card spews an error if I use all 128 generic slots. Apparently the real limit isn't just dictated by the address space layout.
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp23
1 files changed, 18 insertions, 5 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 613187c0a12..b546429922d 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -1009,7 +1009,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)
+ if (info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_PSIZE ||
+ info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_PRIMID ||
+ info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_FOG)
info->out[dst.getIndex(0)].mask &= 1;
if (isEdgeFlagPassthrough(insn))
@@ -1040,14 +1042,25 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
for (unsigned i = 0; i < info->numInputs; ++i)
info->in[i].mask = 0xf;
} else {
+ const int i = src.getIndex(0);
for (unsigned c = 0; c < 4; ++c) {
if (!(mask & (1 << c)))
continue;
int k = src.getSwizzle(c);
- int i = src.getIndex(0);
- if (info->in[i].sn != TGSI_SEMANTIC_FOG || k == TGSI_SWIZZLE_X)
- if (k <= TGSI_SWIZZLE_W)
- info->in[i].mask |= 1 << k;
+ if (k <= TGSI_SWIZZLE_W)
+ info->in[i].mask |= 1 << k;
+ }
+ switch (info->in[i].sn) {
+ case TGSI_SEMANTIC_PSIZE:
+ case TGSI_SEMANTIC_PRIMID:
+ case TGSI_SEMANTIC_FOG:
+ info->in[i].mask &= 0x1;
+ break;
+ case TGSI_SEMANTIC_PCOORD:
+ info->in[i].mask &= 0x3;
+ break;
+ default:
+ break;
}
}
}