OSDN Git Service

braodcom/vc5: Find the actual first TF output for our TF spec.
authorEric Anholt <eric@anholt.net>
Mon, 2 Oct 2017 19:20:35 +0000 (12:20 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 10 Oct 2017 18:42:05 +0000 (11:42 -0700)
This doesn't yet support PSIZ, but gets us at least some of TF working.

src/gallium/drivers/vc5/vc5_program.c

index 869220b..f22f474 100644 (file)
@@ -100,7 +100,12 @@ vc5_set_transform_feedback_outputs(struct vc5_uncompiled_shader *so,
                         continue;
 
                 struct V3D33_TRANSFORM_FEEDBACK_OUTPUT_DATA_SPEC unpacked = {
-                        .first_shaded_vertex_value_to_output = vpm_start,
+                        /* We need the offset from the coordinate shader's VPM
+                         * output block, which has the [X, Y, Z, W, Xs, Ys]
+                         * values at the start.  Note that this will need some
+                         * shifting when PSIZ is also present.
+                         */
+                        .first_shaded_vertex_value_to_output = vpm_start + 6,
                         .number_of_consecutive_vertex_values_to_output_as_32_bit_values_minus_1 = vpm_size - 1,
                         .output_buffer_to_write_to = buffer,
                 };