mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 04:50:11 +01:00
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>
This commit is contained in:
parent
b908e85ed3
commit
02fd80e160
1 changed files with 8 additions and 0 deletions
|
|
@ -1345,6 +1345,14 @@ assign_varying_locations(struct gl_context *ctx,
|
||||||
if (input_var || (prog->SeparateShader && consumer == NULL)) {
|
if (input_var || (prog->SeparateShader && consumer == NULL)) {
|
||||||
matches.record(output_var, input_var);
|
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 {
|
} else {
|
||||||
/* If there's no producer stage, then this must be a separable program.
|
/* If there's no producer stage, then this must be a separable program.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue