turnip: Skip unused regs when setting up streamout buffers

Fixes: 374406a7c4

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Brian Ho <brian@brkho.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4604>
This commit is contained in:
Hyunjun Ko 2020-04-06 05:16:21 +00:00 committed by Marge Bot
parent e892733b80
commit 0edff5123c
1 changed files with 4 additions and 0 deletions

View File

@ -827,6 +827,10 @@ tu6_setup_streamout(const struct ir3_shader_variant *v,
unsigned k = out->register_index;
unsigned idx;
/* Skip it, if there's an unused reg in the middle of outputs. */
if (v->outputs[k].regid == INVALID_REG)
continue;
tf->ncomp[out->output_buffer] += out->num_components;
/* linkage map sorted by order frag shader wants things, so