[Mesa-dev] [PATCH] radv: Add support for VK_KHR_driver_properties.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Oct 25 17:11:53 UTC 2018
On Wed, Oct 17, 2018 at 1:29 PM Alex Smith <asmith at feralinteractive.com> wrote:
>
> This patch never landed in git, is that intentional?
It turned out the CTS version we did our conformance submission in was
rejected for some reason in the CTS test for this ext so had to make
some adjustments. It is upstream now.
>
> On Mon, 1 Oct 2018 at 17:46, Jason Ekstrand <jason at jlekstrand.net> wrote:
>>
>> On Sun, Sep 30, 2018 at 1:04 PM Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
>>>
>>> ---
>>> src/amd/vulkan/radv_device.c | 27 +++++++++++++++++++++++++++
>>> src/amd/vulkan/radv_extensions.py | 1 +
>>> 2 files changed, 28 insertions(+)
>>>
>>> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
>>> index f7752eac83b..fe7e7f7f6ac 100644
>>> --- a/src/amd/vulkan/radv_device.c
>>> +++ b/src/amd/vulkan/radv_device.c
>>> @@ -1196,6 +1196,33 @@ void radv_GetPhysicalDeviceProperties2(
>>> properties->conservativeRasterizationPostDepthCoverage = VK_FALSE;
>>> break;
>>> }
>>> + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: {
>>> + VkPhysicalDeviceDriverPropertiesKHR *driver_props =
>>> + (VkPhysicalDeviceDriverPropertiesKHR *) ext;
>>> +
>>> + driver_props->driverID = VK_DRIVER_ID_MESA_RADV_KHR;
>>> + memset(driver_props->driverName, 0, VK_MAX_DRIVER_NAME_SIZE_KHR);
>>> + strcpy(driver_props->driverName, "radv");
>>> +
>>> + memset(driver_props->driverInfo, 0, VK_MAX_DRIVER_INFO_SIZE_KHR);
>>> + snprintf(driver_props->driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR,
>>> + "Mesa " PACKAGE_VERSION
>>> +#ifdef MESA_GIT_SHA1
>>> + " ("MESA_GIT_SHA1")"
>>> +#endif
>>> + " (LLVM %i.%i.%i)",
>>
>>
>> I think %d is more customary, but I don't care. Assuming you actually pass 1.1.0.2,
>>
>> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>>
>>>
>>> + (HAVE_LLVM >> 8) & 0xff, HAVE_LLVM & 0xff,
>>> + MESA_LLVM_VERSION_PATCH);
>>> +
>>> + driver_props->conformanceVersion = (VkConformanceVersionKHR) {
>>> + .major = 1,
>>> + .minor = 1,
>>> + .subminor = 0,
>>> + .patch = 2,
>>> + };
>>> + break;
>>> + }
>>> +
>>> default:
>>> break;
>>> }
>>> diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
>>> index 584926df390..8df5da76ed5 100644
>>> --- a/src/amd/vulkan/radv_extensions.py
>>> +++ b/src/amd/vulkan/radv_extensions.py
>>> @@ -59,6 +59,7 @@ EXTENSIONS = [
>>> Extension('VK_KHR_device_group', 1, True),
>>> Extension('VK_KHR_device_group_creation', 1, True),
>>> Extension('VK_KHR_draw_indirect_count', 1, True),
>>> + Extension('VK_KHR_driver_properties', 1, True),
>>> Extension('VK_KHR_external_fence', 1, 'device->rad_info.has_syncobj_wait_for_submit'),
>>> Extension('VK_KHR_external_fence_capabilities', 1, True),
>>> Extension('VK_KHR_external_fence_fd', 1, 'device->rad_info.has_syncobj_wait_for_submit'),
>>> --
>>> 2.19.0
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list