From: Jason Ekstrand Date: Fri, 25 Aug 2017 18:35:27 +0000 (-0700) Subject: anv/gem: Add a flags parameter to syncobj_create X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=144487ebb8ab7505152318e08176885fd6475fe6;p=mesa.git anv/gem: Add a flags parameter to syncobj_create Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 57a8b79f4ac..9bd37f4cb3d 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -438,10 +438,10 @@ anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2) } uint32_t -anv_gem_syncobj_create(struct anv_device *device) +anv_gem_syncobj_create(struct anv_device *device, uint32_t flags) { struct drm_syncobj_create args = { - .flags = 0, + .flags = flags, }; int ret = anv_ioctl(device->fd, DRM_IOCTL_SYNCOBJ_CREATE, &args); diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c index c9f05ee0efa..a0928691eaf 100644 --- a/src/intel/vulkan/anv_gem_stubs.c +++ b/src/intel/vulkan/anv_gem_stubs.c @@ -188,7 +188,7 @@ anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2) } uint32_t -anv_gem_syncobj_create(struct anv_device *device) +anv_gem_syncobj_create(struct anv_device *device, uint32_t flags) { unreachable("Unused"); } diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 3b50c49550e..9b3efda3708 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -805,7 +805,7 @@ int anv_gem_set_caching(struct anv_device *device, uint32_t gem_handle, uint32_t int anv_gem_set_domain(struct anv_device *device, uint32_t gem_handle, uint32_t read_domains, uint32_t write_domain); int anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2); -uint32_t anv_gem_syncobj_create(struct anv_device *device); +uint32_t anv_gem_syncobj_create(struct anv_device *device, uint32_t flags); void anv_gem_syncobj_destroy(struct anv_device *device, uint32_t handle); int anv_gem_syncobj_handle_to_fd(struct anv_device *device, uint32_t handle); uint32_t anv_gem_syncobj_fd_to_handle(struct anv_device *device, int fd); diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 23f8d7d613f..df9b647b485 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -582,7 +582,7 @@ VkResult anv_CreateSemaphore( assert(handleTypes == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR); if (device->instance->physicalDevice.has_syncobj) { semaphore->permanent.type = ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ; - semaphore->permanent.syncobj = anv_gem_syncobj_create(device); + semaphore->permanent.syncobj = anv_gem_syncobj_create(device, 0); if (!semaphore->permanent.syncobj) { vk_free2(&device->alloc, pAllocator, semaphore); return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);