diff options
author | Eric Anholt <[email protected]> | 2018-06-21 16:39:15 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-06-27 09:35:55 -0700 |
commit | 6bb046cd2952c7d862becf9960bfc48e4b8db0a4 (patch) | |
tree | cdac7f79818dd14c8a2131705a95f76c64ca7ca1 | |
parent | ad1a4cb563f483a5767431adcc6a1a8f973326fd (diff) |
glsl: Make sure that packed varyings reflect always_active_io properly.
The always_active_io flag was only set according to the first variable
that got packed in, so NIR io compaction would end up compacting XFB
varyings that shouldn't move at that point.
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r-- | src/compiler/glsl/lower_packed_varyings.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp index 5c1eed719f2..5bd6c92ed99 100644 --- a/src/compiler/glsl/lower_packed_varyings.cpp +++ b/src/compiler/glsl/lower_packed_varyings.cpp @@ -729,12 +729,17 @@ lower_packed_varyings_visitor::get_packed_varying_deref( unpacked_var->insert_before(packed_var); this->packed_varyings[slot] = packed_var; } else { + ir_variable *var = this->packed_varyings[slot]; + + /* The slot needs to be marked as always active if any variable that got + * packed there was. + */ + var->data.always_active_io |= unpacked_var->data.always_active_io; + /* For geometry shader inputs, only update the packed variable name the * first time we visit each component. */ if (this->gs_input_vertices == 0 || vertex_index == 0) { - ir_variable *var = this->packed_varyings[slot]; - if (var->is_name_ralloced()) ralloc_asprintf_append((char **) &var->name, ",%s", name); else |