v3d: we always have at least one output segment
[mesa.git] / src / broadcom / compiler / v3d_nir_lower_io.c
index 3c9279a2fee72f6e782a946919a82a895ad4071b..9b7db65db7e22561a8ea237ccee0125c97894519 100644 (file)
@@ -378,7 +378,7 @@ v3d_nir_setup_vpm_layout_vs(struct v3d_compile *c,
 
         state->varyings_vpm_offset = vpm_offset;
 
-        c->vpm_output_size = vpm_offset + c->vs_key->num_used_outputs;
+        c->vpm_output_size = MAX2(1, vpm_offset + c->vs_key->num_used_outputs);
 }
 
 static void