aboutsummaryrefslogtreecommitdiff
path: root/layers/vk_layer_table.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-06-16 10:21:19 -0600
committerMark Lobodzinski <mark@lunarg.com>2017-06-16 13:17:33 -0600
commit19e9b3c9be4953a7372bdc2b32450c6c1fafd847 (patch)
tree71d3d916d67e8b28574351197d7802a42428ac4f /layers/vk_layer_table.cpp
parent091327496dd23b73399fa7b8809c65bcbd03d29e (diff)
downloadusermoji-19e9b3c9be4953a7372bdc2b32450c6c1fafd847.tar.xz
layers: Remove debug code from vk_layer_table.cpp
Change-Id: I146461055a1f925ed17c1433c8451aa8a65c5578
Diffstat (limited to 'layers/vk_layer_table.cpp')
-rw-r--r--layers/vk_layer_table.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/layers/vk_layer_table.cpp b/layers/vk_layer_table.cpp
index dcf5c47c..4a033b9a 100644
--- a/layers/vk_layer_table.cpp
+++ b/layers/vk_layer_table.cpp
@@ -25,8 +25,6 @@
static device_table_map tableMap;
static instance_table_map tableInstanceMap;
-#define DISPATCH_MAP_DEBUG 0
-
// Map lookup must be thread safe
VkLayerDispatchTable *device_dispatch_table(void *object) {
dispatch_key key = get_dispatch_key(object);
@@ -38,29 +36,12 @@ VkLayerDispatchTable *device_dispatch_table(void *object) {
VkLayerInstanceDispatchTable *instance_dispatch_table(void *object) {
dispatch_key key = get_dispatch_key(object);
instance_table_map::const_iterator it = tableInstanceMap.find((void *)key);
-#if DISPATCH_MAP_DEBUG
- if (it != tableInstanceMap.end()) {
- fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: 0x%p\n", &tableInstanceMap, object,
- key, it->second);
- } else {
- fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: UNKNOWN\n", &tableInstanceMap,
- object, key);
- }
-#endif
assert(it != tableInstanceMap.end() && "Not able to find instance dispatch entry");
return it->second;
}
void destroy_dispatch_table(device_table_map &map, dispatch_key key) {
device_table_map::const_iterator it = map.find((void *)key);
-#if DISPATCH_MAP_DEBUG
- if (it != map.end()) {
- fprintf(stderr, "destroy device dispatch_table: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, it->second);
- } else {
- fprintf(stderr, "destroy device dispatch table: map: 0x%p, key: 0x%p, table: UNKNOWN\n", &map, key);
- assert(it != map.end());
- }
-#endif
if (it != map.end()) {
delete it->second;
map.erase(it);
@@ -69,14 +50,6 @@ void destroy_dispatch_table(device_table_map &map, dispatch_key key) {
void destroy_dispatch_table(instance_table_map &map, dispatch_key key) {
instance_table_map::const_iterator it = map.find((void *)key);
-#if DISPATCH_MAP_DEBUG
- if (it != map.end()) {
- fprintf(stderr, "destroy instance dispatch_table: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, it->second);
- } else {
- fprintf(stderr, "destroy instance dispatch table: map: 0x%p, key: 0x%p, table: UNKNOWN\n", &map, key);
- assert(it != map.end());
- }
-#endif
if (it != map.end()) {
delete it->second;
map.erase(it);
@@ -90,15 +63,6 @@ void destroy_instance_dispatch_table(dispatch_key key) { destroy_dispatch_table(
VkLayerDispatchTable *get_dispatch_table(device_table_map &map, void *object) {
dispatch_key key = get_dispatch_key(object);
device_table_map::const_iterator it = map.find((void *)key);
-#if DISPATCH_MAP_DEBUG
- if (it != map.end()) {
- fprintf(stderr, "device_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: 0x%p\n", &tableInstanceMap, object,
- key, it->second);
- } else {
- fprintf(stderr, "device_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: UNKNOWN\n", &tableInstanceMap, object,
- key);
- }
-#endif
assert(it != map.end() && "Not able to find device dispatch entry");
return it->second;
}
@@ -106,15 +70,6 @@ VkLayerDispatchTable *get_dispatch_table(device_table_map &map, void *object) {
VkLayerInstanceDispatchTable *get_dispatch_table(instance_table_map &map, void *object) {
dispatch_key key = get_dispatch_key(object);
instance_table_map::const_iterator it = map.find((void *)key);
-#if DISPATCH_MAP_DEBUG
- if (it != map.end()) {
- fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: 0x%p\n", &tableInstanceMap, object,
- key, it->second);
- } else {
- fprintf(stderr, "instance_dispatch_table: map: 0x%p, object: 0x%p, key: 0x%p, table: UNKNOWN\n", &tableInstanceMap,
- object, key);
- }
-#endif
assert(it != map.end() && "Not able to find instance dispatch entry");
return it->second;
}
@@ -152,13 +107,7 @@ VkLayerInstanceDispatchTable *initInstanceTable(VkInstance instance, const PFN_v
if (it == map.end()) {
pTable = new VkLayerInstanceDispatchTable;
map[(void *)key] = pTable;
-#if DISPATCH_MAP_DEBUG
- fprintf(stderr, "New, Instance: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, pTable);
-#endif
} else {
-#if DISPATCH_MAP_DEBUG
- fprintf(stderr, "Instance: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, it->second);
-#endif
return it->second;
}
@@ -183,13 +132,7 @@ VkLayerDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProc
if (it == map.end()) {
pTable = new VkLayerDispatchTable;
map[(void *)key] = pTable;
-#if DISPATCH_MAP_DEBUG
- fprintf(stderr, "New, Device: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, pTable);
-#endif
} else {
-#if DISPATCH_MAP_DEBUG
- fprintf(stderr, "Device: map: 0x%p, key: 0x%p, table: 0x%p\n", &map, key, it->second);
-#endif
return it->second;
}