vulkan/vk_device: Add a drm_fd field
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>
This commit is contained in:
parent
95dee5150a
commit
fdb636e3a6
|
@ -93,6 +93,8 @@ vk_device_init(struct vk_device *device,
|
|||
|
||||
list_inithead(&device->queues);
|
||||
|
||||
device->drm_fd = -1;
|
||||
|
||||
#ifdef ANDROID
|
||||
mtx_init(&device->swapchain_private_mtx, mtx_plain);
|
||||
device->swapchain_private = NULL;
|
||||
|
|
|
@ -65,6 +65,9 @@ struct vk_device {
|
|||
*/
|
||||
VkResult (*check_status)(struct vk_device *device);
|
||||
|
||||
/* Set by vk_device_set_drm_fd() */
|
||||
int drm_fd;
|
||||
|
||||
#ifdef ANDROID
|
||||
mtx_t swapchain_private_mtx;
|
||||
struct hash_table *swapchain_private;
|
||||
|
@ -81,6 +84,12 @@ vk_device_init(struct vk_device *device,
|
|||
const VkDeviceCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *alloc);
|
||||
|
||||
static inline void
|
||||
vk_device_set_drm_fd(struct vk_device *device, int drm_fd)
|
||||
{
|
||||
device->drm_fd = drm_fd;
|
||||
}
|
||||
|
||||
void
|
||||
vk_device_finish(struct vk_device *device);
|
||||
|
||||
|
|
Loading…
Reference in New Issue