[Mesa-dev] [PATCH v3 08/12] anv/gem: Add a flags parameter to syncobj_create

Jason Ekstrand jason at jlekstrand.net
Fri Aug 25 18:54:28 UTC 2017


---
 src/intel/vulkan/anv_gem.c       | 4 ++--
 src/intel/vulkan/anv_gem_stubs.c | 2 +-
 src/intel/vulkan/anv_private.h   | 2 +-
 src/intel/vulkan/anv_queue.c     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
index 57a8b79..9bd37f4 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 c9f05ee..a092869 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 3b50c49..9b3efda 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 23f8d7d..df9b647 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);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list