st/dri: do FLUSH_VERTICES before calling flush_resource
[mesa.git] / src / gallium / state_trackers / dri / dri_context.h
index 845b420cf8993c8445dfdf3b53d580ca63cc64dd..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
@@ -49,22 +50,20 @@ struct dri_context
    __DRIdrawable *dPriv;
    __DRIdrawable *rPriv;
 
-   driOptionCache optionCache;
-
-   drmLock *lock;
-   boolean isLocked;
-   boolean stLostLock;
-   boolean wsLostLock;
-
    unsigned int bind_count;
 
    /* gallium */
+   struct st_api *stapi;
    struct st_context_iface *st;
+   struct pp_queue_t *pp;
+   struct hud_context *hud;
 };
 
-static INLINE struct dri_context *
+static inline struct dri_context *
 dri_context(__DRIcontext * driContextPriv)
 {
+   if (!driContextPriv)
+     return NULL;
    return (struct dri_context *)driContextPriv->driverPrivate;
 }
 
@@ -81,17 +80,15 @@ dri_make_current(__DRIcontext * driContextPriv,
                 __DRIdrawable * driReadPriv);
 
 struct dri_context *
-dri_get_current(void);
+dri_get_current(__DRIscreen * driScreenPriv);
 
 boolean
-dri_create_context(const __GLcontextModes * visual,
-                  __DRIcontext * driContextPriv,
-                  void *sharedContextPrivate);
-
-/***********************************************************************
- * dri_extensions.c
- */
-void dri_init_extensions(struct dri_context *ctx);
+dri_create_context(gl_api api,
+                   const struct gl_config * visual,
+                   __DRIcontext * driContextPriv,
+                   const struct __DriverContextConfig *ctx_config,
+                   unsigned *error,
+                   void *sharedContextPrivate);
 
 #endif