mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 01:50:12 +01:00
glsl/linker: Fix out variables linking during single stage
Since out variables are copied from shader objects instruction
streams to linked shader instruction steam it should be cloned
at first to keep source instruction steam unaltered.
Fixes: 966a797e43 ("glsl/linker: Link all out vars from a shader
objects on a single stage")
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731
This commit is contained in:
parent
8676af12c8
commit
7d66eddbbd
1 changed files with 2 additions and 1 deletions
|
|
@ -2269,10 +2269,11 @@ link_output_variables(struct gl_linked_shader *linked_shader,
|
|||
if (ir->ir_type != ir_type_variable)
|
||||
continue;
|
||||
|
||||
ir_variable *const var = (ir_variable *) ir;
|
||||
ir_variable *var = (ir_variable *) ir;
|
||||
|
||||
if (var->data.mode == ir_var_shader_out &&
|
||||
!symbols->get_variable(var->name)) {
|
||||
var = var->clone(linked_shader, NULL);
|
||||
symbols->add_variable(var);
|
||||
linked_shader->ir->push_head(var);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue