aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/util
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-05-07 20:07:14 -0500
committerMarge Bot <[email protected]>2020-05-08 17:09:27 +0000
commitab5590e92bc36e2b785a088751c433d31989d778 (patch)
treea848b6e3ecd60176127be5e8a7a0964a36a37233 /src/vulkan/util
parentd11e4738a86ecac6bb4cfaf5cad5c1d32169b18f (diff)
vulkan/object: Always include the type
This was causing problems for some of the ANV unit tests when run in release mode. Having a public struct whose layout depends on NDEBUG seems kind-of sketchy anyway. Fixes: 32f20783a51 "vulkan: Add run-time object type asserts in..." Closes: #2903 Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4959>
Diffstat (limited to 'src/vulkan/util')
-rw-r--r--src/vulkan/util/vk_object.c2
-rw-r--r--src/vulkan/util/vk_object.h2
2 files changed, 0 insertions, 4 deletions
diff --git a/src/vulkan/util/vk_object.c b/src/vulkan/util/vk_object.c
index f84a68034b0..70519dbc718 100644
--- a/src/vulkan/util/vk_object.c
+++ b/src/vulkan/util/vk_object.c
@@ -29,9 +29,7 @@ vk_object_base_init(UNUSED struct vk_device *device,
UNUSED VkObjectType obj_type)
{
base->_loader_data.loaderMagic = ICD_LOADER_MAGIC;
-#ifndef NDEBUG
base->type = obj_type;
-#endif
}
void
diff --git a/src/vulkan/util/vk_object.h b/src/vulkan/util/vk_object.h
index bd32f1ad681..d28f79d4943 100644
--- a/src/vulkan/util/vk_object.h
+++ b/src/vulkan/util/vk_object.h
@@ -36,9 +36,7 @@ struct vk_device;
struct vk_object_base {
VK_LOADER_DATA _loader_data;
-#ifndef NDEBUG
VkObjectType type;
-#endif
};
void vk_object_base_init(UNUSED struct vk_device *device,