From bc66c2588ac96ab41f95e3bb2e9b1999de472e05 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 5 Apr 2023 14:05:59 +1000 Subject: [PATCH] glsl: remove the always_active_io flag from GLSL IR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer used. Reviewed-by: Emma Anholt Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/glsl_to_nir.cpp | 1 - src/compiler/glsl/ir.cpp | 1 - src/compiler/glsl/ir.h | 7 ------- src/compiler/glsl/opt_dead_code.cpp | 14 -------------- 4 files changed, 23 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 8c96e914387..9239852b2e9 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -506,7 +506,6 @@ nir_visitor::visit(ir_variable *ir) var->name = ralloc_strdup(var, ir->name); var->data.assigned = ir->data.assigned; - var->data.always_active_io = ir->data.always_active_io; var->data.read_only = ir->data.read_only; var->data.centroid = ir->data.centroid; var->data.sample = ir->data.sample; diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 811e2950270..bfd5edb3865 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -2043,7 +2043,6 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name, this->data.depth_layout = ir_depth_layout_none; this->data.used = false; this->data.assigned = false; - this->data.always_active_io = false; this->data.read_only = false; this->data.centroid = false; this->data.sample = false; diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h index ded56569fc9..3360b16b089 100644 --- a/src/compiler/glsl/ir.h +++ b/src/compiler/glsl/ir.h @@ -699,13 +699,6 @@ public: */ unsigned assigned:1; - /** - * When separate shader programs are enabled, only input/outputs between - * the stages of a multi-stage separate program can be safely removed - * from the shader interface. Other input/outputs must remains active. - */ - unsigned always_active_io:1; - /** * Enum indicating how the variable was declared. See * ir_var_declaration_type. diff --git a/src/compiler/glsl/opt_dead_code.cpp b/src/compiler/glsl/opt_dead_code.cpp index a44fe10b9d0..c8b31b490ca 100644 --- a/src/compiler/glsl/opt_dead_code.cpp +++ b/src/compiler/glsl/opt_dead_code.cpp @@ -74,20 +74,6 @@ do_dead_code(exec_list *instructions) || !entry->declaration) continue; - /* Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.5 - * (Core Profile) spec says: - * - * "With separable program objects, interfaces between shader - * stages may involve the outputs from one program object and the - * inputs from a second program object. For such interfaces, it is - * not possible to detect mismatches at link time, because the - * programs are linked separately. When each such program is - * linked, all inputs or outputs interfacing with another program - * stage are treated as active." - */ - if (entry->var->data.always_active_io) - continue; - if (!entry->assign_list.is_empty()) { /* Remove all the dead assignments to the variable we found. * Don't do so if it's a shader or function output, though.