summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-03-30 10:38:21 -0700
committerEric Anholt <[email protected]>2015-03-30 12:57:45 -0700
commit8c5dcdbccb68b73d2856d9c1faafadc536e682e3 (patch)
treee8865f27d14237fdd3892b5e134f8f4d8f5404a3 /src/gallium/drivers/vc4/vc4_qir.h
parentdbe67d76e0487b04a7b6081d9d46666db3c3ee3e (diff)
vc4: Add a constant folding pass.
This cleans up some pointless operations generated by the in-driver mul24 lowering (commonly generated by making a vec4 index for a matrix in a uniform array). I could fill in other operations, but pretty much anything else ought to be getting handled at the NIR level, I think. total uniforms in shared programs: 13423 -> 13421 (-0.01%) uniforms in affected programs: 346 -> 344 (-0.58%)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index 4f910e3c3df..6cc8dbefea4 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -396,6 +396,7 @@ const char *qir_get_stage_name(enum qstage stage);
void qir_optimize(struct vc4_compile *c);
bool qir_opt_algebraic(struct vc4_compile *c);
+bool qir_opt_constant_folding(struct vc4_compile *c);
bool qir_opt_copy_propagation(struct vc4_compile *c);
bool qir_opt_cse(struct vc4_compile *c);
bool qir_opt_dead_code(struct vc4_compile *c);