diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2024-03-09 04:00:44 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-22 18:22:34 +0000 |
commit | 1ac1c0843f5be6e51ad3a10cd96eeec53df0d9d0 (patch) | |
tree | dfc44871f02723006cd4da2c65eafdeb3117e16b /src/gallium/winsys/i915/drm/i915_drm_buffer.c | |
parent | 0578f13fc93edf954b75ecf206410366b3712ff2 (diff) |
treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible
This is achieved by the following steps:
#ifndef DEBUG => #if !MESA_DEBUG
defined(DEBUG) => MESA_DEBUG
#ifdef DEBUG => #if MESA_DEBUG
This is done by replace in vscode
excludes
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu
These are safe because those files should keep DEBUG macro is already excluded;
and not directly replace DEBUG, as we have some symbols around it.
Use debug or NDEBUG instead of DEBUG in comments when proper
This for reduce the usage of DEBUG,
so it's easier migrating to MESA_DEBUG
These are found when migrating DEBUG to MESA_DEBUG,
these are all comment update, so it's safe
Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually
DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG
!DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG)
Replace the DEBUG present in comment with proper new MESA_DEBUG manually
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
Diffstat (limited to 'src/gallium/winsys/i915/drm/i915_drm_buffer.c')
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c index de8f0a8ccd8..9c0086e9f8a 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c +++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c @@ -225,7 +225,7 @@ i915_drm_buffer_destroy(struct i915_winsys *iws, { drm_intel_bo_unreference(intel_bo(buffer)); -#ifdef DEBUG +#if MESA_DEBUG i915_drm_buffer(buffer)->magic = 0; i915_drm_buffer(buffer)->bo = NULL; #endif |