~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/compiler/glsl/opt_dead_code.cpp

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
          || !entry->declaration)
75
75
         continue;
76
76
 
77
 
      /* Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.5
78
 
       * (Core Profile) spec says:
79
 
       *
80
 
       *    "With separable program objects, interfaces between shader
81
 
       *    stages may involve the outputs from one program object and the
82
 
       *    inputs from a second program object.  For such interfaces, it is
83
 
       *    not possible to detect mismatches at link time, because the
84
 
       *    programs are linked separately. When each such program is
85
 
       *    linked, all inputs or outputs interfacing with another program
86
 
       *    stage are treated as active."
87
 
       */
88
 
      if (entry->var->data.always_active_io)
89
 
         continue;
90
 
 
91
77
      if (!entry->assign_list.is_empty()) {
92
78
         /* Remove all the dead assignments to the variable we found.
93
79
          * Don't do so if it's a shader or function output, though.