Mesa (main): glsl: drop extra optimise swizzles call

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 01:39:23 UTC 2022


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Mon Jun  6 12:57:08 2022 +1000

glsl: drop extra optimise swizzles call

As per the comment this was meant to tidy things up after varying
linking but varying linking has been moved into a nir based linker
so this extra call is no longer needed.

This optimisation pass is still called in the regular glsl ir
optimisation loop.

No shader-db change on Iris (BDW).

Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16880>

---

 src/compiler/glsl/linker.cpp | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 6dd6ae6f292..6f1ea5b4dec 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3926,16 +3926,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
                                   &ctx->Extensions, ctx->API, prog, mem_ctx))
       goto done;
 
-   /* Linking varyings can cause some extra, useless swizzles to be generated
-    * due to packing and unpacking.
-    */
-   for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
-      if (prog->_LinkedShaders[i] == NULL)
-         continue;
-
-      optimize_swizzles(prog->_LinkedShaders[i]->ir);
-   }
-
    /* OpenGL ES < 3.1 requires that a vertex shader and a fragment shader both
     * be present in a linked program. GL_ARB_ES2_compatibility doesn't say
     * anything about shader linking when one of the shaders (vertex or



More information about the mesa-commit mailing list