diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2014-06-05 11:36:56 +0200 |
---|---|---|
committer | Iago Toral Quiroga <itoral@igalia.com> | 2014-06-30 08:08:49 +0200 |
commit | 02fd80e16018d44374063bae703352c464fdec2c (patch) | |
tree | b6e887f9547ec868c671614086c6bc7548e869dd /src/glsl/link_varyings.cpp | |
parent | b908e85ed3f1c7601c2e56f85ff676b606af10b5 (diff) | |
download | external_mesa3d-02fd80e16018d44374063bae703352c464fdec2c.zip external_mesa3d-02fd80e16018d44374063bae703352c464fdec2c.tar.gz external_mesa3d-02fd80e16018d44374063bae703352c464fdec2c.tar.bz2 |
glsl: Fail to link if inter-stage input/outputs are not assigned to stream 0
Outputs that are linked to inputs in the next stage must be output to stream 0,
otherwise we should fail to link.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 9725a43..3b20594 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -1345,6 +1345,14 @@ assign_varying_locations(struct gl_context *ctx, if (input_var || (prog->SeparateShader && consumer == NULL)) { matches.record(output_var, input_var); } + + /* Only stream 0 outputs can be consumed in the next stage */ + if (input_var && output_var->data.stream != 0) { + linker_error(prog, "output %s is assigned to stream=%d but " + "is linked to an input, which requires stream=0", + output_var->name, output_var->data.stream); + return false; + } } } else { /* If there's no producer stage, then this must be a separable program. |