1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright (C) 2019 Connor Abbott <cwabbott0@gmail.com> 3bf215546Sopenharmony_ci * Copyright (C) 2019 Lyude Paul <thatslyude@gmail.com> 4bf215546Sopenharmony_ci * Copyright (C) 2019 Ryan Houdek <Sonicadvance1@gmail.com> 5bf215546Sopenharmony_ci * Copyright (C) 2019-2020 Collabora, Ltd. 6bf215546Sopenharmony_ci * 7bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 8bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 9bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 10bf215546Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11bf215546Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 12bf215546Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 13bf215546Sopenharmony_ci * 14bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next 15bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 16bf215546Sopenharmony_ci * Software. 17bf215546Sopenharmony_ci * 18bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21bf215546Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22bf215546Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23bf215546Sopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24bf215546Sopenharmony_ci * SOFTWARE. 25bf215546Sopenharmony_ci */ 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci/* Prints shared with the disassembler */ 28bf215546Sopenharmony_ci 29bf215546Sopenharmony_ci#include "bi_print_common.h" 30bf215546Sopenharmony_ci 31bf215546Sopenharmony_ciconst char * 32bf215546Sopenharmony_cibi_message_type_name(enum bifrost_message_type T) 33bf215546Sopenharmony_ci{ 34bf215546Sopenharmony_ci switch (T) { 35bf215546Sopenharmony_ci case BIFROST_MESSAGE_NONE: return ""; 36bf215546Sopenharmony_ci case BIFROST_MESSAGE_VARYING: return "vary"; 37bf215546Sopenharmony_ci case BIFROST_MESSAGE_ATTRIBUTE: return "attr"; 38bf215546Sopenharmony_ci case BIFROST_MESSAGE_TEX: return "tex"; 39bf215546Sopenharmony_ci case BIFROST_MESSAGE_VARTEX: return "vartex"; 40bf215546Sopenharmony_ci case BIFROST_MESSAGE_LOAD: return "load"; 41bf215546Sopenharmony_ci case BIFROST_MESSAGE_STORE: return "store"; 42bf215546Sopenharmony_ci case BIFROST_MESSAGE_ATOMIC: return "atomic"; 43bf215546Sopenharmony_ci case BIFROST_MESSAGE_BARRIER: return "barrier"; 44bf215546Sopenharmony_ci case BIFROST_MESSAGE_BLEND: return "blend"; 45bf215546Sopenharmony_ci case BIFROST_MESSAGE_TILE: return "tile"; 46bf215546Sopenharmony_ci case BIFROST_MESSAGE_Z_STENCIL: return "z_stencil"; 47bf215546Sopenharmony_ci case BIFROST_MESSAGE_ATEST: return "atest"; 48bf215546Sopenharmony_ci case BIFROST_MESSAGE_JOB: return "job"; 49bf215546Sopenharmony_ci case BIFROST_MESSAGE_64BIT: return "64"; 50bf215546Sopenharmony_ci default: return "XXX reserved"; 51bf215546Sopenharmony_ci } 52bf215546Sopenharmony_ci} 53bf215546Sopenharmony_ci 54bf215546Sopenharmony_ciconst char * 55bf215546Sopenharmony_cibi_flow_control_name(enum bifrost_flow mode) 56bf215546Sopenharmony_ci{ 57bf215546Sopenharmony_ci switch (mode) { 58bf215546Sopenharmony_ci case BIFROST_FLOW_END: return "eos"; 59bf215546Sopenharmony_ci case BIFROST_FLOW_NBTB_PC: return "nbb br_pc"; 60bf215546Sopenharmony_ci case BIFROST_FLOW_NBTB_UNCONDITIONAL: return "nbb r_uncond"; 61bf215546Sopenharmony_ci case BIFROST_FLOW_NBTB: return "nbb"; 62bf215546Sopenharmony_ci case BIFROST_FLOW_BTB_UNCONDITIONAL: return "bb r_uncond"; 63bf215546Sopenharmony_ci case BIFROST_FLOW_BTB_NONE: return "bb"; 64bf215546Sopenharmony_ci case BIFROST_FLOW_WE_UNCONDITIONAL: return "we r_uncond"; 65bf215546Sopenharmony_ci case BIFROST_FLOW_WE: return "we"; 66bf215546Sopenharmony_ci default: return "XXX"; 67bf215546Sopenharmony_ci } 68bf215546Sopenharmony_ci} 69