Mesa (staging/20.1): util/os_memory: never use os_memory_debug.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 7 16:25:26 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: dc28a916e92b797ae0c1e62804628c35b2ae813c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc28a916e92b797ae0c1e62804628c35b2ae813c

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed May  6 15:33:37 2020 +0200

util/os_memory: never use os_memory_debug.h

This is currently broken hard, because this code is being used in more
places that it used to be, and fixing that is prohibitively hard right
now.

This is far from ideal, as it leaves the same inconsistency in the
EMBEDDED_DEVICE code-path. But that only used by VMWare, so it's
probably better if they fix it, as they know their requirements better
than we do.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2911
Fixes: 76f79db3f5d ("util: stop including files from mesa/main")
Acked-by: Jose Fonseca <jfonseca at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4919>
(cherry picked from commit 7ba2333cc17e7f0a1520866bcfd60a991d34295e)

---

 .pick_status.json                           | 2 +-
 src/gallium/state_trackers/wgl/stw_device.c | 8 --------
 src/util/os_memory.h                        | 6 ------
 3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 34ad52e5b87..94876051b82 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
         "description": "util/os_memory: never use os_memory_debug.h",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "76f79db3f5d8492370c92080b5bbea7e31827b75"
     },
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index b4cf7b7d667..f5064da9f29 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -112,10 +112,6 @@ stw_init(const struct stw_winsys *stw_winsys)
    stw_dev = &stw_dev_storage;
    memset(stw_dev, 0, sizeof(*stw_dev));
 
-#ifdef DEBUG
-   stw_dev->memdbg_no = debug_memory_begin();
-#endif
-
    stw_dev->stw_winsys = stw_winsys;
 
    stw_dev->stapi = stw_st_create_api();
@@ -230,10 +226,6 @@ stw_cleanup(void)
    _glapi_destroy_multithread();
 #endif
 
-#ifdef DEBUG
-   debug_memory_end(stw_dev->memdbg_no);
-#endif
-
    stw_tls_cleanup();
 
    stw_dev = NULL;
diff --git a/src/util/os_memory.h b/src/util/os_memory.h
index bfb70815118..b191cf20584 100644
--- a/src/util/os_memory.h
+++ b/src/util/os_memory.h
@@ -34,8 +34,6 @@
 #ifndef _OS_MEMORY_H_
 #define _OS_MEMORY_H_
 
-#include "detect_os.h"
-
 #if defined(EMBEDDED_DEVICE)
 
 #ifdef __cplusplus
@@ -67,10 +65,6 @@ os_realloc_aligned(void *ptr, size_t oldsize, size_t newsize, size_t alignemnt);
 }
 #endif
 
-#elif DETECT_OS_WINDOWS && defined(DEBUG) && !defined(DEBUG_MEMORY_IMPLEMENTATION)
-
-#  include "os_memory_debug.h"
-
 #else
 
 #  include "os_memory_stdc.h"



More information about the mesa-commit mailing list