turnip: implement VK_EXT_private_data

Which is using base class's implementation.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>
This commit is contained in:
Hyunjun Ko
2020-07-13 03:12:56 +00:00
committed by Marge Bot
parent 5d3fdbc52b
commit d941c6b74f
2 changed files with 60 additions and 0 deletions
+59
View File
@@ -762,6 +762,12 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->vertexAttributeInstanceRateZeroDivisor = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: {
VkPhysicalDevicePrivateDataFeaturesEXT *features =
(VkPhysicalDevicePrivateDataFeaturesEXT *)ext;
features->privateData = true;
break;
}
default:
break;
}
@@ -2699,3 +2705,56 @@ void tu_GetPhysicalDeviceMultisamplePropertiesEXT(
else
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 0, 0 };
}
VkResult
tu_CreatePrivateDataSlotEXT(VkDevice _device,
const VkPrivateDataSlotCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPrivateDataSlotEXT* pPrivateDataSlot)
{
TU_FROM_HANDLE(tu_device, device, _device);
return vk_private_data_slot_create(&device->vk,
pCreateInfo,
pAllocator,
pPrivateDataSlot);
}
void
tu_DestroyPrivateDataSlotEXT(VkDevice _device,
VkPrivateDataSlotEXT privateDataSlot,
const VkAllocationCallbacks* pAllocator)
{
TU_FROM_HANDLE(tu_device, device, _device);
vk_private_data_slot_destroy(&device->vk, privateDataSlot, pAllocator);
}
VkResult
tu_SetPrivateDataEXT(VkDevice _device,
VkObjectType objectType,
uint64_t objectHandle,
VkPrivateDataSlotEXT privateDataSlot,
uint64_t data)
{
TU_FROM_HANDLE(tu_device, device, _device);
return vk_object_base_set_private_data(&device->vk,
objectType,
objectHandle,
privateDataSlot,
data);
}
void
tu_GetPrivateDataEXT(VkDevice _device,
VkObjectType objectType,
uint64_t objectHandle,
VkPrivateDataSlotEXT privateDataSlot,
uint64_t* pData)
{
TU_FROM_HANDLE(tu_device, device, _device);
vk_object_base_get_private_data(&device->vk,
objectType,
objectHandle,
privateDataSlot,
pData);
}
+1
View File
@@ -85,6 +85,7 @@ EXTENSIONS = [
Extension('VK_EXT_vertex_attribute_divisor', 1, True),
Extension('VK_KHR_shader_draw_parameters', 1, True),
Extension('VK_KHR_variable_pointers', 1, True),
Extension('VK_EXT_private_data', 1, True),
]
MAX_API_VERSION = VkVersion(MAX_API_VERSION)