nv50: properly set the PRIMITIVE_ID enable flag when it is a gp input.
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 12 Jan 2014 01:12:18 +0000 (20:12 -0500)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 27 Jan 2014 15:40:42 +0000 (16:40 +0100)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_program.c

index 78a12e3b0109715f75b4a194818905df6c401c85..f46f240cc3c80bc087dbd4492508adb30d09ff97 100644 (file)
@@ -52,6 +52,9 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info)
       for (c = 0; c < 4; ++c)
          if (info->in[i].mask & (1 << c))
             info->in[i].slot[c] = n++;
+
+      if (info->in[i].sn == TGSI_SEMANTIC_PRIMID)
+         prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID;
    }
    prog->in_nr = info->numInputs;