[Mesa-dev,1/6] glsl_to_tgsi: cleanup includes

Submitted by Marek Olšák on April 11, 2015, 7:12 p.m.

Details

Message ID 1428779554-27140-1-git-send-email-maraeo@gmail.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Marek Olšák April 11, 2015, 7:12 p.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/mesa/state_tracker/st_atom_shader.c    |  3 +--
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 24 ++++--------------------
 src/mesa/state_tracker/st_glsl_to_tgsi.h   |  7 ++++---
 3 files changed, 9 insertions(+), 25 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 73768ed..629f54f 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -40,9 +40,8 @@ 
 #include "program/program.h"
 
 #include "pipe/p_context.h"
-
+#include "pipe/p_shader_tokens.h"
 #include "util/u_simple_shaders.h"
-
 #include "cso_cache/cso_context.h"
 
 #include "st_context.h"
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index f5f8128..5fa7a41 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -30,40 +30,24 @@ 
  * Translate GLSL IR to TGSI.
  */
 
-#include <stdio.h>
-#include "main/compiler.h"
-#include "ir.h"
-#include "ir_visitor.h"
-#include "ir_expression_flattening.h"
-#include "glsl_types.h"
+#include "st_glsl_to_tgsi.h"
+
 #include "glsl_parser_extras.h"
-#include "../glsl/program.h"
 #include "ir_optimization.h"
-#include "ast.h"
 
-#include "main/mtypes.h"
 #include "main/shaderobj.h"
 #include "main/uniforms.h"
 #include "main/shaderapi.h"
-#include "program/hash_table.h"
 #include "program/prog_instruction.h"
-#include "program/prog_optimize.h"
-#include "program/prog_print.h"
-#include "program/program.h"
-#include "program/prog_parameter.h"
 #include "program/sampler.h"
 
-#include "pipe/p_compiler.h"
 #include "pipe/p_context.h"
 #include "pipe/p_screen.h"
-#include "pipe/p_shader_tokens.h"
-#include "pipe/p_state.h"
-#include "util/u_math.h"
 #include "tgsi/tgsi_ureg.h"
 #include "tgsi/tgsi_info.h"
-#include "st_context.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
 #include "st_program.h"
-#include "st_glsl_to_tgsi.h"
 #include "st_mesa_to_tgsi.h"
 
 
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.h b/src/mesa/state_tracker/st_glsl_to_tgsi.h
index 5ed6407..2cb80bc 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.h
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.h
@@ -22,17 +22,18 @@ 
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include "pipe/p_defines.h"
+#include "main/mtypes.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "main/glheader.h"
-#include "tgsi/tgsi_ureg.h"
-
 struct gl_context;
 struct gl_shader;
 struct gl_shader_program;
 struct glsl_to_tgsi_visitor;
+struct ureg_program;
 
 enum pipe_error st_translate_program(
    struct gl_context *ctx,

Comments

On 04/11/2015 01:12 PM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak@amd.com>
>
> ---
>   src/mesa/state_tracker/st_atom_shader.c    |  3 +--
>   src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 24 ++++--------------------
>   src/mesa/state_tracker/st_glsl_to_tgsi.h   |  7 ++++---
>   3 files changed, 9 insertions(+), 25 deletions(-)
>

Series LGTM.

Reviewed-by: Brian Paul <brianp@vmware.com>