pvr: Don't emit critical warning all the time
Instead of unconditionally emitting a warning to applications about the missing environment variable to enable the driver, only check it after determining that the device actually matches. Signed-off-by: Benjamin Otte <otte@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31293>
This commit is contained in:
@@ -721,15 +721,6 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
||||
char *render_path;
|
||||
VkResult result;
|
||||
|
||||
if (!getenv("PVR_I_WANT_A_BROKEN_VULKAN_DRIVER")) {
|
||||
return 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.");
|
||||
}
|
||||
|
||||
render_path = vk_strdup(&instance->vk.alloc,
|
||||
drm_render_device->nodes[DRM_NODE_RENDER],
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
|
||||
@@ -755,6 +746,16 @@ 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;
|
||||
|
Reference in New Issue
Block a user