panfrost: Support SHADERLESS mode everywhere
[mesa.git] / src / panfrost / bifrost / bi_print.c
index 7b8164e4f43367d8f7640512676e6697450c25ca..7b231c39b65ee0850e16f4baf19fcae5da3e586f 100644 (file)
  */
 
 #include "bi_print.h"
-
-const char *
-bi_clause_type_name(enum bifrost_clause_type T)
-{
-        switch (T) {
-        case BIFROST_CLAUSE_NONE: return "";
-        case BIFROST_CLAUSE_LOAD_VARY: return "load_vary";
-        case BIFROST_CLAUSE_UBO: return "ubo";
-        case BIFROST_CLAUSE_TEX: return "tex";
-        case BIFROST_CLAUSE_SSBO_LOAD: return "load";
-        case BIFROST_CLAUSE_SSBO_STORE: return "store";
-        case BIFROST_CLAUSE_BLEND: return "blend";
-        case BIFROST_CLAUSE_FRAGZ: return "fragz";
-        case BIFROST_CLAUSE_ATEST: return "atest";
-        case BIFROST_CLAUSE_64BIT: return "64";
-        default: return "??";
-        }
-}
-
-const char *
-bi_output_mod_name(enum bifrost_outmod mod)
-{
-        switch (mod) {
-        case BIFROST_NONE: return "";
-        case BIFROST_POS: return ".pos";
-        case BIFROST_SAT_SIGNED: return ".sat_signed";
-        case BIFROST_SAT: return ".sat";
-        default: return "invalid";
-        }
-}
-
-const char *
-bi_minmax_mode_name(enum bifrost_minmax_mode mod)
-{
-        switch (mod) {
-        case BIFROST_MINMAX_NONE: return "";
-        case BIFROST_NAN_WINS: return ".nan_wins";
-        case BIFROST_SRC1_WINS: return ".src1_wins";
-        case BIFROST_SRC0_WINS: return ".src0_wins";
-        default: return "invalid";
-        }
-}
-
-const char *
-bi_round_mode_name(enum bifrost_roundmode mod)
-{
-        switch (mod) {
-        case BIFROST_RTE: return "";
-        case BIFROST_RTP: return ".rtp";
-        case BIFROST_RTN: return ".rtn";
-        case BIFROST_RTZ: return ".rtz";
-        default: return "invalid";
-        }
-}
-
-const char *
-bi_csel_cond_name(enum bifrost_csel_cond cond)
-{
-        switch (cond) {
-        case BIFROST_FEQ_F: return "feq.f";
-        case BIFROST_FGT_F: return "fgt.f";
-        case BIFROST_FGE_F: return "fge.f";
-        case BIFROST_IEQ_F: return "ieq.f";
-        case BIFROST_IGT_I: return "igt.i";
-        case BIFROST_IGE_I: return "uge.i";
-        case BIFROST_UGT_I: return "ugt.i";
-        case BIFROST_UGE_I: return "uge.i";
-        default: return "invalid";
-        }
-}
-
-const char *
-bi_interp_mode_name(enum bifrost_interp_mode mode)
-{
-        switch (mode) {
-        case BIFROST_INTERP_PER_FRAG: return ".per_frag";
-        case BIFROST_INTERP_CENTROID: return ".centroid";
-        case BIFROST_INTERP_DEFAULT: return "";
-        case BIFROST_INTERP_EXPLICIT: return ".explicit";
-        default: return ".unknown";
-        }
-}
-
-const char *
-bi_ldst_type_name(enum bifrost_ldst_type type)
-{
-        switch (type) {
-        case BIFROST_LDST_F16: return "f16";
-        case BIFROST_LDST_F32: return "f32";
-        case BIFROST_LDST_I32: return "i32";
-        case BIFROST_LDST_U32: return "u32";
-        default: return "invalid";
-        }
-}
-
-/* The remaining functions in this file are for IR-internal
- * structures; the disassembler doesn't use them */
+#include "bi_print_common.h"
 
 const char *
 bi_class_name(enum bi_class cl)
@@ -149,13 +53,13 @@ bi_class_name(enum bi_class cl)
         case BI_MINMAX: return "minmax";
         case BI_MOV: return "mov";
         case BI_SELECT: return "select";
-        case BI_SHIFT: return "shift";
         case BI_STORE: return "store";
         case BI_STORE_VAR: return "store_var";
         case BI_SPECIAL: return "special";
         case BI_TABLE: return "table";
         case BI_TEX: return "tex";
         case BI_ROUND: return "round";
+        case BI_IMUL: return "imul";
         default: return "unknown_class";
         }
 }