Mesa (main): pan/mdg: Reduce size of tex_opcode_props

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 16 14:35:20 UTC 2021


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

Author: Icecream95 <ixn at disroot.org>
Date:   Sat Aug 14 23:14:43 2021 +1200

pan/mdg: Reduce size of tex_opcode_props

Also include midgard_ops.h to prevent the definitions from going out
of sync again.

Found by compiling with LTO enabled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>

---

 src/panfrost/midgard/midgard_ops.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/midgard/midgard_ops.c b/src/panfrost/midgard/midgard_ops.c
index 89ed065f30e..4e12a25064a 100644
--- a/src/panfrost/midgard/midgard_ops.c
+++ b/src/panfrost/midgard/midgard_ops.c
@@ -28,6 +28,8 @@
 #include "helpers.h"
 #undef MIDGARD_OPS_TABLE
 
+#include "midgard_ops.h"
+
 /* Table of mapping opcodes to accompanying properties. This is used for both
  * the disassembler and the compiler. It is placed in a .c file like this to
  * avoid duplications in the binary */
@@ -360,7 +362,7 @@ struct mir_ldst_op_props load_store_opcode_props[256] = {
         [midgard_op_st_tilebuffer_raw] = {"ST_TILEBUFFER.raw", M32},
 };
 
-struct mir_tex_op_props tex_opcode_props[256] = {
+struct mir_tex_op_props tex_opcode_props[16] = {
         [midgard_tex_op_normal] = {"TEX", M32},
         [midgard_tex_op_gradient] = {"TEX_GRAD", M32},
         [midgard_tex_op_fetch] = {"TEX_FETCH", M32},



More information about the mesa-commit mailing list