[Mesa-dev] Question about tesselation shader out varyings and transform feedback
Timothy Arceri
timothy.arceri at collabora.com
Thu Aug 4 23:53:22 UTC 2016
On Thu, 2016-08-04 at 18:36 +0200, Alejandro Piñeiro wrote:
> Hi,
>
> these days I have been trying to fix a test that uses transform
> feedback
> on the out varying of a tessellation shader. The relevant part on
> that
> shader is like this:
>
> layout (vertices=4) out;
>
> out block { vec4 value; } user_out[];
>
> The test tries to use block.value as the varying name when calling
> glTransformFeedbackVaryings, in order to get the data of the 4
> vertices.
> The test fails because on link time, it doesn't find that varying
> name.
>
> On mesa, when linked, mesa tfeedback_candidate_generator (at
> src/compiler/glsl/link_varyings) adds to the hashmap of possible
> varyings for transform feedback the following names: block[0].value,
> block[1].value, block[2].value, block[3].value. If I change the test
> to
> use those 4 varyings names, instead of try to get the array directly,
> the test passes.
>
> So now is the moment to justify who is wrong per-spec, if mesa or the
> test. At this moment Im biased to conclude that the test is wrong.
> But
> after reading transform feedback specs (ext, feedback2, feedback3,
> gl44)
> and tessellation shader, I was not able to find anything.
>
> Could someone (I bet that the best person is Timothy Arceri) guide me
> a
> little to know in which part of the spec should I look for?
For block arrays block[0].value,> block[1].value, block[2].value,
block[3].value are the correct strings for matching transform feedback
varyings. I forget which spec states this but its in there somewhere I
recall looking for it and finding it.
However user_out[] looks like it would be coming from a tess control
shader right? In which case we would want to ignore the outer array,
however I'm not sure how well Mesa supports transform feedback from
tcs.
>
> Thanks in advance.
>
> BR
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list