+static const char *PIPE_COMPARE_FUNC_STRING[] = {
+ "NEVER", /* 0 */
+ "LESS", /* 1 */
+ "EQUAL", /* 2 */
+ "LEQUAL", /* 3 */
+ "GREATER", /* 4 */
+ "NOTEQUAL", /* 5 */
+ "GEQUAL", /* 6 */
+ "ALWAYS", /* 7 */
+};
+
+static const char *PIPE_STENCIL_OP_STRING[] = {
+ "KEEP", /* 0 */
+ "REPLACE", /* 1 */
+ "ZERO", /* 2 */
+ "INVERT", /* 3 */
+ "INCR_WRAP", /* 4 */
+ "DECR_WRAP", /* 5 */
+ "INCR", /* 6 */
+ "DECR", /* 7 */
+};
+
+static const char *PIPE_BLEND_FUNC_STRING[] = {
+ "SUBTRACT", /* 0 */
+ "REV_SUBTRACT", /* 1 */
+ "ADD", /* 2 */
+ "UNKNOWN_3", /* 3 */
+ "BLEND_MIN", /* 4 */
+ "BLEND_MAX", /* 5 */
+};
+
+static const char *PIPE_BLENDFACTOR_STRING[] = {
+ "SRC_COLOR", /* 0 */
+ "DST_COLOR", /* 1 */
+ "CONST_COLOR", /* 2 */
+ "ZERO", /* 3 */
+ "UNKNOWN_4", /* 4 */
+ "UNKNOWN_5", /* 5 */
+ "UNKNOWN_6", /* 6 */
+ "SRC_ALPHA_SAT", /* 7 */
+ "INV_SRC_COLOR", /* 8 */
+ "INV_DST_COLOR", /* 9 */
+ "INV_CONST_COLOR", /* 10 */
+ "ONE", /* 11 */
+ "UNKNOWN_12", /* 12 */
+ "UNKNOWN_13", /* 13 */
+ "UNKNOWN_14", /* 14 */
+ "UNKNOWN_15", /* 15 */
+ "SRC_ALPHA", /* 16 */
+ "DST_ALPHA", /* 17 */
+ "CONST_ALPHA", /* 18 */
+ "UNKNOWN_19", /* 19 */
+ "UNKNOWN_20", /* 20 */
+ "UNKNOWN_21", /* 21 */
+ "UNKNOWN_22", /* 22 */
+ "UNKNOWN_23", /* 23 */
+ "INV_SRC_ALPHA", /* 24 */
+ "INV_DST_ALPHA", /* 25 */
+ "INV_CONST_ALPHA", /* 26 */
+
+};
+
+static inline const char
+*lima_get_compare_func_string(int func) {
+ if ((func >= 0) && (func <= 7))
+ return PIPE_COMPARE_FUNC_STRING[func];
+ else
+ return "UNKNOWN";
+}
+
+static inline const char
+*lima_get_stencil_op_string(int func) {
+ if ((func >= 0) && (func <= 7))
+ return PIPE_STENCIL_OP_STRING[func];
+ else
+ return "UNKNOWN";
+}
+
+static inline const char
+*lima_get_blend_func_string(int func) {
+ if ((func >= 0) && (func <= 5))
+ return PIPE_BLEND_FUNC_STRING[func];
+ else
+ return "UNKNOWN";
+}
+
+static inline const char
+*lima_get_blendfactor_string(int func) {
+ if ((func >= 0) && (func <= 26))
+ return PIPE_BLENDFACTOR_STRING[func];
+ else
+ return "UNKNOWN";
+}
+