anv/gem: Add a flags parameter to syncobj_create
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 25 Aug 2017 18:35:27 +0000 (11:35 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Aug 2017 02:33:43 +0000 (19:33 -0700)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_gem.c
src/intel/vulkan/anv_gem_stubs.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_queue.c

index 57a8b79..9bd37f4 100644 (file)
@@ -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);
index c9f05ee..a092869 100644 (file)
@@ -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");
 }
index 3b50c49..9b3efda 100644 (file)
@@ -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);
index 23f8d7d..df9b647 100644 (file)
@@ -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);