From: Hyunjun Ko Date: Mon, 6 Apr 2020 05:16:21 +0000 (+0000) Subject: turnip: Skip unused regs when setting up streamout buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0edff5123c4f27ff0f8e35d29c2c45a230d3f939;p=mesa.git turnip: Skip unused regs when setting up streamout buffers Fixes: 374406a7c420d266f920461f904864a94dc1b8c8 Signed-off-by: Hyunjun Ko Reviewed-by: Brian Ho Part-of: --- diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index d9ffa2411fe..b2d5b69393c 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -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