broadcom/vc5: Add an assert about GFXH-1559.

Our TF outputs always start at 6 or 7 currently, so we don't hit the
broken 8 case.  Let's make sure that doesn't change somehow.
This commit is contained in:
Eric Anholt 2018-04-25 16:30:20 -07:00
parent 77b4f30bae
commit e2f3317801
1 changed files with 9 additions and 0 deletions

View File

@ -125,6 +125,10 @@ vc5_set_transform_feedback_outputs(struct vc5_uncompiled_shader *so,
.output_buffer_to_write_to = buffer,
};
/* GFXH-1559 */
assert(unpacked.first_shaded_vertex_value_to_output != 8 ||
so->num_tf_specs != 0);
assert(so->num_tf_specs != ARRAY_SIZE(so->tf_specs));
V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_pack(NULL,
(void *)&so->tf_specs[so->num_tf_specs],
@ -136,6 +140,11 @@ vc5_set_transform_feedback_outputs(struct vc5_uncompiled_shader *so,
* though.
*/
unpacked.first_shaded_vertex_value_to_output++;
/* GFXH-1559 */
assert(unpacked.first_shaded_vertex_value_to_output != 8 ||
so->num_tf_specs != 0);
V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC_pack(NULL,
(void *)&so->tf_specs_psiz[so->num_tf_specs],
&unpacked);