anv: Deduplicate anv_CmdDraw calls
[mesa.git] / src / vulkan / anv_gem_stubs.c
index d036314c4465088f3be2a7b07c1f94561bace243..3204fefb28e9d5348c6f3c3d54496d2dbf555ac5 100644 (file)
@@ -51,15 +51,18 @@ anv_gem_create(struct anv_device *device, size_t size)
 }
 
 void
-anv_gem_close(struct anv_device *device, int gem_handle)
+anv_gem_close(struct anv_device *device, uint32_t gem_handle)
 {
    close(gem_handle);
 }
 
 void*
 anv_gem_mmap(struct anv_device *device, uint32_t gem_handle,
-             uint64_t offset, uint64_t size)
+             uint64_t offset, uint64_t size, uint32_t flags)
 {
+   /* Ignore flags, as they're specific to I915_GEM_MMAP. */
+   (void) flags;
+
    return mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
                gem_handle, offset);
 }
@@ -73,14 +76,14 @@ anv_gem_munmap(void *p, uint64_t size)
    munmap(p, size);
 }
 
-int
+uint32_t
 anv_gem_userptr(struct anv_device *device, void *mem, size_t size)
 {
    return -1;
 }
 
 int
-anv_gem_wait(struct anv_device *device, int gem_handle, int64_t *timeout_ns)
+anv_gem_wait(struct anv_device *device, uint32_t gem_handle, int64_t *timeout_ns)
 {
    return 0;
 }
@@ -94,7 +97,21 @@ anv_gem_execbuffer(struct anv_device *device,
 
 int
 anv_gem_set_tiling(struct anv_device *device,
-                   int gem_handle, uint32_t stride, uint32_t tiling)
+                   uint32_t gem_handle, uint32_t stride, uint32_t tiling)
+{
+   return 0;
+}
+
+int
+anv_gem_set_caching(struct anv_device *device, uint32_t gem_handle,
+                    uint32_t caching)
+{
+   return 0;
+}
+
+int
+anv_gem_set_domain(struct anv_device *device, uint32_t gem_handle,
+                   uint32_t read_domains, uint32_t write_domain)
 {
    return 0;
 }
@@ -105,6 +122,12 @@ anv_gem_get_param(int fd, uint32_t param)
    unreachable("Unused");
 }
 
+bool
+anv_gem_get_bit6_swizzle(int fd, uint32_t tiling)
+{
+   unreachable("Unused");
+}
+
 int
 anv_gem_create_context(struct anv_device *device)
 {
@@ -124,12 +147,12 @@ anv_gem_get_aperture(int fd, uint64_t *size)
 }
 
 int
-anv_gem_handle_to_fd(struct anv_device *device, int gem_handle)
+anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle)
 {
    unreachable("Unused");
 }
 
-int
+uint32_t
 anv_gem_fd_to_handle(struct anv_device *device, int fd)
 {
    unreachable("Unused");