diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-09-30 20:02:04 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-10-25 16:14:43 +0200 |
commit | 9d40ec2cf6ec6d3d9d78deead9f334523843fa48 (patch) | |
tree | 87b8363cdefcfef1a93f80cb9dde689e79c777a1 | |
parent | e27902a261361e8a7980db14138ef13753db196d (diff) |
radv: Add support for VK_KHR_driver_properties.
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_device.c | 24 | ||||
-rw-r--r-- | src/amd/vulkan/radv_extensions.py | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index cf1132098d2..8e43a3aab58 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -43,6 +43,7 @@ #include "ac_llvm_util.h" #include "vk_format.h" #include "sid.h" +#include "git_sha1.h" #include "gfx9d.h" #include "addrlib/gfx9/chip/gfx9_enum.h" #include "util/build_id.h" @@ -1207,6 +1208,29 @@ void radv_GetPhysicalDeviceProperties2( properties->pciFunction = pdevice->bus_info.func; 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 " (" MESA_GIT_SHA1 ")" + " (LLVM %d.%d.%d)", + (HAVE_LLVM >> 8) & 0xff, HAVE_LLVM & 0xff, + MESA_LLVM_VERSION_PATCH); + + driver_props->conformanceVersion = (VkConformanceVersionKHR) { + .major = 1, + .minor = 1, + .subminor = 2, + .patch = 0, + }; + break; + } default: break; } diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 125ba831055..0024bf0efe1 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'), |