[Mesa-dev] Question about tesselation shader out varyings and transform feedback

Alejandro PiƱeiro apinheiro at igalia.com
Thu Aug 4 16:36:50 UTC 2016


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?

Thanks in advance.

BR




More information about the mesa-dev mailing list