intel: Add a batch flush between front-buffer downsample and X protocol.
[mesa.git] / src / mesa / drivers / dri / i965 / intel_context.h
index d2eb7463bc2079920b2541bb13b8b7553c6e81e3..f35dafa235929fe232cc6e433bdfe4478cc224c0 100644 (file)
@@ -54,7 +54,6 @@ extern "C" {
 #include "tnl/t_vertex.h"
 
 struct intel_region;
-struct intel_context;
 
 #define INTEL_WRITE_PART  0x1
 #define INTEL_WRITE_FULL  0x2
@@ -106,52 +105,6 @@ struct intel_batchbuffer {
    } saved;
 };
 
-/**
- * intel_context is derived from Mesa's context class: struct gl_context.
- */
-struct intel_context
-{
-   struct gl_context ctx;  /**< base class, must be first field */
-
-   GLuint NewGLState;
-   /**
-    * Generation number of the hardware: 2 is 8xx, 3 is 9xx pre-965, 4 is 965.
-    */
-   int gen;
-   int gt;
-   bool is_haswell;
-   bool is_baytrail;
-   bool is_g4x;
-   bool has_separate_stencil;
-   bool must_use_separate_stencil;
-   bool has_hiz;
-   bool has_llc;
-   bool has_swizzling;
-
-   /**
-    * Set if we're either a debug context or the INTEL_DEBUG=perf environment
-    * variable is set, this is the flag indicating to do expensive work that
-    * might lead to a perf_debug() call.
-    */
-   bool perf_debug;
-
-   struct {
-      drm_intel_bo *bo;
-      GLuint offset;
-      uint32_t buffer_len;
-      uint32_t buffer_offset;
-      char buffer[4096];
-   } upload;
-
-   uint32_t max_gtt_map_object_size;
-
-   int driFd;
-
-   __DRIcontext *driContext;
-   struct intel_screen *intelScreen;
-};
-
 /**
  * Align a value down to an alignment value
  *
@@ -237,6 +190,7 @@ extern int INTEL_DEBUG;
 #define DEBUG_SHADER_TIME 0x8000000
 #define DEBUG_BLORP     0x10000000
 #define DEBUG_NO16      0x20000000
+#define DEBUG_VUE       0x40000000
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"
@@ -258,8 +212,8 @@ extern int INTEL_DEBUG;
    static GLuint msg_id = 0;                                    \
    if (unlikely(INTEL_DEBUG & DEBUG_PERF))                      \
       dbg_printf(__VA_ARGS__);                                  \
-   if (intel->perf_debug)                                       \
-      _mesa_gl_debug(&intel->ctx, &msg_id,                      \
+   if (brw->perf_debug)                                         \
+      _mesa_gl_debug(&brw->ctx, &msg_id,                        \
                      MESA_DEBUG_TYPE_PERFORMANCE,               \
                      MESA_DEBUG_SEVERITY_MEDIUM,                \
                      __VA_ARGS__);                              \
@@ -296,9 +250,6 @@ extern bool intelInitContext(struct brw_context *brw,
                              unsigned *dri_ctx_error);
 
 extern void intelFinish(struct gl_context * ctx);
-extern void _intel_flush(struct gl_context * ctx, const char *file, int line);
-
-#define intel_flush(ctx) _intel_flush(ctx, __FILE__, __LINE__)
 
 extern void intelInitDriverFunctions(struct dd_function_table *functions);
 
@@ -327,16 +278,6 @@ intelInitExtensions(struct gl_context *ctx);
 extern void
 intelInitClearFuncs(struct dd_function_table *functions);
 
-/*======================================================================
- * Inline conversion functions.  
- * These are better-typed than the macros used previously:
- */
-static INLINE struct intel_context *
-intel_context(struct gl_context * ctx)
-{
-   return (struct intel_context *) ctx;
-}
-
 static INLINE bool
 is_power_of_two(uint32_t value)
 {