diff options
author | Marcin Slusarz <[email protected]> | 2012-05-07 14:05:35 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-05-07 14:05:35 +0200 |
commit | ecc7e5e85b65bf7c87e31126f893065d4466246a (patch) | |
tree | a60a1db0dcc845373666c55437022fd238640c69 /src | |
parent | c19672f90a653a8bd6adcc35e294b7150b34f9e7 (diff) |
nv50: handle VP without inputs
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 11 |
1 files changed, 11 insertions, 0 deletions
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++; |