From e2f33178010a9612d8d89bf128e3a01a69e1dd82 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 25 Apr 2018 16:30:20 -0700 Subject: 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. --- src/gallium/drivers/vc5/vc5_program.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/vc5/vc5_program.c b/src/gallium/drivers/vc5/vc5_program.c index 6beb3359f29..d885cdf2975 100644 --- a/src/gallium/drivers/vc5/vc5_program.c +++ b/src/gallium/drivers/vc5/vc5_program.c @@ -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); -- cgit v1.2.3