Mesa (main): isl: add helpers to printout ops

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 14 20:48:02 UTC 2022


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Nov 19 11:51:31 2021 +0200

isl: add helpers to printout ops

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Rohan Garg <rohan.garg at intel.com>
Acked-by: Antonio Caggiano <antonio.caggiano at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>

---

 src/intel/isl/isl.c | 14 ++++++++++++++
 src/intel/isl/isl.h |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index f74fee3e717..996d042e1a9 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -3489,3 +3489,17 @@ isl_get_render_compression_format(enum isl_format format)
       return 0;
    }
 }
+
+const char *
+isl_aux_op_to_name(enum isl_aux_op op)
+{
+   static const char *names[] = {
+      [ISL_AUX_OP_NONE]            = "none",
+      [ISL_AUX_OP_FAST_CLEAR]      = "fast-clear",
+      [ISL_AUX_OP_FULL_RESOLVE]    = "full-resolve",
+      [ISL_AUX_OP_PARTIAL_RESOLVE] = "partial-resolve",
+      [ISL_AUX_OP_AMBIGUATE]       = "ambiguate",
+   };
+   assert(op < ARRAY_SIZE(names));
+   return names[op];
+}
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index 31a21aa7607..a08f5d0468e 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -2875,6 +2875,10 @@ isl_get_tile_masks(enum isl_tiling tiling, uint32_t cpp,
    *mask_x = tile_w_bytes / cpp - 1;
    *mask_y = tile_h - 1;
 }
+
+const char *
+isl_aux_op_to_name(enum isl_aux_op op);
+
 #ifdef __cplusplus
 }
 #endif



More information about the mesa-commit mailing list