+struct __DRIimageRec {
+ struct pipe_resource *texture;
+ unsigned level;
+ unsigned layer;
+ uint32_t dri_format;
+ uint32_t dri_components;
+ unsigned use;
+
+ void *loader_private;
+
+ /**
+ * Provided by EGL_EXT_image_dma_buf_import.
+ */
+ enum __DRIYUVColorSpace yuv_color_space;
+ enum __DRISampleRange sample_range;
+ enum __DRIChromaSiting horizontal_siting;
+ enum __DRIChromaSiting vertical_siting;
+
+};
+
+static inline boolean
+dri_with_format(__DRIscreen * sPriv)
+{
+ const __DRIdri2LoaderExtension *loader = sPriv->dri2.loader;
+
+ return loader
+ && (loader->base.version >= 3)
+ && (loader->getBuffersWithFormat != NULL);
+}
+
+void
+dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
+ const struct gl_config *mode);
+
+const __DRIconfig **
+dri_init_screen_helper(struct dri_screen *screen,
+ struct pipe_screen *pscreen,
+ const char* driver_name);
+
+void
+dri_destroy_screen_helper(struct dri_screen * screen);
+
+void
+dri_destroy_screen(__DRIscreen * sPriv);
+
+extern const struct __DriverAPIRec dri_kms_driver_api;