summaryrefslogtreecommitdiffstats
path: root/src/broadcom
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-03-22 13:52:11 -0700
committerEric Anholt <[email protected]>2018-03-22 15:12:21 -0700
commitd7a015cbc6a6c12a87ee7ec725cc399d3712f43c (patch)
treece924f114c41a6e40f8f21a210252496ac2be947 /src/broadcom
parentb8387dbc49a87ff7a2b613a29a375b2a2eb88041 (diff)
broadcom/vc5: Account for InstanceID/VertexID in VPM segment size.
Fixes failure in GTF-GLES3.gtf.GL3Tests.draw_instanced.draw_instanced_attrib_size
Diffstat (limited to 'src/broadcom')
-rw-r--r--src/broadcom/compiler/vir.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c
index ff9405e6c12..93990ee806f 100644
--- a/src/broadcom/compiler/vir.c
+++ b/src/broadcom/compiler/vir.c
@@ -728,15 +728,20 @@ uint64_t *v3d_compile_vs(const struct v3d_compiler *compiler,
prog_data->vpm_input_size += c->vattr_sizes[i];
}
- /* Input/output segment size are in 8x32-bit multiples. */
- prog_data->vpm_input_size = align(prog_data->vpm_input_size, 8) / 8;
- prog_data->vpm_output_size = align(c->num_vpm_writes, 8) / 8;
-
prog_data->uses_vid = (s->info.system_values_read &
(1ull << SYSTEM_VALUE_VERTEX_ID));
prog_data->uses_iid = (s->info.system_values_read &
(1ull << SYSTEM_VALUE_INSTANCE_ID));
+ if (prog_data->uses_vid)
+ prog_data->vpm_input_size++;
+ if (prog_data->uses_iid)
+ prog_data->vpm_input_size++;
+
+ /* Input/output segment size are in 8x32-bit multiples. */
+ prog_data->vpm_input_size = align(prog_data->vpm_input_size, 8) / 8;
+ prog_data->vpm_output_size = align(c->num_vpm_writes, 8) / 8;
+
return v3d_return_qpu_insts(c, final_assembly_size);
}