Path: blob/21.2-virgl/src/gallium/drivers/i915/i915_debug.h
4570 views
/**************************************************************************1*2* Copyright 2007 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627/* Authors: Keith Whitwell <[email protected]>28* Jakob Bornecrantz <[email protected]>29*/3031#ifndef I915_DEBUG_H32#define I915_DEBUG_H3334#include "util/u_debug.h"3536struct i915_screen;37struct i915_context;38struct i915_winsys_batchbuffer;3940#define DBG_BLIT 0x141#define DBG_EMIT 0x242#define DBG_ATOMS 0x443#define DBG_FLUSH 0x844#define DBG_TEXTURE 0x1045#define DBG_CONSTANTS 0x2046#define DBG_FS 0x404748extern unsigned i915_debug;4950static inline bool51I915_DBG_ON(unsigned flags)52{53return i915_debug & flags;54}5556static inline void57I915_DBG(unsigned flags, const char *fmt, ...)58{59if (I915_DBG_ON(flags)) {60va_list args;6162va_start(args, fmt);63debug_vprintf(fmt, args);64va_end(args);65}66}6768void i915_debug_init(struct i915_screen *i915);6970void i915_dump_batchbuffer(struct i915_winsys_batchbuffer *i915);7172void i915_dump_dirty(struct i915_context *i915, const char *func);7374void i915_dump_hardware_dirty(struct i915_context *i915, const char *func);7576#endif777879