Path: blob/21.2-virgl/src/panfrost/bifrost/bi_print_common.c
4564 views
/*1* Copyright (C) 2019 Connor Abbott <[email protected]>2* Copyright (C) 2019 Lyude Paul <[email protected]>3* Copyright (C) 2019 Ryan Houdek <[email protected]>4* Copyright (C) 2019-2020 Collabora, Ltd.5*6* Permission is hereby granted, free of charge, to any person obtaining a7* copy of this software and associated documentation files (the "Software"),8* to deal in the Software without restriction, including without limitation9* the rights to use, copy, modify, merge, publish, distribute, sublicense,10* and/or sell copies of the Software, and to permit persons to whom the11* Software is furnished to do so, subject to the following conditions:12*13* The above copyright notice and this permission notice (including the next14* paragraph) shall be included in all copies or substantial portions of the15* Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR18* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,19* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL20* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER21* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,22* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE23* SOFTWARE.24*/2526/* Prints shared with the disassembler */2728#include "bi_print_common.h"2930const char *31bi_message_type_name(enum bifrost_message_type T)32{33switch (T) {34case BIFROST_MESSAGE_NONE: return "";35case BIFROST_MESSAGE_VARYING: return "vary";36case BIFROST_MESSAGE_ATTRIBUTE: return "attr";37case BIFROST_MESSAGE_TEX: return "tex";38case BIFROST_MESSAGE_VARTEX: return "vartex";39case BIFROST_MESSAGE_LOAD: return "load";40case BIFROST_MESSAGE_STORE: return "store";41case BIFROST_MESSAGE_ATOMIC: return "atomic";42case BIFROST_MESSAGE_BARRIER: return "barrier";43case BIFROST_MESSAGE_BLEND: return "blend";44case BIFROST_MESSAGE_TILE: return "tile";45case BIFROST_MESSAGE_Z_STENCIL: return "z_stencil";46case BIFROST_MESSAGE_ATEST: return "atest";47case BIFROST_MESSAGE_JOB: return "job";48case BIFROST_MESSAGE_64BIT: return "64";49default: return "XXX reserved";50}51}5253const char *54bi_flow_control_name(enum bifrost_flow mode)55{56switch (mode) {57case BIFROST_FLOW_END: return "eos";58case BIFROST_FLOW_NBTB_PC: return "nbb br_pc";59case BIFROST_FLOW_NBTB_UNCONDITIONAL: return "nbb r_uncond";60case BIFROST_FLOW_NBTB: return "nbb";61case BIFROST_FLOW_BTB_UNCONDITIONAL: return "bb r_uncond";62case BIFROST_FLOW_BTB_NONE: return "bb";63case BIFROST_FLOW_WE_UNCONDITIONAL: return "we r_uncond";64case BIFROST_FLOW_WE: return "we";65default: return "XXX";66}67}686970