1848b8605Smrg/* 2848b8605Smrg * Copyright © 2012 Rob Clark <robclark@freedesktop.org> 3848b8605Smrg * 4848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5848b8605Smrg * copy of this software and associated documentation files (the "Software"), 6848b8605Smrg * to deal in the Software without restriction, including without limitation 7848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the 9848b8605Smrg * Software is furnished to do so, subject to the following conditions: 10848b8605Smrg * 11848b8605Smrg * The above copyright notice and this permission notice (including the next 12848b8605Smrg * paragraph) shall be included in all copies or substantial portions of the 13848b8605Smrg * Software. 14848b8605Smrg * 15848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16848b8605Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19848b8605Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20848b8605Smrg * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21848b8605Smrg * SOFTWARE. 22848b8605Smrg */ 23848b8605Smrg 24848b8605Smrg#ifndef DISASM_H_ 25848b8605Smrg#define DISASM_H_ 26848b8605Smrg 27b8e80941Smrg#include <stdio.h> 28b8e80941Smrg#include <stdbool.h> 29b8e80941Smrg 30b8e80941Smrg#include "compiler/shader_enums.h" 31b8e80941Smrg#include "util/u_debug.h" 32848b8605Smrg 33848b8605Smrg/* bitmask of debug flags */ 34848b8605Smrgenum debug_t { 35848b8605Smrg PRINT_RAW = 0x1, /* dump raw hexdump */ 36848b8605Smrg PRINT_VERBOSE = 0x2, 37848b8605Smrg}; 38848b8605Smrg 39b8e80941Smrgint disasm_a2xx(uint32_t *dwords, int sizedwords, int level, gl_shader_stage type); 40b8e80941Smrgint disasm_a3xx(uint32_t *dwords, int sizedwords, int level, FILE *out, unsigned gpu_id); 41848b8605Smrgvoid disasm_set_debug(enum debug_t debug); 42848b8605Smrg 43848b8605Smrg#endif /* DISASM_H_ */ 44