Mesa (main): mesa: update or remove out of date references to ir_to_mesa

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 6 11:14:40 UTC 2021


Module: Mesa
Branch: main
Commit: 74a1f103b62ff4f2e0fdacdc6f87d1968785db8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=74a1f103b62ff4f2e0fdacdc6f87d1968785db8d

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Sun Dec  5 22:35:13 2021 +1100

mesa: update or remove out of date references to ir_to_mesa

Reviewed-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14066>

---

 docs/codingstyle.rst                       | 4 ++--
 src/compiler/glsl/README                   | 5 ++---
 src/compiler/glsl/opt_algebraic.cpp        | 3 ---
 src/mesa/state_tracker/st_glsl_to_nir.cpp  | 3 ---
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
 5 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/docs/codingstyle.rst b/docs/codingstyle.rst
index 1383a31723c..d0714c5d99e 100644
--- a/docs/codingstyle.rst
+++ b/docs/codingstyle.rst
@@ -128,5 +128,5 @@ Basic formatting guidelines
    prefer the use of ``bool``, ``true``, and ``false`` over
    ``GLboolean``, ``GL_TRUE``, and ``GL_FALSE``. In C code, this may
    mean that ``#include <stdbool.h>`` needs to be added. The
-   ``try_emit_*`` methods in ``src/mesa/program/ir_to_mesa.cpp`` and
-   ``src/mesa/state_tracker/st_glsl_to_tgsi.cpp`` can serve as examples.
+   ``try_emit_*`` method ``src/mesa/state_tracker/st_glsl_to_tgsi.cpp``
+   can serve as an example.
diff --git a/src/compiler/glsl/README b/src/compiler/glsl/README
index 9d2d10c04a8..6eb085f53b0 100644
--- a/src/compiler/glsl/README
+++ b/src/compiler/glsl/README
@@ -155,9 +155,8 @@ for the 965 fragment shader backend when that is developed.
 
 Q: How should I expand instructions that take multiple backend instructions?
 
-Sometimes you'll have to do the expansion in your code generation --
-see, for example, ir_to_mesa.cpp's handling of ir_unop_sqrt.  However,
-in many cases you'll want to do a pass over the IR to convert
+Sometimes you'll have to do the expansion in your code generation.
+However, in many cases you'll want to do a pass over the IR to convert
 non-native instructions to a series of native instructions.  For
 example, for the Mesa backend we have ir_div_to_mul_rcp.cpp because
 Mesa IR (and many hardware backends) only have a reciprocal
diff --git a/src/compiler/glsl/opt_algebraic.cpp b/src/compiler/glsl/opt_algebraic.cpp
index 14d6e13839b..bbb7320e66d 100644
--- a/src/compiler/glsl/opt_algebraic.cpp
+++ b/src/compiler/glsl/opt_algebraic.cpp
@@ -941,9 +941,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
                                            neg(op_expr[0]->operands[0]));
       }
 
-      /* While ir_to_mesa.cpp will lower sqrt(x) to rcp(rsq(x)), it does so at
-       * its IR level, so we can always apply this transformation.
-       */
       if (op_expr[0] && op_expr[0]->operation == ir_unop_rsq)
          return sqrt(op_expr[0]->operands[0]);
 
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 027527d4245..1ac2e8404cb 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -218,9 +218,6 @@ st_nir_assign_uniform_locations(struct gl_context *ctx,
          }
       } else if (uniform->state_slots) {
          const gl_state_index16 *const stateTokens = uniform->state_slots[0].tokens;
-         /* This state reference has already been setup by ir_to_mesa, but we'll
-          * get the same index back here.
-          */
 
          unsigned comps;
          if (glsl_type_is_struct_or_ifc(type)) {
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 8d507afcdf7..de0373f777e 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5078,7 +5078,7 @@ get_src_arg_mask(st_dst_reg dst, st_src_reg src)
  * instruction is the first instruction to write to register T0.  There are
  * several lowering passes done in GLSL IR (e.g. branches and
  * relative addressing) that create a large number of conditional assignments
- * that ir_to_mesa converts to CMP instructions like the one mentioned above.
+ * that glsl_to_tgsi converts to CMP instructions like the one mentioned above.
  *
  * Here is why this conversion is safe:
  * CMP T0, T1 T2 T0 can be expanded to:



More information about the mesa-commit mailing list