When not all of the vertex attributes are actually used in the shader,
we end up with some inputs without an assigned reg. Those are marked
as invalid and must be skipped when assigning the inputs, as those would
overwrite other valid inputs otherwise.
Fixes piglit drawpixels and a bunch of other tests using the st_draw path.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
for (int idx = 0; idx < c->file[TGSI_FILE_INPUT].reg_size; ++idx) {
struct etna_reg_desc *reg = &c->file[TGSI_FILE_INPUT].reg[idx];
assert(sf->num_reg < ETNA_NUM_INPUTS);
+
+ if (!reg->native.valid)
+ continue;
+
/* XXX exclude inputs with special semantics such as gl_frontFacing */
sf->reg[sf->num_reg].reg = reg->native.id;
sf->reg[sf->num_reg].semantic = reg->semantic;