Path: blob/21.2-virgl/src/gallium/frontends/d3d10umd/Debug.h
4566 views
#pragma once12#include "DriverIncludes.h"3#include "util/u_debug.h"456#ifdef __cplusplus7extern "C" {8#endif91011#define ST_DEBUG_OLD_TEX_OPS (1 << 0)12#define ST_DEBUG_TGSI (1 << 1)131415#ifdef DEBUG16extern unsigned st_debug;17#else18#define st_debug 019#endif202122#ifdef DEBUG23void st_debug_parse(void);24#else25#define st_debug_parse() ((void)0)26#endif272829void30DebugPrintf(const char *format, ...);313233void34CheckHResult(HRESULT hr, const char *function, unsigned line);353637#define CHECK_NTSTATUS(status) \38CheckNTStatus(status, __FUNCTION__, __LINE__)394041#define CHECK_HRESULT(hr) \42CheckHResult(hr, __FUNCTION__, __LINE__)434445void46AssertFail(const char *expr, const char *file, unsigned line, const char *function);474849#ifndef NDEBUG50#define ASSERT(expr) ((expr) ? (void)0 : AssertFail(#expr, __FILE__, __LINE__, __FUNCTION__))51#else52#define ASSERT(expr) do { } while (0 && (expr))53#endif545556#if 0 && !defined(NDEBUG)57#define LOG_ENTRYPOINT() DebugPrintf("%s\n", __FUNCTION__)58#else59#define LOG_ENTRYPOINT() (void)060#endif6162#define LOG_UNSUPPORTED_ENTRYPOINT() DebugPrintf("%s XXX\n", __FUNCTION__)6364#define LOG_UNSUPPORTED(expr) \65do { if (expr) DebugPrintf("%s:%d XXX %s\n", __FUNCTION__, __LINE__, #expr); } while(0)666768#ifdef __cplusplus69}70#endif71727374