mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pvr: Drop broken driver environment variable check for BXS-4-64
The Imagination PowerVR Vulkan driver is now conformant on BXS-4-64, so drop the PVR_I_WANT_A_BROKEN_VULKAN_DRIVER runtime check for this GPU. This eliminates the need for the user to explicitly opt in via an environment variable. Signed-off-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37761>
This commit is contained in:
parent
206bef1560
commit
1143363a4f
1 changed files with 29 additions and 10 deletions
|
|
@ -1044,6 +1044,20 @@ pvr_physical_device_setup_uuids(struct pvr_physical_device *const pdevice)
|
|||
sizeof(pdevice->vk.properties.shaderBinaryUUID));
|
||||
}
|
||||
|
||||
static bool pvr_device_is_conformant(const struct pvr_device_info *info)
|
||||
{
|
||||
const uint64_t bvnc = pvr_get_packed_bvnc(info);
|
||||
switch (bvnc) {
|
||||
case PVR_BVNC_PACK(36, 53, 104, 796):
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
||||
struct pvr_instance *instance,
|
||||
drmDevicePtr drm_render_device,
|
||||
|
|
@ -1104,16 +1118,6 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
|||
if (result != VK_SUCCESS)
|
||||
goto err_vk_free_display_path;
|
||||
|
||||
if (!getenv("PVR_I_WANT_A_BROKEN_VULKAN_DRIVER")) {
|
||||
result = vk_errorf(instance,
|
||||
VK_ERROR_INCOMPATIBLE_DRIVER,
|
||||
"WARNING: powervr is not a conformant Vulkan "
|
||||
"implementation. Pass "
|
||||
"PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 if you know "
|
||||
"what you're doing.");
|
||||
goto err_pvr_winsys_destroy;
|
||||
}
|
||||
|
||||
pdevice->instance = instance;
|
||||
pdevice->render_path = render_path;
|
||||
pdevice->display_path = display_path;
|
||||
|
|
@ -1125,6 +1129,21 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
|||
if (result != VK_SUCCESS)
|
||||
goto err_pvr_winsys_destroy;
|
||||
|
||||
if (!pvr_device_is_conformant(&pdevice->dev_info)) {
|
||||
if (!getenv("PVR_I_WANT_A_BROKEN_VULKAN_DRIVER")) {
|
||||
result = vk_errorf(instance,
|
||||
VK_ERROR_INCOMPATIBLE_DRIVER,
|
||||
"WARNING: powervr is not a conformant Vulkan "
|
||||
"implementation for %s. Pass "
|
||||
"PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 if you know "
|
||||
"what you're doing.",
|
||||
pdevice->dev_info.ident.public_name);
|
||||
goto err_pvr_winsys_destroy;
|
||||
}
|
||||
|
||||
vk_warn_non_conformant_implementation("powervr");
|
||||
}
|
||||
|
||||
/* Setup available memory heaps and types */
|
||||
pdevice->memory.memoryHeapCount = 1;
|
||||
pdevice->memory.memoryHeaps[0].size = pvr_compute_heap_size();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue