intel: fix check for 48b ppgtt support
[mesa.git] / src / intel / vulkan / anv_gem_stubs.c
index 3204fefb28e9d5348c6f3c3d54496d2dbf555ac5..5093bd5db1ac69360f735a5fa50199bd1fe3dbbb 100644 (file)
  * IN THE SOFTWARE.
  */
 
-#define _DEFAULT_SOURCE
-
 #include <linux/memfd.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
 
 #include "anv_private.h"
 
+#ifndef HAVE_MEMFD_CREATE
 static inline int
 memfd_create(const char *name, unsigned int flags)
 {
    return syscall(SYS_memfd_create, name, flags);
 }
+#endif
 
 uint32_t
-anv_gem_create(struct anv_device *device, size_t size)
+anv_gem_create(struct anv_device *device, uint64_t size)
 {
    int fd = memfd_create("fake bo", MFD_CLOEXEC);
    if (fd == -1)
@@ -82,6 +82,12 @@ anv_gem_userptr(struct anv_device *device, void *mem, size_t size)
    return -1;
 }
 
+int
+anv_gem_busy(struct anv_device *device, uint32_t gem_handle)
+{
+   return 0;
+}
+
 int
 anv_gem_wait(struct anv_device *device, uint32_t gem_handle, int64_t *timeout_ns)
 {
@@ -140,12 +146,37 @@ anv_gem_destroy_context(struct anv_device *device, int context)
    unreachable("Unused");
 }
 
+int
+anv_gem_set_context_param(int fd, int context, uint32_t param, uint64_t value)
+{
+   unreachable("Unused");
+}
+
+int
+anv_gem_get_context_param(int fd, int context, uint32_t param, uint64_t *value)
+{
+   unreachable("Unused");
+}
+
+bool
+anv_gem_has_context_priority(int fd)
+{
+   unreachable("Unused");
+}
+
 int
 anv_gem_get_aperture(int fd, uint64_t *size)
 {
    unreachable("Unused");
 }
 
+int
+anv_gem_gpu_get_reset_stats(struct anv_device *device,
+                            uint32_t *active, uint32_t *pending)
+{
+   unreachable("Unused");
+}
+
 int
 anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle)
 {
@@ -157,3 +188,66 @@ anv_gem_fd_to_handle(struct anv_device *device, int fd)
 {
    unreachable("Unused");
 }
+
+int
+anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2)
+{
+   unreachable("Unused");
+}
+
+int
+anv_gem_syncobj_export_sync_file(struct anv_device *device, uint32_t handle)
+{
+   unreachable("Unused");
+}
+
+int
+anv_gem_syncobj_import_sync_file(struct anv_device *device,
+                                 uint32_t handle, int fd)
+{
+   unreachable("Unused");
+}
+
+uint32_t
+anv_gem_syncobj_create(struct anv_device *device, uint32_t flags)
+{
+   unreachable("Unused");
+}
+
+void
+anv_gem_syncobj_destroy(struct anv_device *device, uint32_t handle)
+{
+   unreachable("Unused");
+}
+
+int
+anv_gem_syncobj_handle_to_fd(struct anv_device *device, uint32_t handle)
+{
+   unreachable("Unused");
+}
+
+uint32_t
+anv_gem_syncobj_fd_to_handle(struct anv_device *device, int fd)
+{
+   unreachable("Unused");
+}
+
+void
+anv_gem_syncobj_reset(struct anv_device *device, uint32_t handle)
+{
+   unreachable("Unused");
+}
+
+bool
+anv_gem_supports_syncobj_wait(int fd)
+{
+   return false;
+}
+
+int
+anv_gem_syncobj_wait(struct anv_device *device,
+                     uint32_t *handles, uint32_t num_handles,
+                     int64_t abs_timeout_ns, bool wait_all)
+{
+   unreachable("Unused");
+}