OSDN Git Service

Add DRI-based generic backend
[android-x86/external-minigbm.git] / dri.h
diff --git a/dri.h b/dri.h
index 6218e82..f49802c 100644 (file)
--- a/dri.h
+++ b/dri.h
@@ -4,8 +4,12 @@
  * found in the LICENSE file.
  */
 
-#ifdef DRV_AMDGPU
+#if defined(DRI_GENERIC_DRV) || defined(DRV_AMDGPU)
 
+#ifndef __DRIH__
+#define __DRIH__
+
+#define HAVE_LIBDRM
 // Avoid transitively including a bunch of unnecessary headers.
 #define GL_GLEXT_LEGACY
 #include "GL/internal/dri_interface.h"
@@ -27,6 +31,7 @@ struct dri_driver {
 };
 
 int dri_init(struct driver *drv, const char *dri_so_path, const char *driver_suffix);
+int dri_init2(struct driver *drv);
 void dri_close(struct driver *drv);
 int dri_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
                  uint64_t use_flags);
@@ -36,6 +41,10 @@ int dri_bo_import(struct bo *bo, struct drv_import_fd_data *data);
 int dri_bo_destroy(struct bo *bo);
 void *dri_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags);
 int dri_bo_unmap(struct bo *bo, struct vma *vma);
+int dri_bo_get_plane_fd(struct bo *bo, size_t plane);
+
 size_t dri_num_planes_from_modifier(struct driver *drv, uint32_t format, uint64_t modifier);
 
 #endif
+
+#endif