[Mesa-dev] [PATCH 13/13] i965: Clean up #includes in the compiler.
Matt Turner
mattst88 at gmail.com
Mon Nov 23 13:55:42 PST 2015
---
src/mesa/drivers/dri/i965/brw_blorp.cpp | 1 -
src/mesa/drivers/dri/i965/brw_blorp.h | 1 -
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 1 -
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 1 -
src/mesa/drivers/dri/i965/brw_context.h | 6 ------
src/mesa/drivers/dri/i965/brw_cs.c | 1 +
src/mesa/drivers/dri/i965/brw_disasm.c | 3 ---
src/mesa/drivers/dri/i965/brw_eu.h | 2 --
src/mesa/drivers/dri/i965/brw_fs.cpp | 13 -------------
src/mesa/drivers/dri/i965/brw_fs.h | 20 --------------------
.../drivers/dri/i965/brw_fs_channel_expressions.cpp | 2 --
.../drivers/dri/i965/brw_fs_cmod_propagation.cpp | 2 +-
.../drivers/dri/i965/brw_fs_combine_constants.cpp | 1 -
.../drivers/dri/i965/brw_fs_copy_propagation.cpp | 1 +
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 --
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ----
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 3 +--
.../drivers/dri/i965/brw_fs_vector_splitting.cpp | 4 +---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 18 ------------------
src/mesa/drivers/dri/i965/brw_gs.c | 1 +
src/mesa/drivers/dri/i965/brw_link.cpp | 7 +++----
src/mesa/drivers/dri/i965/brw_nir.c | 1 -
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 1 -
src/mesa/drivers/dri/i965/brw_program.c | 3 ---
.../drivers/dri/i965/brw_schedule_instructions.cpp | 2 --
src/mesa/drivers/dri/i965/brw_shader.cpp | 9 +++------
src/mesa/drivers/dri/i965/brw_shader.h | 7 ++-----
src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 --
src/mesa/drivers/dri/i965/brw_util.c | 4 ----
src/mesa/drivers/dri/i965/brw_util.h | 2 --
src/mesa/drivers/dri/i965/brw_vec4.cpp | 7 -------
src/mesa/drivers/dri/i965/brw_vec4.h | 14 +-------------
.../drivers/dri/i965/brw_vec4_cmod_propagation.cpp | 1 +
.../drivers/dri/i965/brw_vec4_copy_propagation.cpp | 4 +---
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 1 +
src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp | 1 -
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 1 -
src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 2 --
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 +--
src/mesa/drivers/dri/i965/brw_vs.h | 3 ---
src/mesa/drivers/dri/i965/brw_vue_map.c | 1 -
src/mesa/drivers/dri/i965/brw_wm.h | 1 -
src/mesa/drivers/dri/i965/brw_wm_iz.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 1 +
src/mesa/drivers/dri/i965/gen6_blorp.cpp | 2 --
src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp | 1 +
src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 --
src/mesa/drivers/dri/i965/gen7_cs_state.c | 2 ++
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 1 +
src/mesa/drivers/dri/i965/gen8_surface_state.c | 1 +
src/mesa/drivers/dri/i965/intel_debug.c | 1 -
src/mesa/drivers/dri/i965/intel_extensions.c | 2 --
src/mesa/drivers/dri/i965/intel_resolve_map.c | 1 -
.../drivers/dri/i965/test_vec4_copy_propagation.cpp | 1 +
.../drivers/dri/i965/test_vec4_register_coalesce.cpp | 1 +
55 files changed, 28 insertions(+), 154 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index 577b71e..1bc6d15 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -26,7 +26,6 @@
#include "intel_fbo.h"
#include "brw_blorp.h"
-#include "brw_defines.h"
#include "brw_state.h"
#define FILE_DEBUG_FLAG DEBUG_BLORP
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index ae494f9..a04a1df 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -25,7 +25,6 @@
#include <stdint.h>
-#include "brw_context.h"
#include "brw_reg.h"
#include "intel_mipmap_tree.h"
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index cb3c6f7..6439fbf 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -23,7 +23,6 @@
#include "main/teximage.h"
#include "main/fbobject.h"
-#include "main/renderbuffer.h"
#include "intel_fbo.h"
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
index 8e44eb4..14a8e50 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h
@@ -24,7 +24,6 @@
#ifndef BRW_BLORP_BLIT_EU_H
#define BRW_BLORP_BLIT_EU_H
-#include "brw_context.h"
#include "brw_fs.h"
class brw_blorp_eu_emitter
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index fe45edb..e45df46 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -34,15 +34,11 @@
#define BRWCONTEXT_INC
#include <stdbool.h>
-#include <string.h>
-#include "main/imports.h"
#include "main/macros.h"
-#include "main/mm.h"
#include "main/mtypes.h"
#include "brw_structs.h"
#include "brw_compiler.h"
#include "intel_aub.h"
-#include "program/prog_parameter.h"
#ifdef __cplusplus
extern "C" {
@@ -50,9 +46,7 @@ extern "C" {
#define virtual virt
#endif
-#include <drm.h>
#include <intel_bufmgr.h>
-#include <i915_drm.h>
#ifdef __cplusplus
#undef virtual
}
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 9c92faa..9ef9bd4 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -32,6 +32,7 @@
#include "intel_batchbuffer.h"
#include "brw_nir.h"
#include "brw_program.h"
+#include "glsl/ir_uniform.h"
void
brw_cs_fill_local_id_payload(const struct brw_cs_prog_data *prog_data,
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 650bdee..09eb239 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -21,10 +21,7 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#include <getopt.h>
-#include <unistd.h>
#include <stdarg.h>
#include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 81d4ef9..ef94347 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -35,11 +35,9 @@
#include <stdbool.h>
#include "brw_inst.h"
-#include "brw_structs.h"
#include "brw_defines.h"
#include "brw_reg.h"
#include "intel_asm_annotation.h"
-#include "program/prog_instruction.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 99b0998..dc062fd 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -28,19 +28,9 @@
* from the LIR.
*/
-#include <sys/types.h>
-
-#include "util/hash_table.h"
#include "main/macros.h"
-#include "main/shaderobj.h"
-#include "main/fbobject.h"
-#include "program/prog_parameter.h"
-#include "program/prog_print.h"
-#include "util/register_allocate.h"
-#include "program/hash_table.h"
#include "brw_context.h"
#include "brw_eu.h"
-#include "brw_wm.h"
#include "brw_fs.h"
#include "brw_cs.h"
#include "brw_nir.h"
@@ -48,10 +38,7 @@
#include "brw_cfg.h"
#include "brw_program.h"
#include "brw_dead_control_flow.h"
-#include "main/uniforms.h"
-#include "brw_fs_live_variables.h"
#include "glsl/nir/glsl_types.h"
-#include "program/sampler.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 2d408b2..278d8a1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -30,28 +30,8 @@
#include "brw_shader.h"
#include "brw_ir_fs.h"
#include "brw_fs_builder.h"
-
-extern "C" {
-
-#include <sys/types.h>
-
-#include "main/macros.h"
-#include "main/shaderobj.h"
-#include "main/uniforms.h"
-#include "program/prog_parameter.h"
-#include "program/prog_print.h"
-#include "program/prog_optimize.h"
-#include "util/register_allocate.h"
-#include "program/hash_table.h"
-#include "brw_context.h"
-#include "brw_eu.h"
-#include "brw_wm.h"
-#include "intel_asm_annotation.h"
-}
-#include "glsl/nir/glsl_types.h"
#include "glsl/ir.h"
#include "glsl/nir/nir.h"
-#include "program/sampler.h"
struct bblock_t;
namespace {
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index a13d001..b3fb0c6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -41,8 +41,6 @@
* we do retain the vector types in that case.
*/
-#include "main/core.h"
-#include "brw_wm.h"
#include "glsl/ir.h"
#include "glsl/ir_expression_flattening.h"
#include "glsl/nir/glsl_types.h"
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
index 7c01f1e..b5badae 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
@@ -22,8 +22,8 @@
*/
#include "brw_fs.h"
-#include "brw_fs_live_variables.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
/** @file brw_fs_cmod_propagation.cpp
*
diff --git a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
index c3ad7ad..c5280ac 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
@@ -35,7 +35,6 @@
*/
#include "brw_fs.h"
-#include "brw_fs_live_variables.h"
#include "brw_cfg.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index fa29a09..fd25307 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -37,6 +37,7 @@
#include "util/bitset.h"
#include "brw_fs.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
namespace { /* avoid conflict with opt_copy_propagation_elements */
struct acp_entry : public exec_node {
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 48cb13d..c25da07 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -27,8 +27,6 @@
* native instructions.
*/
-#include "main/macros.h"
-#include "brw_context.h"
#include "brw_eu.h"
#include "brw_fs.h"
#include "brw_cfg.h"
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 993367e..15bd98f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -22,13 +22,9 @@
*/
#include "glsl/ir.h"
-#include "glsl/ir_optimization.h"
-#include "glsl/nir/glsl_to_nir.h"
#include "main/shaderimage.h"
-#include "program/prog_to_nir.h"
#include "brw_fs.h"
#include "brw_fs_surface_builder.h"
-#include "brw_vec4_gs_visitor.h"
#include "brw_nir.h"
#include "brw_program.h"
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index ef59c24..4c41e54 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -28,8 +28,7 @@
#include "brw_eu.h"
#include "brw_fs.h"
#include "brw_cfg.h"
-#include "glsl/nir/glsl_types.h"
-#include "glsl/ir_optimization.h"
+#include "util/register_allocate.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
index cab5af3..b7bad29 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
@@ -37,10 +37,8 @@
* behavior we want for the results of texture lookups, but probably not for
*/
-#include "main/core.h"
-#include "brw_context.h"
+#include "main/imports.h"
#include "glsl/ir.h"
-#include "glsl/ir_visitor.h"
#include "glsl/ir_rvalue_visitor.h"
#include "glsl/nir/glsl_types.h"
#include "util/hash_table.h"
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 1e20216..640e047 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -27,26 +27,8 @@
* makes it easier to do backend-specific optimizations than doing so
* in the GLSL IR or in the native code.
*/
-#include <sys/types.h>
-
-#include "main/macros.h"
-#include "main/shaderobj.h"
-#include "program/prog_parameter.h"
-#include "program/prog_print.h"
-#include "program/prog_optimize.h"
-#include "util/register_allocate.h"
-#include "program/hash_table.h"
-#include "brw_context.h"
-#include "brw_eu.h"
-#include "brw_wm.h"
-#include "brw_cs.h"
-#include "brw_vec4.h"
-#include "brw_vec4_gs_visitor.h"
#include "brw_fs.h"
-#include "main/uniforms.h"
#include "glsl/nir/glsl_types.h"
-#include "glsl/ir_optimization.h"
-#include "program/sampler.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 136be68..02e6a8f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -34,6 +34,7 @@
#include "brw_ff_gs.h"
#include "brw_nir.h"
#include "brw_program.h"
+#include "glsl/ir_uniform.h"
static void
assign_gs_binding_table_offsets(const struct brw_device_info *devinfo,
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index db0c22e..31d29ec 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -21,17 +21,16 @@
* IN THE SOFTWARE.
*/
-#include "main/macros.h"
#include "brw_context.h"
-#include "brw_vs.h"
-#include "brw_gs.h"
+#include "brw_shader.h"
#include "brw_fs.h"
-#include "brw_cfg.h"
#include "brw_nir.h"
#include "brw_program.h"
#include "glsl/ir_optimization.h"
#include "glsl/glsl_parser_extras.h"
+#include "program/program.h"
#include "main/shaderapi.h"
+#include "main/uniforms.h"
/**
* Performs a compile of the shader stages even when we don't know
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 91358d8..db45bdc 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -23,7 +23,6 @@
#include "brw_nir.h"
#include "brw_shader.h"
-#include "glsl/glsl_parser_extras.h"
#include "glsl/nir/glsl_to_nir.h"
#include "program/prog_to_nir.h"
diff --git a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
index 87b3839..21caca5 100644
--- a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
+++ b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
@@ -23,7 +23,6 @@
#include "brw_shader.h"
#include "brw_nir.h"
-#include "glsl/ir.h"
#include "glsl/ir_uniform.h"
static void
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 0c7692e..e7f4f80 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -31,8 +31,6 @@
#include <pthread.h>
#include "main/imports.h"
-#include "main/enums.h"
-#include "main/shaderobj.h"
#include "program/prog_parameter.h"
#include "program/prog_print.h"
#include "program/program.h"
@@ -45,7 +43,6 @@
#include "brw_context.h"
#include "brw_shader.h"
#include "brw_nir.h"
-#include "brw_wm.h"
#include "intel_batchbuffer.h"
static unsigned
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 776f75d..60f7fd9 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -30,8 +30,6 @@
#include "brw_vec4.h"
#include "brw_cfg.h"
#include "brw_shader.h"
-#include "glsl/nir/glsl_types.h"
-#include "glsl/ir_optimization.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 81f413e..ecd41fb 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -21,16 +21,13 @@
* IN THE SOFTWARE.
*/
-#include "main/macros.h"
#include "brw_context.h"
-#include "brw_vs.h"
-#include "brw_gs.h"
-#include "brw_fs.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
#include "brw_nir.h"
-#include "glsl/ir_optimization.h"
#include "glsl/glsl_parser_extras.h"
-#include "main/shaderapi.h"
+#include "main/shaderobj.h"
+#include "main/uniforms.h"
static void
shader_debug_log_mesa(void *data, const char *fmt, ...)
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 5c226ec..8c5778f 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -21,20 +21,17 @@
* IN THE SOFTWARE.
*/
+#pragma once
+
#include <stdint.h>
#include "brw_reg.h"
#include "brw_defines.h"
#include "brw_context.h"
-#include "main/compiler.h"
-#include "glsl/ir.h"
-#include "program/prog_parameter.h"
#ifdef __cplusplus
#include "brw_ir_allocator.h"
#endif
-#pragma once
-
#define MAX_SAMPLER_MESSAGE_SIZE 11
#define MAX_VGRF_SIZE 16
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 55e7e64..e04ba7c 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -20,13 +20,11 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
-#include "main/context.h"
#include "main/mtypes.h"
#include "brw_context.h"
#include "brw_state.h"
#include "brw_defines.h"
-#include "brw_wm.h"
struct surface_format_info {
bool exists;
diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c
index f801dc0..bf7f9c6 100644
--- a/src/mesa/drivers/dri/i965/brw_util.c
+++ b/src/mesa/drivers/dri/i965/brw_util.c
@@ -30,10 +30,6 @@
*/
-#include <assert.h>
-
-#include "main/mtypes.h"
-#include "program/prog_parameter.h"
#include "brw_util.h"
#include "brw_defines.h"
diff --git a/src/mesa/drivers/dri/i965/brw_util.h b/src/mesa/drivers/dri/i965/brw_util.h
index 68f4318..1f27e98 100644
--- a/src/mesa/drivers/dri/i965/brw_util.h
+++ b/src/mesa/drivers/dri/i965/brw_util.h
@@ -33,8 +33,6 @@
#ifndef BRW_UTIL_H
#define BRW_UTIL_H
-#include "main/mtypes.h"
-#include "main/imports.h"
#include "brw_context.h"
extern GLuint brw_translate_blend_factor( GLenum factor );
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 97eaea6..0eab5aa 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -28,14 +28,7 @@
#include "brw_nir.h"
#include "brw_vec4_live_variables.h"
#include "brw_dead_control_flow.h"
-
-extern "C" {
-#include "main/macros.h"
-#include "main/shaderobj.h"
-#include "program/prog_print.h"
#include "program/prog_parameter.h"
-}
-#include "main/context.h"
#define MAX_INSTRUCTION (1 << 30)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 0754bc7..25b1139 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -24,23 +24,11 @@
#ifndef BRW_VEC4_H
#define BRW_VEC4_H
-#include <stdint.h>
#include "brw_shader.h"
-#include "main/compiler.h"
-#include "program/hash_table.h"
+#include "brw_program.h"
#ifdef __cplusplus
#include "brw_ir_vec4.h"
-
-extern "C" {
-#endif
-
-#include "brw_context.h"
-#include "brw_eu.h"
-#include "intel_asm_annotation.h"
-
-#ifdef __cplusplus
-}; /* extern "C" */
#endif
#include "glsl/ir.h"
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
index 7aa8f5d..0c8224f 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
@@ -31,6 +31,7 @@
#include "brw_vec4.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
namespace brw {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index ce5f7ab..c6f0b0d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -31,9 +31,7 @@
#include "brw_vec4.h"
#include "brw_cfg.h"
-extern "C" {
-#include "main/macros.h"
-}
+#include "brw_eu.h"
namespace brw {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index eeb7a8a..acf9286 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -23,6 +23,7 @@
#include "glsl/glsl_parser_extras.h"
#include "brw_vec4.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
#include "brw_program.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp
index 6bc3947..e51ef4b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp
@@ -21,7 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "brw_nir.h"
#include "brw_vec4_gs_visitor.h"
namespace brw {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 05de972..4aed60e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -26,7 +26,6 @@
#include "brw_vec4_builder.h"
#include "brw_vec4_surface_builder.h"
#include "brw_program.h"
-#include "glsl/ir_uniform.h"
using namespace brw;
using namespace brw::surface_access;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index 6d27a46..01c9c96 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -21,10 +21,8 @@
* IN THE SOFTWARE.
*/
-#include "main/macros.h"
#include "util/register_allocate.h"
#include "brw_vec4.h"
-#include "brw_vs.h"
#include "brw_cfg.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index cb92b4f..b1e5398 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -23,9 +23,8 @@
#include "brw_vec4.h"
#include "brw_cfg.h"
+#include "brw_eu.h"
#include "brw_program.h"
-#include "glsl/ir_uniform.h"
-#include "program/sampler.h"
namespace brw {
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index bcb5e7b..31ab1ce 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -34,10 +34,7 @@
#define BRW_VS_H
-#include "brw_context.h"
-#include "brw_eu.h"
#include "brw_vec4.h"
-#include "program/program.h"
/**
* The VF can't natively handle certain types of attributes, such as GL_FIXED
diff --git a/src/mesa/drivers/dri/i965/brw_vue_map.c b/src/mesa/drivers/dri/i965/brw_vue_map.c
index edb1608..6cb3da4 100644
--- a/src/mesa/drivers/dri/i965/brw_vue_map.c
+++ b/src/mesa/drivers/dri/i965/brw_vue_map.c
@@ -40,7 +40,6 @@
*/
-#include "main/compiler.h"
#include "brw_context.h"
static inline void
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 579ac67..7130a61 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -35,7 +35,6 @@
#include <stdbool.h>
-#include "program/prog_instruction.h"
#include "brw_context.h"
#include "brw_eu.h"
diff --git a/src/mesa/drivers/dri/i965/brw_wm_iz.cpp b/src/mesa/drivers/dri/i965/brw_wm_iz.cpp
index 6f22f29..83e1855 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_iz.cpp
+++ b/src/mesa/drivers/dri/i965/brw_wm_iz.cpp
@@ -30,8 +30,8 @@
*/
-#include "main/mtypes.h"
#include "brw_fs.h"
+#include "brw_wm.h"
#undef P /* prompted depth */
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 f88f8d5..5b0f0b9 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -36,6 +36,7 @@
#include "main/samplerobj.h"
#include "main/shaderimage.h"
#include "program/prog_parameter.h"
+#include "program/prog_instruction.h"
#include "main/framebuffer.h"
#include "intel_mipmap_tree.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index 23fea5a..079e1ba 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -24,11 +24,9 @@
#include <assert.h>
#include "intel_batchbuffer.h"
-#include "intel_fbo.h"
#include "intel_mipmap_tree.h"
#include "brw_context.h"
-#include "brw_defines.h"
#include "brw_state.h"
#include "brw_blorp.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
index 3840ce0..9935557 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
@@ -30,6 +30,7 @@
*/
#include "gen6_gs_visitor.h"
+#include "brw_eu.h"
namespace brw {
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 4c6ab0c..e87b9d1 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -24,11 +24,9 @@
#include <assert.h>
#include "intel_batchbuffer.h"
-#include "intel_fbo.h"
#include "intel_mipmap_tree.h"
#include "brw_context.h"
-#include "brw_defines.h"
#include "brw_state.h"
#include "brw_blorp.h"
diff --git a/src/mesa/drivers/dri/i965/gen7_cs_state.c b/src/mesa/drivers/dri/i965/gen7_cs_state.c
index 2d7c04f..38b0258 100644
--- a/src/mesa/drivers/dri/i965/gen7_cs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_cs_state.c
@@ -30,6 +30,8 @@
#include "intel_mipmap_tree.h"
#include "intel_batchbuffer.h"
#include "brw_state.h"
+#include "program/prog_statevars.h"
+#include "glsl/ir_uniform.h"
static unsigned
get_cs_thread_count(const struct brw_cs_prog_data *cs_prog_data)
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 438caef..2aa395b 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -26,6 +26,7 @@
#include "main/texformat.h"
#include "main/teximage.h"
#include "program/prog_parameter.h"
+#include "program/prog_instruction.h"
#include "intel_mipmap_tree.h"
#include "intel_batchbuffer.h"
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 9cdd1c7..80252a5 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -27,6 +27,7 @@
#include "main/texformat.h"
#include "main/teximage.h"
#include "program/prog_parameter.h"
+#include "program/prog_instruction.h"
#include "intel_mipmap_tree.h"
#include "intel_batchbuffer.h"
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index f53c4ab..c001439 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -31,7 +31,6 @@
#include "brw_context.h"
#include "intel_debug.h"
-#include "utils.h"
#include "util/u_atomic.h" /* for p_atomic_cmpxchg */
#include "util/debug.h"
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 2e2459c..bec318f 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -27,8 +27,6 @@
#include "brw_context.h"
#include "intel_batchbuffer.h"
-#include "intel_reg.h"
-#include "utils.h"
/**
* Test if we can use MI_LOAD_REGISTER_MEM from an untrusted batchbuffer.
diff --git a/src/mesa/drivers/dri/i965/intel_resolve_map.c b/src/mesa/drivers/dri/i965/intel_resolve_map.c
index bf6bcf2..3df4b88 100644
--- a/src/mesa/drivers/dri/i965/intel_resolve_map.c
+++ b/src/mesa/drivers/dri/i965/intel_resolve_map.c
@@ -23,7 +23,6 @@
#include "intel_resolve_map.h"
-#include <assert.h>
#include <stdlib.h>
/**
diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
index ede409b..12667ff 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
@@ -24,6 +24,7 @@
#include <gtest/gtest.h>
#include "brw_vec4.h"
#include "brw_vs.h"
+#include "program/program.h"
using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
index 90a6bc3..34dcf95 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
@@ -24,6 +24,7 @@
#include <gtest/gtest.h>
#include "brw_vec4.h"
#include "brw_vs.h"
+#include "program/program.h"
using namespace brw;
--
2.4.9
More information about the mesa-dev
mailing list