Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
{
uint32_t vfd_decode_idx = 0;
- /* why do we go beyond inputs_count? */
- assert(vs->inputs_count + 1 <= MAX_VERTEX_ATTRIBS);
- for (uint32_t i = 0; i <= vs->inputs_count; i++) {
+ for (uint32_t i = 0; i < vs->inputs_count; i++) {
if (vs->inputs[i].sysval || !vs->inputs[i].compmask)
continue;
offsets[vfd_decode_idx] = vi_attr->offset;
vfd_decode_idx++;
+ assert(vfd_decode_idx <= MAX_VERTEX_ATTRIBS);
}
tu_cs_emit_pkt4(cs, REG_A6XX_VFD_CONTROL_0, 1);