vc4: Mark a big array as const.
authorEric Anholt <eric@anholt.net>
Wed, 29 Oct 2014 22:15:29 +0000 (15:15 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 18 Nov 2014 20:42:52 +0000 (12:42 -0800)
Drops 1kb of code from this inner loop, in exchange for 2.5k of data.

src/gallium/drivers/vc4/vc4_program.c

index ef0d5b89c93f6e2cebadfed84cfa31cb5ce78371..5fab1deb6bf5281b1b601716eb268e87e8d03b2c 100644 (file)
@@ -1247,7 +1247,7 @@ static void
 emit_tgsi_instruction(struct vc4_compile *c,
                       struct tgsi_full_instruction *tgsi_inst)
 {
-        struct {
+        static const struct {
                 enum qop op;
                 struct qreg (*func)(struct vc4_compile *c,
                                     struct tgsi_full_instruction *tgsi_inst,