[Mesa-dev] [PATCH v2 05/23] glsl: Fail to link if inter-stage input/outputs are not assigned to stream 0

Marek Olšák maraeo at gmail.com
Thu Jul 30 00:43:03 PDT 2015

On Thu, Jul 30, 2015 at 8:49 AM, Iago Toral <itoral at igalia.com> wrote:
> On Wed, 2015-07-29 at 21:58 +0200, Marek Olšák wrote:
>> Hi,
>> Where does the spec say we should fail to link? I don't see such a
>> statement there.
> I have reviewed ARB_gpu_shader5 and I don't see any specific mentions to
> what should be done in this particular case. That said, isn't this the
> logical thing to do? It is a programming error to link an FS input to a
> GS output bound to a non-zero stream and at best the program would have
> undefined behavior if the FS input is used. Hiding this from the
> developer silently does not seem to be a good idea in any case, whatever
> the developer was trying to accomplish he is doing it wrong.
>> It looks like varyings with stream > 0 should not be linked with the
>> fragment shader.
> How is this better?

The spec simply says that varyings with stream > 0 are not passed to
the rasterizer, which means the matching fragment shader inputs should
be uninitialized, but it should still be possible to capture the
varyings with transform feedback. That's how I understand the spec.


More information about the mesa-dev mailing list