summaryrefslogtreecommitdiff
path: root/src/compiler/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEmma Anholt <emma@anholt.net>2023-03-02 16:02:17 -0800
committerMarge Bot <emma+marge@anholt.net>2023-03-15 03:29:19 +0000
commite395e57f073ac8c0ae70ff7a5d9e2b27ea909263 (patch)
treebafb85993e16c13f3778aa18bb1d2ab7b1215e98 /src/compiler/glsl/glsl_parser_extras.cpp
parent329ab85a89c9bc05211b7eae769269f11b598895 (diff)
glsl: Delete constant-variables pass.
Now that we don't do GLSL IR constant propagation or constant folding, we can leave constant variable detection and handling to NIR. This also avoids some OOB array access in GLSL IR in a piglit test! Freedreno stats again look like noise: total instructions in shared programs: 2718412 -> 2718746 (0.01%) instructions in affected programs: 80497 -> 80831 (0.41%) total last-baryf in shared programs: 110015 -> 110510 (0.45%) last-baryf in affected programs: 35263 -> 35758 (1.40%) total full in shared programs: 189486 -> 189480 (<.01%) full in affected programs: 52 -> 46 (-11.54%) total constlen in shared programs: 494540 -> 494496 (<.01%) constlen in affected programs: 452 -> 408 (-9.73%) total sstall in shared programs: 198297 -> 197928 (-0.19%) sstall in affected programs: 3691 -> 3322 (-10.00%) total systall in shared programs: 432150 -> 431799 (-0.08%) systall in affected programs: 6070 -> 5719 (-5.78%) total waves in shared programs: 435098 -> 435110 (<.01%) waves in affected programs: 92 -> 104 (13.04%) Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index b02fb3342fd..52e30f41b90 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -2398,10 +2398,6 @@ do_common_optimization(exec_list *ir, bool linked,
OPT(do_dead_code_unlinked, ir);
OPT(do_dead_code_local, ir);
OPT(do_tree_grafting, ir);
- if (linked)
- OPT(do_constant_variable, ir);
- else
- OPT(do_constant_variable_unlinked, ir);
OPT(do_minmax_prune, ir);
OPT(do_rebalance_tree, ir);
OPT(do_algebraic, ir, native_integers, options);