aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-10-08 13:48:00 +0200
committerIago Toral Quiroga <[email protected]>2019-12-16 08:42:37 +0100
commita07d70c54bae60be0c549d2a6ece509ed29432f8 (patch)
tree795df6044bd5752bf1c064caf0fb54ce6ff94ffc /src/broadcom
parent76fc8c8bb1979122af40ed143fed726050b293b9 (diff)
v3d: we always have at least one output segment
If we program an output size of 0 the simulator asserts. This was not a problem until now because our VS would always have to emit fixed function outputs, however, now that it can be paired with a GS we can end up with a VS shader that no longer emits any outputs. Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/broadcom')
-rw-r--r--src/broadcom/compiler/v3d_nir_lower_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/broadcom/compiler/v3d_nir_lower_io.c b/src/broadcom/compiler/v3d_nir_lower_io.c
index 3c9279a2fee..9b7db65db7e 100644
--- a/src/broadcom/compiler/v3d_nir_lower_io.c
+++ b/src/broadcom/compiler/v3d_nir_lower_io.c
@@ -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