Merge branch '7.8'
[mesa.git] / src / mesa / drivers / dri / i965 / brw_context.c
index d8af2c512ba8c63fb014c87bc085d804dfc8c9d0..241193c3579f5ae4903c66b9b622d8098ca959cd 100644 (file)
@@ -33,7 +33,6 @@
 #include "main/imports.h"
 #include "main/api_noop.h"
 #include "main/macros.h"
-#include "main/vtxfmt.h"
 #include "main/simple_list.h"
 #include "shader/shader_api.h"
 
 #include "brw_defines.h"
 #include "brw_draw.h"
 #include "brw_state.h"
-#include "brw_vs.h"
-#include "intel_tex.h"
-#include "intel_blit.h"
-#include "intel_batchbuffer.h"
-#include "intel_pixel.h"
 #include "intel_span.h"
 #include "tnl/t_pipeline.h"
 
-#include "utils.h"
-
 
 /***************************************
  * Mesa's Driver Functions
@@ -77,7 +69,7 @@ static void brwInitDriverFunctions( struct dd_function_table *functions )
 }
 
 GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
-                           __DRIcontextPrivate *driContextPriv,
+                           __DRIcontext *driContextPriv,
                            void *sharedContextPrivate)
 {
    struct dd_function_table functions;
@@ -86,7 +78,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
    GLcontext *ctx = &intel->ctx;
 
    if (!brw) {
-      _mesa_printf("%s: failed to alloc context\n", __FUNCTION__);
+      printf("%s: failed to alloc context\n", __FUNCTION__);
       return GL_FALSE;
    }
 
@@ -95,7 +87,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
 
    if (!intelInitContext( intel, mesaVis, driContextPriv,
                          sharedContextPrivate, &functions )) {
-      _mesa_printf("%s: failed to init intel context\n", __FUNCTION__);
+      printf("%s: failed to init intel context\n", __FUNCTION__);
       FREE(brw);
       return GL_FALSE;
    }
@@ -158,12 +150,13 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
       MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
           ctx->Const.FragmentProgram.MaxEnvParams);
 
-   if (intel->is_ironlake || intel->is_g4x) {
+   if (intel->is_ironlake || intel->is_g4x || intel->gen >= 6) {
       brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_GM45;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
       brw->has_surface_tile_offset = GL_TRUE;
       brw->has_compr4 = GL_TRUE;
       brw->has_aa_line_parameters = GL_TRUE;
+      brw->has_pln = GL_TRUE;
   } else {
       brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_965;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_965;
@@ -178,7 +171,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
       brw->urb.size = 384;
       brw->vs_max_threads = 32;
       brw->wm_max_threads = 10 * 5;
-   } else {
+   } else if (intel->gen < 6) {
       brw->urb.size = 256;
       brw->vs_max_threads = 16;
       brw->wm_max_threads = 8 * 4;