broadcom/vc5: Add an assert about GFXH-1559.
authorEric Anholt <eric@anholt.net>
Wed, 25 Apr 2018 23:30:20 +0000 (16:30 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 26 Apr 2018 18:30:22 +0000 (11:30 -0700)
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

index 6beb3359f294bb5913c250fc6f47c9aeae0f1cb8..d885cdf2975b6b21eb5ef94cdd59c520648cbec3 100644 (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);