diff options
author | Jonathan Marek <[email protected]> | 2019-10-14 11:16:02 -0400 |
---|---|---|
committer | Jonathan Marek <[email protected]> | 2019-10-15 07:56:19 -0400 |
commit | 03772df45016010e19fbd89564d587e0eef25e61 (patch) | |
tree | 619399cc12d43c382b382da6f148756a634b3aaf /src/freedreno | |
parent | 8580726f90fa79052b64cecd35d7b1be3a139c27 (diff) |
turnip: fix 32 vertex attributes case
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 0e6463e2abc..29f394c82f0 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -989,9 +989,7 @@ tu6_emit_vertex_input(struct tu_cs *cs, { 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; @@ -1032,6 +1030,7 @@ tu6_emit_vertex_input(struct tu_cs *cs, 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); |