glsl: remove the always_active_io flag from GLSL IR
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 5 Apr 2023 04:05:59 +0000 (14:05 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jul 2023 01:21:06 +0000 (01:21 +0000)
No longer used.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22846>

src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/opt_dead_code.cpp

index 8c96e91..9239852 100644 (file)
@@ -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;
index 811e295..bfd5edb 100644 (file)
@@ -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;
index ded5656..3360b16 100644 (file)
@@ -700,13 +700,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.
        *
index a44fe10..c8b31b4 100644 (file)
@@ -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.