freedreno/ir3: fix neverball assert in case of unused VS inputs
authorRob Clark <robdclark@chromium.org>
Tue, 3 Dec 2019 21:44:35 +0000 (13:44 -0800)
committerRob Clark <robdclark@chromium.org>
Wed, 4 Dec 2019 21:08:52 +0000 (13:08 -0800)
commit937b9055698be0dfdb7d2e0673a989e2ecc05912
tree03c22d0d152a5c63f301e62314615649a25b75dc
parent4e47c205b9749aebb258075da36d176e1d453eb4
freedreno/ir3: fix neverball assert in case of unused VS inputs

The logic to ensure VS and BS inputs are aligned wasn't accounting for
unused inputs in VS.  This *usually* doesn't happen, but it seems it
can in the case of ARB programs?

Fixes assert:
```
fd6_program_create: Assertion `bs->inputs[i].regid == vs->inputs[i].regid' failed.
```

Fixes: 882d53d8e36 ("freedreno/ir3+a6xx: same VBO state for draw/binning")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/a6xx/fd6_program.c