mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
vk/device: Provide proper NULL handling in anv_device_free
The Vulkan spec does not specify that the free function provided to CreateInstance must handle NULL properly so we do it in the wrapper. If this ever changes in the spec, we can delete the extra 2 lines.
This commit is contained in:
parent
4c8e1e5888
commit
f4748bff59
1 changed files with 3 additions and 0 deletions
|
|
@ -1057,6 +1057,9 @@ void
|
|||
anv_device_free(struct anv_device * device,
|
||||
void * mem)
|
||||
{
|
||||
if (mem == NULL)
|
||||
return;
|
||||
|
||||
return device->instance->pfnFree(device->instance->pAllocUserData,
|
||||
mem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue