X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fi915%2Fi915_debug.h;h=0f12a592ae898fe24967056aebb5264782706e44;hb=d3fdd66401b3c3853162d13b452cd19c03354ede;hp=8aa09f9c1f2d5f840df141994ab4fc91d3afee3d;hpb=abbb1bde06990cb15c82ebcdb9ac07b00cb0ab4f;p=mesa.git diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h index 8aa09f9c1f2..0f12a592ae8 100644 --- a/src/gallium/drivers/i915/i915_debug.h +++ b/src/gallium/drivers/i915/i915_debug.h @@ -1,6 +1,6 @@ /************************************************************************** * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * Copyright 2007 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -18,14 +18,14 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * **************************************************************************/ -/* Authors: Keith Whitwell +/* Authors: Keith Whitwell * Jakob Bornecrantz */ @@ -47,13 +47,14 @@ struct i915_winsys_batchbuffer; extern unsigned i915_debug; -static INLINE boolean +#ifdef DEBUG +static inline boolean I915_DBG_ON(unsigned flags) { return i915_debug & flags; } -static INLINE void +static inline void I915_DBG(unsigned flags, const char *fmt, ...) { if (I915_DBG_ON(flags)) { @@ -64,6 +65,10 @@ I915_DBG(unsigned flags, const char *fmt, ...) va_end(args); } } +#else +#define I915_DBG_ON(flags) (0) +static inline void I915_DBG(unsigned flags, const char *fmt, ...) {} +#endif void i915_debug_init(struct i915_screen *i915);