From: Samuel Pitoiset Date: Wed, 29 Apr 2020 08:19:11 +0000 (+0200) Subject: radv: implement VK_EXT_private_data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b1138e3f0e960119a46dc08794132719c93173e;p=mesa.git radv: implement VK_EXT_private_data Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 9a34a73f821..857b888ac41 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -1,2 +1,2 @@ GL_ARB_compute_variable_group_size on Iris. -VK_EXT_private_data on ANV. +VK_EXT_private_data on ANV and RADV. diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index c2a3223ea96..c4440a20b72 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1274,6 +1274,12 @@ void radv_GetPhysicalDeviceFeatures2( features->nullDescriptor = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: { + VkPhysicalDevicePrivateDataFeaturesEXT *features = + (VkPhysicalDevicePrivateDataFeaturesEXT *)ext; + features->privateData = true; + break; + } default: break; } @@ -7778,3 +7784,48 @@ void radv_GetPhysicalDeviceMultisamplePropertiesEXT( pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 0, 0 }; } } + +VkResult radv_CreatePrivateDataSlotEXT( + VkDevice _device, + const VkPrivateDataSlotCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPrivateDataSlotEXT* pPrivateDataSlot) +{ + RADV_FROM_HANDLE(radv_device, device, _device); + return vk_private_data_slot_create(&device->vk, pCreateInfo, pAllocator, + pPrivateDataSlot); +} + +void radv_DestroyPrivateDataSlotEXT( + VkDevice _device, + VkPrivateDataSlotEXT privateDataSlot, + const VkAllocationCallbacks* pAllocator) +{ + RADV_FROM_HANDLE(radv_device, device, _device); + vk_private_data_slot_destroy(&device->vk, privateDataSlot, pAllocator); +} + +VkResult radv_SetPrivateDataEXT( + VkDevice _device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t data) +{ + RADV_FROM_HANDLE(radv_device, device, _device); + return vk_object_base_set_private_data(&device->vk, objectType, + objectHandle, privateDataSlot, + data); +} + +void radv_GetPrivateDataEXT( + VkDevice _device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlotEXT privateDataSlot, + uint64_t* pData) +{ + RADV_FROM_HANDLE(radv_device, device, _device); + vk_object_base_get_private_data(&device->vk, objectType, objectHandle, + privateDataSlot, pData); +} diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 032fd8e567f..bf9f87a0aca 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -159,6 +159,7 @@ EXTENSIONS = [ Extension('VK_EXT_pci_bus_info', 2, True), Extension('VK_EXT_pipeline_creation_feedback', 1, True), Extension('VK_EXT_post_depth_coverage', 1, 'device->rad_info.chip_class >= GFX10'), + Extension('VK_EXT_private_data', 1, True), Extension('VK_EXT_queue_family_foreign', 1, True), Extension('VK_EXT_robustness2', 1, True), # Disable sample locations on GFX10 until the CTS failures have been resolved.