mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
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:41318a5819("vulkan: Use vk_object_base::type for debug_report") Acked-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547> (cherry picked from commitb27a2ba4fc)
This commit is contained in:
parent
59525ce756
commit
4e20a87ae0
2 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue