Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / gallium / state_trackers / dri / common / dri_screen.h
index e77bce17ae9b5ef7791a51b027920df4b8321ca1..0da9b5510fc55ed3568169a4cd13bcd090acfa58 100644 (file)
 #include "pipe/p_context.h"
 #include "pipe/p_state.h"
 #include "state_tracker/st_api.h"
-#include "state_tracker/drm_api.h"
+
+struct dri_context;
+struct dri_drawable;
 
 struct dri_screen
 {
+   /* st_api */
+   struct st_manager base;
+   struct st_api *st_api;
+
+   /* on old libGL's invalidate doesn't get called as it should */
+   boolean broken_invalidate;
+
    /* dri */
    __DRIscreen *sPriv;
 
@@ -56,17 +65,13 @@ struct dri_screen
    drmLock *drmLock;
 
    /* gallium */
-   struct drm_api *api;
-   struct pipe_winsys *pipe_winsys;
-   struct pipe_screen *pipe_screen;
    boolean d_depth_bits_last;
    boolean sd_depth_bits_last;
    boolean auto_fake_front;
+   enum pipe_texture_target target;
 
-   struct st_manager *smapi;
-
-   /* used only by DRI1 */
-   struct pipe_context *dri1_pipe;
+   /* hooks filled in by dri2 & drisw */
+   __DRIimage * (*lookup_egl_image)(struct dri_screen *ctx, void *handle);
 };
 
 /** cast wrapper */
@@ -76,6 +81,15 @@ dri_screen(__DRIscreen * sPriv)
    return (struct dri_screen *)sPriv->private;
 }
 
+struct __DRIimageRec {
+   struct pipe_resource *texture;
+   unsigned face;
+   unsigned level;
+   unsigned zslice;
+
+   void *loader_private;
+};
+
 #ifndef __NOT_HAVE_DRM_H
 
 static INLINE boolean
@@ -100,16 +114,19 @@ dri_with_format(__DRIscreen * sPriv)
 
 void
 dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
-                   const __GLcontextModes *mode);
+                   const struct gl_config *mode);
 
 const __DRIconfig **
 dri_init_screen_helper(struct dri_screen *screen,
-                       struct drm_create_screen_arg *arg,
+                       struct pipe_screen *pscreen,
                        unsigned pixel_bits);
 
 void
 dri_destroy_screen_helper(struct dri_screen * screen);
 
+void
+dri_destroy_screen(__DRIscreen * sPriv);
+
 #endif
 
 /* vim: set sw=3 ts=8 sts=3 expandtab: */