X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=dri.h;h=f49802c5efbad24b1713cf42ff708a59a5a00b27;hb=662a9fd2acd72fd73e72110924ea9f350429195d;hp=6218e827e6eb9a5a177b9ea023197bcbfa27adde;hpb=004eba7659034c1ba733ac43e00201b994b92524;p=android-x86%2Fexternal-minigbm.git diff --git a/dri.h b/dri.h index 6218e82..f49802c 100644 --- 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