vulkan/wsi/x11: add support to detect if we can support rendering (v3)
This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the local device file descriptor is compatible with the descriptor retrieved from the X server via DRI3. This will stop radv binding to an X server until we have prime support in place. Hopefully apps use this API before trying to render things. v2: drop unneeded function, don't leak memory. (jekstrand) v3: also check in surface_get_support callback. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -202,7 +202,7 @@ anv_physical_device_init(struct anv_physical_device *device,
|
||||
|
||||
isl_device_init(&device->isl_dev, &device->info, swizzled);
|
||||
|
||||
close(fd);
|
||||
device->local_fd = fd;
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail:
|
||||
@@ -215,6 +215,7 @@ anv_physical_device_finish(struct anv_physical_device *device)
|
||||
{
|
||||
anv_finish_wsi(device);
|
||||
ralloc_free(device->compiler);
|
||||
close(device->local_fd);
|
||||
}
|
||||
|
||||
static const VkExtensionProperties global_extensions[] = {
|
||||
|
Reference in New Issue
Block a user