2 * Copyright 2017 Advanced Micro Devices. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
9 // Avoid transitively including a bunch of unnecessary headers.
10 #define GL_GLEXT_LEGACY
11 #include "GL/internal/dri_interface.h"
12 #undef GL_GLEXT_LEGACY
20 __DRIcontext *context; /* Needed for map/unmap operations. */
21 const __DRIextension **extensions;
22 const __DRIcoreExtension *core_extension;
23 const __DRIdri2Extension *dri2_extension;
24 const __DRIimageExtension *image_extension;
25 const __DRI2flushExtension *flush_extension;
26 const __DRIconfig **configs;
29 int dri_init(struct driver *drv, const char *dri_so_path, const char *driver_suffix);
30 void dri_close(struct driver *drv);
31 int dri_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
33 int dri_bo_create_with_modifiers(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
34 const uint64_t *modifiers, uint32_t modifier_count);
35 int dri_bo_import(struct bo *bo, struct drv_import_fd_data *data);
36 int dri_bo_destroy(struct bo *bo);
37 void *dri_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags);
38 int dri_bo_unmap(struct bo *bo, struct vma *vma);
39 size_t dri_num_planes_from_modifier(struct driver *drv, uint32_t format, uint64_t modifier);