st/dri: do FLUSH_VERTICES before calling flush_resource
[mesa.git] / src / gallium / state_trackers / dri / dri_context.h
index e910472700cfdd0fcd4da9da4631c4212a2b7b80..96e21e0695c7f339417bc8a18b7b0d8de5c5373b 100644 (file)
 #ifndef DRI_CONTEXT_H
 #define DRI_CONTEXT_H
 
-#include "pipe/p_compiler.h"
-#include "drm.h"
 #include "dri_util.h"
-
+#include "pipe/p_compiler.h"
+#include "hud/hud_context.h"
 
 struct pipe_context;
 struct pipe_fence;
-struct st_context;
+struct st_api;
+struct st_context_iface;
 struct dri_drawable;
 
-
 struct dri_context
 {
    /* dri */
-   __DRIscreenPrivate *sPriv;
-   __DRIcontextPrivate *cPriv;
-   __DRIdrawablePrivate *dPriv;
+   __DRIscreen *sPriv;
+   __DRIcontext *cPriv;
+   __DRIdrawable *dPriv;
+   __DRIdrawable *rPriv;
 
-   driOptionCache optionCache;
+   unsigned int bind_count;
 
    /* gallium */
-   struct st_context *st;
-   struct pipe_context *pipe;
+   struct st_api *stapi;
+   struct st_context_iface *st;
+   struct pp_queue_t *pp;
+   struct hud_context *hud;
 };
 
-
-static INLINE struct dri_context *
-dri_context(__DRIcontextPrivate *driContextPriv)
+static inline struct dri_context *
+dri_context(__DRIcontext * driContextPriv)
 {
-   return (struct dri_context *) driContextPriv->driverPrivate;
+   if (!driContextPriv)
+     return NULL;
+   return (struct dri_context *)driContextPriv->driverPrivate;
 }
 
-
 /***********************************************************************
  * dri_context.c
  */
-void
-dri_destroy_context(__DRIcontextPrivate * driContextPriv);
+void dri_destroy_context(__DRIcontext * driContextPriv);
 
-boolean
-dri_unbind_context(__DRIcontextPrivate * driContextPriv);
+boolean dri_unbind_context(__DRIcontext * driContextPriv);
 
 boolean
-dri_make_current(__DRIcontextPrivate * driContextPriv,
-                 __DRIdrawablePrivate * driDrawPriv,
-                 __DRIdrawablePrivate * driReadPriv);
+dri_make_current(__DRIcontext * driContextPriv,
+                __DRIdrawable * driDrawPriv,
+                __DRIdrawable * driReadPriv);
+
+struct dri_context *
+dri_get_current(__DRIscreen * driScreenPriv);
 
 boolean
-dri_create_context(const __GLcontextModes * visual,
-                   __DRIcontextPrivate * driContextPriv,
+dri_create_context(gl_api api,
+                   const struct gl_config * visual,
+                   __DRIcontext * driContextPriv,
+                   const struct __DriverContextConfig *ctx_config,
+                   unsigned *error,
                    void *sharedContextPrivate);
 
-
-/***********************************************************************
- * dri_extensions.c
- */
-void
-dri_init_extensions(struct dri_context *ctx);
-
 #endif
 
 /* vim: set sw=3 ts=8 sts=3 expandtab: */