pvr: Add VK_KHR_driver_properties

This commit will implement the VK_KHR_driver_properties extension.
At the moment, the extension is disabled, because the current conformance
test version does not include the Imagination driver ID. The extension
can be enabled after conformance test version 1.3.6.0.

Co-Authored-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24927>
This commit is contained in:
Vlad Schiller 2023-08-07 15:06:15 +01:00 committed by Marge Bot
parent 34813e13db
commit 6d2d74fa1c

View File

@ -39,6 +39,7 @@
#include <vulkan/vulkan.h>
#include <xf86drm.h>
#include "git_sha1.h"
#include "hwdef/rogue_hw_utils.h"
#include "pvr_bo.h"
#include "pvr_border.h"
@ -157,6 +158,12 @@ static void pvr_physical_device_get_supported_extensions(
{
*extensions = (struct vk_device_extension_table){
.KHR_copy_commands2 = true,
/* TODO: enable this extension when the conformance tests get
* updated to version 1.3.6.0, the current version does not
* include the imagination driver ID, which will make a dEQP
* test fail
*/
.KHR_driver_properties = false,
.KHR_external_memory = true,
.KHR_external_memory_fd = true,
.KHR_format_feature_flags2 = true,
@ -920,6 +927,23 @@ pvr_get_physical_device_properties_1_2(struct pvr_physical_device *pdevice,
{
assert(p->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES);
/* VK_KHR_driver_properties */
p->driverID = VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA;
memset(p->driverName, 0, sizeof(p->driverName));
snprintf(p->driverName,
VK_MAX_DRIVER_NAME_SIZE,
"Imagination open-source Mesa driver");
memset(p->driverInfo, 0, sizeof(p->driverInfo));
snprintf(p->driverInfo,
VK_MAX_DRIVER_INFO_SIZE,
("Mesa " PACKAGE_VERSION MESA_GIT_SHA1));
p->conformanceVersion = (VkConformanceVersion){
.major = 1,
.minor = 3,
.subminor = 4,
.patch = 1,
};
/* VK_KHR_timeline_semaphore */
p->maxTimelineSemaphoreValueDifference = UINT64_MAX;
}