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

2014-06-12 Thread Iago Toral
It may be a bit less confusing to read if I take the inner if out, so I'll rewrite it like this: if (input_var || (prog-SeparateShader consumer == NULL)) { matches.record(output_var, input_var); } if (input_var output_var-data.streamId != 0) { linker_error(prog, ...); return false; }

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

2014-06-11 Thread Iago Toral Quiroga
Outputs that are linked to inputs in the next stage must be output to stream 0, otherwise we should fail to link. --- src/glsl/link_varyings.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 9883c0b..0066b4e 100644 ---

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

2014-06-11 Thread Chris Forbes
This would appear to prohibit the use of multiple streams in separable programs entirely. I don't think that's the right thing. On Wed, Jun 11, 2014 at 7:49 PM, Iago Toral Quiroga ito...@igalia.com wrote: Outputs that are linked to inputs in the next stage must be output to stream 0,

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

2014-06-11 Thread Iago Toral
I am a bit confused here: Reading the code it looks like input_var should be NULL if there is no consumer stage. In that case, if this is a separable program and there is no consumer, then input_var must be NULL too, in which case the linker_error would never take place. If input_var is not NULL

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

2014-06-11 Thread Chris Forbes
I had misread it -- yes, this looks correct. On Thu, Jun 12, 2014 at 12:02 AM, Iago Toral ito...@igalia.com wrote: I am a bit confused here: Reading the code it looks like input_var should be NULL if there is no consumer stage. In that case, if this is a separable program and there is no