summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-05-23 11:31:39 -0400
committerIan Romanick <ian.d.romanick@intel.com>2014-05-30 17:11:15 -0700
commit76e112380a4a4595f2fec49070f1d942994d15f0 (patch)
tree2c9e197969d0082378dca2a097ae802aa3270bfb /src/gallium/drivers/nouveau
parent8ac81e5b66cdb336f9809a5d03836a4a17170a81 (diff)
nvc0: revert mistaken logic to collapse color outputs to the beginning
In commit af38ef907, I added a "fix" to color outputs not being assigned correctly when sample mask was being output. This was totally wrong -- the color indices (i.e. "si" values) were the ones that were wrong. Undo that hunk. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 0d699530ff9fe68a1898f875b889422536bfc8e5) Requested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_program.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index 1d59fc4cff0..394e4a31371 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -133,17 +133,12 @@ static int
nvc0_fp_assign_output_slots(struct nv50_ir_prog_info *info)
{
unsigned count = info->prop.fp.numColourResults * 4;
- unsigned i, c, ci;
+ unsigned i, c;
- for (i = 0, ci = 0; i < info->numOutputs; ++i) {
- if (info->out[i].sn == TGSI_SEMANTIC_COLOR) {
+ for (i = 0; i < info->numOutputs; ++i)
+ if (info->out[i].sn == TGSI_SEMANTIC_COLOR)
for (c = 0; c < 4; ++c)
- info->out[i].slot[c] = ci * 4 + c;
- ci++;
- }
- }
-
- assert(ci == info->prop.fp.numColourResults);
+ info->out[i].slot[c] = info->out[i].si * 4 + c;
if (info->io.sampleMask < PIPE_MAX_SHADER_OUTPUTS)
info->out[info->io.sampleMask].slot[0] = count++;