Skip to content
Snippets Groups Projects
Commit 4e20a87a authored by Erik Faye-Lund's avatar Erik Faye-Lund Committed by Dylan Baker
Browse files

vulkan: explicitly cast object-type enum


VkObjectType and VkDebugReportObjectTypeEXT has the same enum-values.
Why the Vulkan WG thought this was a good idea, beats me. But it's what
we have to live with now.

Anyway, instead of having a statement that implicitly casts two
different values from the former to the latter, let's fully relsove the
type as the former, and cast the value when using it instead.

Fixes: 41318a58 ("vulkan: Use vk_object_base::type for debug_report")
Acked-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
Part-of: <mesa/mesa!15547>
(cherry picked from commit b27a2ba4)
parent 59525ce7
No related branches found
No related tags found
No related merge requests found
......@@ -1164,7 +1164,7 @@
"description": "vulkan: explicitly cast object-type enum",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"because_sha": "41318a58196d385ce97041e16a055baf892e38cb"
},
{
......
......@@ -150,8 +150,9 @@ vk_debug_report(struct vk_instance *instance,
const char* pLayerPrefix,
const char *pMessage)
{
VkDebugReportObjectTypeEXT object_type =
VkObjectType object_type =
object ? object->type : VK_OBJECT_TYPE_UNKNOWN;
debug_report(instance, flags, object_type, (uint64_t)(uintptr_t)object,
location, messageCode, pLayerPrefix, pMessage);
debug_report(instance, flags, (VkDebugReportObjectTypeEXT)object_type,
(uint64_t)(uintptr_t)object, location, messageCode,
pLayerPrefix, pMessage);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment