[Mesa-dev] [PATCH 05/51] i965: Remove direct includes of intel_batchbuffer.h

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 10 21:23:28 UTC 2017


Upcoming patches eliminate the intel_batchbuffer interface and one of
the minor changes that causes a lot of churn is the removal of the
header, along with the occassional need to now call intel_reg.h
themselves. This patch moves the individual includes into brw_context.h.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 src/mesa/drivers/dri/i965/brw_binding_tables.c     | 1 -
 src/mesa/drivers/dri/i965/brw_cc.c                 | 1 -
 src/mesa/drivers/dri/i965/brw_clear.c              | 1 -
 src/mesa/drivers/dri/i965/brw_clip.c               | 2 --
 src/mesa/drivers/dri/i965/brw_clip_line.c          | 2 --
 src/mesa/drivers/dri/i965/brw_clip_point.c         | 2 --
 src/mesa/drivers/dri/i965/brw_clip_tri.c           | 2 --
 src/mesa/drivers/dri/i965/brw_clip_unfilled.c      | 2 --
 src/mesa/drivers/dri/i965/brw_clip_util.c          | 2 --
 src/mesa/drivers/dri/i965/brw_compute.c            | 1 -
 src/mesa/drivers/dri/i965/brw_conditional_render.c | 1 -
 src/mesa/drivers/dri/i965/brw_context.c            | 1 -
 src/mesa/drivers/dri/i965/brw_context.h            | 5 +++++
 src/mesa/drivers/dri/i965/brw_cs.c                 | 1 -
 src/mesa/drivers/dri/i965/brw_curbe.c              | 1 -
 src/mesa/drivers/dri/i965/brw_draw.c               | 1 -
 src/mesa/drivers/dri/i965/brw_draw_upload.c        | 1 -
 src/mesa/drivers/dri/i965/brw_ff_gs.c              | 2 --
 src/mesa/drivers/dri/i965/brw_ff_gs_emit.c         | 1 -
 src/mesa/drivers/dri/i965/brw_misc_state.c         | 1 -
 src/mesa/drivers/dri/i965/brw_pipe_control.c       | 1 -
 src/mesa/drivers/dri/i965/brw_primitive_restart.c  | 2 --
 src/mesa/drivers/dri/i965/brw_program.c            | 1 -
 src/mesa/drivers/dri/i965/brw_program_cache.c      | 1 -
 src/mesa/drivers/dri/i965/brw_queryobj.c           | 1 -
 src/mesa/drivers/dri/i965/brw_sampler_state.c      | 2 +-
 src/mesa/drivers/dri/i965/brw_sf.c                 | 2 --
 src/mesa/drivers/dri/i965/brw_sf_emit.c            | 2 --
 src/mesa/drivers/dri/i965/brw_state_batch.c        | 1 -
 src/mesa/drivers/dri/i965/brw_state_dump.c         | 1 -
 src/mesa/drivers/dri/i965/brw_state_upload.c       | 1 -
 src/mesa/drivers/dri/i965/brw_sync.c               | 1 -
 src/mesa/drivers/dri/i965/brw_urb.c                | 1 -
 src/mesa/drivers/dri/i965/brw_wm_state.c           | 1 -
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c   | 1 -
 src/mesa/drivers/dri/i965/gen6_cc.c                | 1 -
 src/mesa/drivers/dri/i965/gen6_clip_state.c        | 1 -
 src/mesa/drivers/dri/i965/gen6_constant_state.c    | 1 -
 src/mesa/drivers/dri/i965/gen6_depth_state.c       | 1 -
 src/mesa/drivers/dri/i965/gen6_depthstencil.c      | 1 -
 src/mesa/drivers/dri/i965/gen6_gs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen6_multisample_state.c | 2 --
 src/mesa/drivers/dri/i965/gen6_queryobj.c          | 1 -
 src/mesa/drivers/dri/i965/gen6_sampler_state.c     | 1 -
 src/mesa/drivers/dri/i965/gen6_scissor_state.c     | 1 -
 src/mesa/drivers/dri/i965/gen6_sf_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen6_sol.c               | 1 -
 src/mesa/drivers/dri/i965/gen6_urb.c               | 1 -
 src/mesa/drivers/dri/i965/gen6_viewport_state.c    | 1 -
 src/mesa/drivers/dri/i965/gen6_vs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen6_wm_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_cs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_ds_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_gs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_hs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_l3_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_misc_state.c        | 1 -
 src/mesa/drivers/dri/i965/gen7_sf_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_sol_state.c         | 1 -
 src/mesa/drivers/dri/i965/gen7_te_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_urb.c               | 1 -
 src/mesa/drivers/dri/i965/gen7_viewport_state.c    | 1 -
 src/mesa/drivers/dri/i965/gen7_vs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_wm_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c  | 1 -
 src/mesa/drivers/dri/i965/gen8_blend_state.c       | 1 -
 src/mesa/drivers/dri/i965/gen8_depth_state.c       | 1 -
 src/mesa/drivers/dri/i965/gen8_draw_upload.c       | 1 -
 src/mesa/drivers/dri/i965/gen8_ds_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_gs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_hs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_multisample_state.c | 2 --
 src/mesa/drivers/dri/i965/gen8_ps_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_sf_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_sol_state.c         | 1 -
 src/mesa/drivers/dri/i965/gen8_surface_state.c     | 1 -
 src/mesa/drivers/dri/i965/gen8_viewport_state.c    | 1 -
 src/mesa/drivers/dri/i965/gen8_vs_state.c          | 1 -
 src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c  | 1 -
 src/mesa/drivers/dri/i965/genX_blorp_exec.c        | 1 -
 src/mesa/drivers/dri/i965/hsw_queryobj.c           | 1 -
 src/mesa/drivers/dri/i965/hsw_sol.c                | 1 -
 src/mesa/drivers/dri/i965/intel_batchbuffer.c      | 1 +
 src/mesa/drivers/dri/i965/intel_batchbuffer.h      | 6 ++++++
 src/mesa/drivers/dri/i965/intel_blit.c             | 1 -
 src/mesa/drivers/dri/i965/intel_buffer_objects.c   | 1 -
 src/mesa/drivers/dri/i965/intel_buffer_objects.h   | 3 ++-
 src/mesa/drivers/dri/i965/intel_extensions.c       | 1 -
 src/mesa/drivers/dri/i965/intel_fbo.c              | 1 -
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c      | 1 -
 src/mesa/drivers/dri/i965/intel_pixel_bitmap.c     | 1 -
 src/mesa/drivers/dri/i965/intel_pixel_copy.c       | 1 -
 src/mesa/drivers/dri/i965/intel_pixel_read.c       | 1 -
 src/mesa/drivers/dri/i965/intel_screen.c           | 1 -
 src/mesa/drivers/dri/i965/intel_tex_image.c        | 1 -
 src/mesa/drivers/dri/i965/intel_tex_subimage.c     | 1 -
 src/mesa/drivers/dri/i965/intel_upload.c           | 1 -
 97 files changed, 15 insertions(+), 106 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_binding_tables.c b/src/mesa/drivers/dri/i965/brw_binding_tables.c
index 9ca841a9de..ae7b30a064 100644
--- a/src/mesa/drivers/dri/i965/brw_binding_tables.c
+++ b/src/mesa/drivers/dri/i965/brw_binding_tables.c
@@ -42,7 +42,6 @@
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 
 static const GLuint stage_to_bt_edit[] = {
    [MESA_SHADER_VERTEX] = _3DSTATE_BINDING_TABLE_EDIT_VS,
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index c3b00e1b60..35bc73e65f 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -36,7 +36,6 @@
 #include "brw_util.h"
 #include "main/macros.h"
 #include "main/stencil.h"
-#include "intel_batchbuffer.h"
 
 static void
 brw_upload_cc_vp(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 488732cb4f..e419b8e049 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -29,7 +29,6 @@
 #include "swrast/swrast.h"
 #include "drivers/common/meta.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index 8560dd4599..f262e8ac1f 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -32,8 +32,6 @@
 #include "main/macros.h"
 #include "main/enums.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index f9cabd2f98..b2ebf403d3 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -33,8 +33,6 @@
 #include "main/enums.h"
 #include "program/program.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip_point.c b/src/mesa/drivers/dri/i965/brw_clip_point.c
index 5cf2f5eeee..64e3c9cf06 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_point.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_point.c
@@ -33,8 +33,6 @@
 #include "main/enums.h"
 #include "program/program.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c
index 52402e30bc..8a2148bd8b 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_tri.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c
@@ -33,8 +33,6 @@
 #include "main/enums.h"
 #include "program/program.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c
index 7c06857ff6..9235b72c1a 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c
@@ -33,8 +33,6 @@
 #include "main/enums.h"
 #include "program/program.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index 4f1b0fd9fc..440d4582f0 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -34,8 +34,6 @@
 #include "main/enums.h"
 #include "program/program.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_compute.c b/src/mesa/drivers/dri/i965/brw_compute.c
index 16b5df7ca4..8323d3c178 100644
--- a/src/mesa/drivers/dri/i965/brw_compute.c
+++ b/src/mesa/drivers/dri/i965/brw_compute.c
@@ -29,7 +29,6 @@
 #include "brw_context.h"
 #include "brw_draw.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "brw_defines.h"
 
diff --git a/src/mesa/drivers/dri/i965/brw_conditional_render.c b/src/mesa/drivers/dri/i965/brw_conditional_render.c
index 122a4ecc0f..c8e5d9e3d9 100644
--- a/src/mesa/drivers/dri/i965/brw_conditional_render.c
+++ b/src/mesa/drivers/dri/i965/brw_conditional_render.c
@@ -35,7 +35,6 @@
 
 #include "brw_context.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 set_predicate_enable(struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 84d34c0f6a..44c49f5f16 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -57,7 +57,6 @@
 #include "brw_draw.h"
 #include "brw_state.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "intel_buffers.h"
 #include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 28290d85f1..02114e0753 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1757,4 +1757,9 @@ void brw_query_internal_format(struct gl_context *ctx, GLenum target,
 }
 #endif
 
+/* Temporary include to hide some mechanical changes for brw-batch */
+#define INCLUDE_INTEL_BATCHBUFFER_H
+#include "intel_batchbuffer.h"
+#undef INCLUDE_INTEL_BATCHBUFFER_H
+
 #endif
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 0f8d4ebcb8..d19c93065a 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -29,7 +29,6 @@
 #include "brw_shader.h"
 #include "intel_mipmap_tree.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 #include "brw_nir.h"
 #include "brw_program.h"
 #include "compiler/glsl/ir_uniform.h"
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 7d58efb622..fc10062c98 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -58,7 +58,6 @@
 #include "program/prog_print.h"
 #include "program/prog_statevars.h"
 #include "util/bitscan.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "brw_context.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 940ce70c64..75e2578763 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -47,7 +47,6 @@
 #include "brw_state.h"
 #include "brw_vs.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index b7527f2cd9..88be736e81 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -34,7 +34,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 
 static const GLuint double_types_float[5] = {
diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c
index 4934af3fd3..f0523d3996 100644
--- a/src/mesa/drivers/dri/i965/brw_ff_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c
@@ -33,8 +33,6 @@
 #include "main/enums.h"
 #include "main/transformfeedback.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs_emit.c b/src/mesa/drivers/dri/i965/brw_ff_gs_emit.c
index fea2b93471..f40faf3905 100644
--- a/src/mesa/drivers/dri/i965/brw_ff_gs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_ff_gs_emit.c
@@ -34,7 +34,6 @@
 #include "main/enums.h"
 
 #include "program/program.h"
-#include "intel_batchbuffer.h"
 
 #include "brw_defines.h"
 #include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 40a8d07bfb..0b2984465f 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -31,7 +31,6 @@
 
 
 
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
 
diff --git a/src/mesa/drivers/dri/i965/brw_pipe_control.c b/src/mesa/drivers/dri/i965/brw_pipe_control.c
index 22c946f744..eb472e162f 100644
--- a/src/mesa/drivers/dri/i965/brw_pipe_control.c
+++ b/src/mesa/drivers/dri/i965/brw_pipe_control.c
@@ -23,7 +23,6 @@
 
 #include "brw_context.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 
 /**
diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
index e329cc73b7..6648784673 100644
--- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c
+++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
@@ -34,8 +34,6 @@
 #include "brw_defines.h"
 #include "brw_draw.h"
 
-#include "intel_batchbuffer.h"
-
 /**
  * Check if the hardware's cut index support can handle the primitive
  * restart index value (pre-Haswell only).
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index c8fb3fa4c7..1c954aee31 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -45,7 +45,6 @@
 #include "brw_context.h"
 #include "brw_shader.h"
 #include "brw_nir.h"
-#include "intel_batchbuffer.h"
 
 static void
 brw_nir_lower_uniforms(nir_shader *nir, bool is_scalar)
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 3947904ac5..ad3ed8d7ba 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -45,7 +45,6 @@
  */
 
 #include "main/imports.h"
-#include "intel_batchbuffer.h"
 #include "brw_state.h"
 #include "brw_vs.h"
 #include "brw_wm.h"
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index dda17de715..4794e7dcf2 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -40,7 +40,6 @@
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 
 /**
  * Emit PIPE_CONTROLs to write the current GPU timestamp into a buffer.
diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c
index 412efb9a61..9cef97562d 100644
--- a/src/mesa/drivers/dri/i965/brw_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c
@@ -39,7 +39,7 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
+
 #include "intel_mipmap_tree.h"
 
 #include "main/macros.h"
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 76faccde9d..7aa8cb53d4 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -35,8 +35,6 @@
 #include "main/enums.h"
 #include "main/fbobject.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 5f31fa5160..af8c5ced51 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -33,8 +33,6 @@
 #include "main/macros.h"
 #include "main/enums.h"
 
-#include "intel_batchbuffer.h"
-
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c
index 9658b48ca1..8cff0b6d1f 100644
--- a/src/mesa/drivers/dri/i965/brw_state_batch.c
+++ b/src/mesa/drivers/dri/i965/brw_state_batch.c
@@ -30,7 +30,6 @@
   */
 
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 #include "main/imports.h"
 #include "util/ralloc.h"
 
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index 1ed8aaa481..c5885650a6 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -26,7 +26,6 @@
  */
 
 #include "main/mtypes.h"
-#include "intel_batchbuffer.h"
 
 #include "isl/isl.h"
 
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index d0be6acaf0..629fb12a49 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -34,7 +34,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "drivers/common/meta.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "brw_vs.h"
 #include "brw_ff_gs.h"
diff --git a/src/mesa/drivers/dri/i965/brw_sync.c b/src/mesa/drivers/dri/i965/brw_sync.c
index 1df5610385..37c19b1c1c 100644
--- a/src/mesa/drivers/dri/i965/brw_sync.c
+++ b/src/mesa/drivers/dri/i965/brw_sync.c
@@ -41,7 +41,6 @@
 #include "main/imports.h"
 
 #include "brw_context.h"
-#include "intel_batchbuffer.h"
 
 struct brw_fence {
    struct brw_context *brw;
diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index d61e713800..a8c7c7d803 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -31,7 +31,6 @@
 
 
 
-#include "intel_batchbuffer.h"
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 6f2ccabaa0..bf32ac9396 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -31,7 +31,6 @@
 
 
 
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "brw_context.h"
 #include "brw_state.h"
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 4566696fa9..ad5013f287 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -45,7 +45,6 @@
 #include "isl/isl.h"
 
 #include "intel_mipmap_tree.h"
-#include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_fbo.h"
 #include "intel_buffer_objects.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 0c38930ec2..c7a9b361e6 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -29,7 +29,6 @@
 #include "brw_state.h"
 #include "brw_defines.h"
 #include "brw_util.h"
-#include "intel_batchbuffer.h"
 #include "main/macros.h"
 #include "main/enums.h"
 #include "main/glformats.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index 0b3c7f16f1..f5c1391546 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -29,7 +29,6 @@
 #include "brw_state.h"
 #include "brw_defines.h"
 #include "brw_util.h"
-#include "intel_batchbuffer.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
 
diff --git a/src/mesa/drivers/dri/i965/gen6_constant_state.c b/src/mesa/drivers/dri/i965/gen6_constant_state.c
index 6c0c32b26f..3aeafcf3b2 100644
--- a/src/mesa/drivers/dri/i965/gen6_constant_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_constant_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "program/prog_parameter.h"
 
 void
diff --git a/src/mesa/drivers/dri/i965/gen6_depth_state.c b/src/mesa/drivers/dri/i965/gen6_depth_state.c
index 3f14006f8a..89ba911e94 100644
--- a/src/mesa/drivers/dri/i965/gen6_depth_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_depth_state.c
@@ -22,7 +22,6 @@
  */
 
 
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
 
diff --git a/src/mesa/drivers/dri/i965/gen6_depthstencil.c b/src/mesa/drivers/dri/i965/gen6_depthstencil.c
index 79d4d5da16..d7ef343f93 100644
--- a/src/mesa/drivers/dri/i965/gen6_depthstencil.c
+++ b/src/mesa/drivers/dri/i965/gen6_depthstencil.c
@@ -25,7 +25,6 @@
  *
  */
 
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "brw_context.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c
index e9179152b3..df5f9e8c3b 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c
@@ -28,7 +28,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/shaderapi.h"
 
 static void
diff --git a/src/mesa/drivers/dri/i965/gen6_multisample_state.c b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
index a59ffec039..4bada2930a 100644
--- a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
@@ -21,8 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#include "intel_batchbuffer.h"
-
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_multisample_state.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
index f6b90f77ea..2920955821 100644
--- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
+++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
@@ -36,7 +36,6 @@
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 
 static inline void
diff --git a/src/mesa/drivers/dri/i965/gen6_sampler_state.c b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
index b5a0c92b3b..bb2383b3e5 100644
--- a/src/mesa/drivers/dri/i965/gen6_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
@@ -28,7 +28,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_sampler_state_pointers(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen6_scissor_state.c b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
index 860445a2b4..e01ecb69ba 100644
--- a/src/mesa/drivers/dri/i965/gen6_scissor_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
@@ -28,7 +28,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
 
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 738e4f03cd..b96cbefe5c 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -33,7 +33,6 @@
 #include "main/macros.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
-#include "intel_batchbuffer.h"
 
 /**
  * Determine the appropriate attribute override value to store into the
diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c
index 656d042769..972fda151f 100644
--- a/src/mesa/drivers/dri/i965/gen6_sol.c
+++ b/src/mesa/drivers/dri/i965/gen6_sol.c
@@ -29,7 +29,6 @@
 #include "main/bufferobj.h"
 #include "main/macros.h"
 #include "brw_context.h"
-#include "intel_batchbuffer.h"
 #include "brw_defines.h"
 #include "brw_state.h"
 #include "main/transformfeedback.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index e69a1dfada..2eb001838f 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -26,7 +26,6 @@
  */
 
 #include "main/macros.h"
-#include "intel_batchbuffer.h"
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
index ad1e72d0a5..dc5f44c8c6 100644
--- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
@@ -28,7 +28,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
 #include "main/viewport.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 837762d391..3694b3b141 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -32,7 +32,6 @@
 #include "program/prog_parameter.h"
 #include "program/prog_statevars.h"
 #include "main/shaderapi.h"
-#include "intel_batchbuffer.h"
 
 static void
 gen6_upload_vs_push_constants(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index a67e626f72..31f873241c 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -35,7 +35,6 @@
 #include "program/prog_statevars.h"
 #include "main/shaderapi.h"
 #include "main/framebuffer.h"
-#include "intel_batchbuffer.h"
 
 static void
 gen6_upload_wm_push_constants(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_cs_state.c b/src/mesa/drivers/dri/i965/gen7_cs_state.c
index bae4fd2fa6..7572fec30f 100644
--- a/src/mesa/drivers/dri/i965/gen7_cs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_cs_state.c
@@ -28,7 +28,6 @@
 #include "brw_wm.h"
 #include "brw_shader.h"
 #include "intel_mipmap_tree.h"
-#include "intel_batchbuffer.h"
 #include "brw_state.h"
 #include "program/prog_statevars.h"
 #include "compiler/glsl/ir_uniform.h"
diff --git a/src/mesa/drivers/dri/i965/gen7_ds_state.c b/src/mesa/drivers/dri/i965/gen7_ds_state.c
index 9d7f5315de..25e13d265e 100644
--- a/src/mesa/drivers/dri/i965/gen7_ds_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_ds_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/shaderapi.h"
 
 static void
diff --git a/src/mesa/drivers/dri/i965/gen7_gs_state.c b/src/mesa/drivers/dri/i965/gen7_gs_state.c
index 1b5b78290b..12f54b8a78 100644
--- a/src/mesa/drivers/dri/i965/gen7_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_gs_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_gs_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_hs_state.c b/src/mesa/drivers/dri/i965/gen7_hs_state.c
index fadea2351d..851af15e96 100644
--- a/src/mesa/drivers/dri/i965/gen7_hs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_hs_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/shaderapi.h"
 
 static void
diff --git a/src/mesa/drivers/dri/i965/gen7_l3_state.c b/src/mesa/drivers/dri/i965/gen7_l3_state.c
index dce39c3d19..59c3dd33fd 100644
--- a/src/mesa/drivers/dri/i965/gen7_l3_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_l3_state.c
@@ -26,7 +26,6 @@
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_state.h"
-#include "intel_batchbuffer.h"
 
 /**
  * Calculate the desired L3 partitioning based on the current state of the
diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src/mesa/drivers/dri/i965/gen7_misc_state.c
index af9be66ff8..6e12789ea5 100644
--- a/src/mesa/drivers/dri/i965/gen7_misc_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_misc_state.c
@@ -22,7 +22,6 @@
  */
 
 #include "main/mtypes.h"
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 #include "intel_fbo.h"
 #include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c
index f1b3169cdc..d5661412f7 100644
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c
@@ -28,7 +28,6 @@
 #include "main/macros.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_sbe_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 656135fbce..d894aeb979 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -31,7 +31,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "main/transformfeedback.h"
 
diff --git a/src/mesa/drivers/dri/i965/gen7_te_state.c b/src/mesa/drivers/dri/i965/gen7_te_state.c
index e56fdcf4e8..2d914198aa 100644
--- a/src/mesa/drivers/dri/i965/gen7_te_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_te_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_te_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c
index 028161df39..43034b56ae 100644
--- a/src/mesa/drivers/dri/i965/gen7_urb.c
+++ b/src/mesa/drivers/dri/i965/gen7_urb.c
@@ -22,7 +22,6 @@
  */
 
 #include "main/macros.h"
-#include "intel_batchbuffer.h"
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
index c447331a2e..b49bf800d3 100644
--- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
 #include "main/viewport.h"
diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965/gen7_vs_state.c
index 623c78471f..b6c2a9788e 100644
--- a/src/mesa/drivers/dri/i965/gen7_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_vs_state.c
@@ -27,7 +27,6 @@
 #include "brw_util.h"
 #include "program/prog_parameter.h"
 #include "program/prog_statevars.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_vs_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c
index be026e0589..aa964da48e 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c
@@ -31,7 +31,6 @@
 #include "program/prog_parameter.h"
 #include "program/prog_statevars.h"
 #include "main/framebuffer.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_wm_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index 5587a02800..e89de29c68 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -29,7 +29,6 @@
 #include "program/prog_instruction.h"
 
 #include "intel_mipmap_tree.h"
-#include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_fbo.h"
 #include "intel_buffer_objects.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_blend_state.c b/src/mesa/drivers/dri/i965/gen8_blend_state.c
index 2e4e8bfed1..e15af15c10 100644
--- a/src/mesa/drivers/dri/i965/gen8_blend_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_blend_state.c
@@ -26,7 +26,6 @@
 #include "brw_defines.h"
 #include "brw_util.h"
 #include "brw_wm.h"
-#include "intel_batchbuffer.h"
 #include "main/macros.h"
 #include "main/enums.h"
 #include "main/glformats.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c
index 14689f400f..d3d11705f0 100644
--- a/src/mesa/drivers/dri/i965/gen8_depth_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c
@@ -21,7 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 #include "intel_fbo.h"
 #include "intel_resolve_map.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_draw_upload.c b/src/mesa/drivers/dri/i965/gen8_draw_upload.c
index 3177f9a8c7..64599103e0 100644
--- a/src/mesa/drivers/dri/i965/gen8_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/gen8_draw_upload.c
@@ -31,7 +31,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 
 #ifndef NDEBUG
diff --git a/src/mesa/drivers/dri/i965/gen8_ds_state.c b/src/mesa/drivers/dri/i965/gen8_ds_state.c
index ee2f82e109..6c3f9469ce 100644
--- a/src/mesa/drivers/dri/i965/gen8_ds_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_ds_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 gen8_upload_ds_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen8_gs_state.c b/src/mesa/drivers/dri/i965/gen8_gs_state.c
index 2b74f1bd57..ba32ab82d1 100644
--- a/src/mesa/drivers/dri/i965/gen8_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_gs_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 gen8_upload_gs_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen8_hs_state.c b/src/mesa/drivers/dri/i965/gen8_hs_state.c
index ee47e5e54a..dce44e2892 100644
--- a/src/mesa/drivers/dri/i965/gen8_hs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_hs_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 static void
 gen8_upload_hs_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen8_multisample_state.c b/src/mesa/drivers/dri/i965/gen8_multisample_state.c
index e36d037d47..5b723e7799 100644
--- a/src/mesa/drivers/dri/i965/gen8_multisample_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_multisample_state.c
@@ -21,8 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#include "intel_batchbuffer.h"
-
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_multisample_state.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_ps_state.c b/src/mesa/drivers/dri/i965/gen8_ps_state.c
index 03468267ce..2d7bfb60be 100644
--- a/src/mesa/drivers/dri/i965/gen8_ps_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_ps_state.c
@@ -26,7 +26,6 @@
 #include "brw_state.h"
 #include "brw_defines.h"
 #include "brw_wm.h"
-#include "intel_batchbuffer.h"
 
 void
 gen8_upload_ps_extra(struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/gen8_sf_state.c b/src/mesa/drivers/dri/i965/gen8_sf_state.c
index 41e94fb504..81374237bd 100644
--- a/src/mesa/drivers/dri/i965/gen8_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sf_state.c
@@ -28,7 +28,6 @@
 #include "brw_util.h"
 #include "main/macros.h"
 #include "main/fbobject.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_sbe(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen8_sol_state.c b/src/mesa/drivers/dri/i965/gen8_sol_state.c
index 21cc129088..f964c6f8c4 100644
--- a/src/mesa/drivers/dri/i965/gen8_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sol_state.c
@@ -31,7 +31,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "main/transformfeedback.h"
 
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 08f83f3e06..99fb77a69d 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -30,7 +30,6 @@
 #include "program/prog_instruction.h"
 
 #include "intel_mipmap_tree.h"
-#include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_fbo.h"
 #include "intel_buffer_objects.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c b/src/mesa/drivers/dri/i965/gen8_viewport_state.c
index 84000e3a7e..d795149d97 100644
--- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c
@@ -24,7 +24,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "main/fbobject.h"
 #include "main/framebuffer.h"
 #include "main/viewport.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_vs_state.c b/src/mesa/drivers/dri/i965/gen8_vs_state.c
index 7b66da4b17..ee09dd7577 100644
--- a/src/mesa/drivers/dri/i965/gen8_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_vs_state.c
@@ -27,7 +27,6 @@
 #include "brw_util.h"
 #include "program/prog_parameter.h"
 #include "program/prog_statevars.h"
-#include "intel_batchbuffer.h"
 
 static void
 upload_vs_state(struct brw_context *brw)
diff --git a/src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c b/src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c
index 9a6c9e060b..ae9db5cf14 100644
--- a/src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c
+++ b/src/mesa/drivers/dri/i965/gen8_wm_depth_stencil.c
@@ -21,7 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "brw_context.h"
 #include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index 40a2499e08..0b3858ea98 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -23,7 +23,6 @@
 
 #include <assert.h>
 
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 
 #include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/hsw_queryobj.c b/src/mesa/drivers/dri/i965/hsw_queryobj.c
index 0da2c3d388..054f874b80 100644
--- a/src/mesa/drivers/dri/i965/hsw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/hsw_queryobj.c
@@ -30,7 +30,6 @@
 
 #include "brw_context.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 
 /*
diff --git a/src/mesa/drivers/dri/i965/hsw_sol.c b/src/mesa/drivers/dri/i965/hsw_sol.c
index b0dd150b7d..588842e5cd 100644
--- a/src/mesa/drivers/dri/i965/hsw_sol.c
+++ b/src/mesa/drivers/dri/i965/hsw_sol.c
@@ -31,7 +31,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "main/transformfeedback.h"
 
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index d1b9317a8c..036cb1c854 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -23,6 +23,7 @@
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#define INCLUDE_INTEL_BATCHBUFFER_H
 #include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
 #include "intel_bufmgr.h"
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
index ee03a44c9e..59233ce3d2 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
@@ -1,3 +1,7 @@
+#ifndef INCLUDE_INTEL_BATCHBUFFER_H
+#error "Do not include intel_batchbuffer.h"
+#endif
+
 #ifndef INTEL_BATCHBUFFER_H
 #define INTEL_BATCHBUFFER_H
 
@@ -37,6 +41,8 @@ extern "C" {
 #define BATCH_RESERVED 308
 
 struct intel_batchbuffer;
+struct brw_context;
+enum brw_gpu_ring;
 
 void intel_batchbuffer_emit_render_ring_prelude(struct brw_context *brw);
 void intel_batchbuffer_init(struct intel_batchbuffer *batch, dri_bufmgr *bufmgr,
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 21a16e18c3..d95de1f5bd 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -34,7 +34,6 @@
 #include "intel_blit.h"
 #include "intel_buffers.h"
 #include "intel_fbo.h"
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 
 #define FILE_DEBUG_FLAG DEBUG_BLIT
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 56da2da08a..fde45d8f41 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -37,7 +37,6 @@
 #include "brw_context.h"
 #include "intel_blit.h"
 #include "intel_buffer_objects.h"
-#include "intel_batchbuffer.h"
 
 /**
  * Map a buffer object; issue performance warnings if mapping causes stalls.
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.h b/src/mesa/drivers/dri/i965/intel_buffer_objects.h
index b523edc4f0..7fe08a6399 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.h
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.h
@@ -28,7 +28,8 @@
 
 #include "main/mtypes.h"
 
-struct brw_context;
+#include "brw_context.h"
+
 struct gl_buffer_object;
 
 
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index eafb76cd60..6a724a0bd3 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -27,7 +27,6 @@
 
 #include "brw_context.h"
 #include "brw_defines.h"
-#include "intel_batchbuffer.h"
 
 /**
  * Initializes potential list of extensions if ctx == NULL, or actually enables
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index de0cd6aca2..30033c369b 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -40,7 +40,6 @@
 #include "swrast/swrast.h"
 #include "drivers/common/meta.h"
 
-#include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "intel_blit.h"
 #include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 25f8f39145..073ae886ea 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -26,7 +26,6 @@
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
 
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 #include "intel_resolve_map.h"
 #include "intel_tex.h"
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
index 4522d28a4e..cf044f77c7 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -41,7 +41,6 @@
 
 #include "brw_context.h"
 #include "intel_screen.h"
-#include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_fbo.h"
 #include "intel_image.h"
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
index 05c35bd61b..d51d9ca8ab 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
@@ -36,7 +36,6 @@
 #include "intel_pixel.h"
 #include "intel_fbo.h"
 #include "intel_blit.h"
-#include "intel_batchbuffer.h"
 
 #define FILE_DEBUG_FLAG DEBUG_PIXEL
 
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index 2563897b23..345a9d9ccf 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -36,7 +36,6 @@
 
 #include "brw_context.h"
 #include "intel_screen.h"
-#include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_buffers.h"
 #include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index c4b205cd80..f05e521b9a 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -95,7 +95,6 @@ DRI_CONF_BEGIN
 DRI_CONF_END
 };
 
-#include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "intel_bufmgr.h"
 #include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 141996f707..34e59c921d 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -19,7 +19,6 @@
 
 #include "intel_mipmap_tree.h"
 #include "intel_buffer_objects.h"
-#include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_blit.h"
 #include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index b7e52bc481..7899efc04e 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -35,7 +35,6 @@
 #include "drivers/common/meta.h"
 
 #include "brw_context.h"
-#include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_mipmap_tree.h"
 #include "intel_blit.h"
diff --git a/src/mesa/drivers/dri/i965/intel_upload.c b/src/mesa/drivers/dri/i965/intel_upload.c
index deaae6c7ed..9e0f0c02e2 100644
--- a/src/mesa/drivers/dri/i965/intel_upload.c
+++ b/src/mesa/drivers/dri/i965/intel_upload.c
@@ -36,7 +36,6 @@
 #include "brw_context.h"
 #include "intel_blit.h"
 #include "intel_buffer_objects.h"
-#include "intel_batchbuffer.h"
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
 
-- 
2.11.0



More information about the mesa-dev mailing list