turnip: Skip unused regs when setting up streamout buffers
authorHyunjun Ko <zzoon@igalia.com>
Mon, 6 Apr 2020 05:16:21 +0000 (05:16 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Apr 2020 01:14:19 +0000 (01:14 +0000)
Fixes: 374406a7c420d266f920461f904864a94dc1b8c8
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>

src/freedreno/vulkan/tu_pipeline.c

index d9ffa2411fec1d46c5311f7b248d75fa90f27c76..b2d5b69393c95393c321321c1478ba5f9e0b9659 100644 (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