From 0edff5123c4f27ff0f8e35d29c2c45a230d3f939 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Mon, 6 Apr 2020 05:16:21 +0000 Subject: [PATCH] turnip: Skip unused regs when setting up streamout buffers Fixes: 374406a7c420d266f920461f904864a94dc1b8c8 Signed-off-by: Hyunjun Ko Reviewed-by: Brian Ho Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.30.2