From f4133865d191c6a5377d63a2384e5844b1e0e14d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Oct 2017 12:20:35 -0700 Subject: [PATCH] braodcom/vc5: Find the actual first TF output for our TF spec. This doesn't yet support PSIZ, but gets us at least some of TF working. --- src/gallium/drivers/vc5/vc5_program.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc5/vc5_program.c b/src/gallium/drivers/vc5/vc5_program.c index 869220b423d..f22f474954c 100644 --- a/src/gallium/drivers/vc5/vc5_program.c +++ b/src/gallium/drivers/vc5/vc5_program.c @@ -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, }; -- 2.30.2