From: Marcin Slusarz Date: Mon, 7 May 2012 12:05:35 +0000 (+0200) Subject: nv50: handle VP without inputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ecc7e5e85b65bf7c87e31126f893065d4466246a;p=mesa.git nv50: handle VP without inputs --- diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 48e8db333f9..ca40ac2dd43 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -68,6 +68,17 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info) break; } } + + /* + * Corner case: VP has no inputs, but we will still need to submit data to + * draw it. HW will shout at us and won't draw anything if we don't enable + * any input, so let's just pretend it's the first one. + */ + if (prog->vp.attrs[0] == 0 && + prog->vp.attrs[1] == 0 && + prog->vp.attrs[2] == 0) + prog->vp.attrs[0] |= 0xf; + /* VertexID before InstanceID */ if (info->io.vertexId < info->numSysVals) info->sv[info->io.vertexId].slot[0] = n++;