Mesa (master): r600g: move shader structures into r600_shader.h

Marek Olšák mareko at kemper.freedesktop.org
Fri Oct 12 17:01:18 UTC 2012


Module: Mesa
Branch: master
Commit: 555c8d500a4a09445a892316610a428d408318ed
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=555c8d500a4a09445a892316610a428d408318ed

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Oct 12 18:30:51 2012 +0200

r600g: move shader structures into r600_shader.h

---

 src/gallium/drivers/r600/eg_asm.c            |    1 +
 src/gallium/drivers/r600/evergreen_state.c   |    1 +
 src/gallium/drivers/r600/r600_asm.c          |    1 +
 src/gallium/drivers/r600/r600_asm.h          |    4 +---
 src/gallium/drivers/r600/r600_pipe.h         |   24 ++----------------------
 src/gallium/drivers/r600/r600_shader.c       |    1 +
 src/gallium/drivers/r600/r600_shader.h       |   21 +++++++++++++++++++++
 src/gallium/drivers/r600/r600_state.c        |    1 +
 src/gallium/drivers/r600/r600_state_common.c |    1 +
 9 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c
index 00ac4a8..310d424 100644
--- a/src/gallium/drivers/r600/eg_asm.c
+++ b/src/gallium/drivers/r600/eg_asm.c
@@ -22,6 +22,7 @@
  */
 #include "r600_pipe.h"
 #include "r600_opcodes.h"
+#include "r600_shader.h"
 
 #include "util/u_memory.h"
 #include "eg_sq.h"
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 37f1392..330c021 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -21,6 +21,7 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "r600_formats.h"
+#include "r600_shader.h"
 #include "evergreend.h"
 
 #include "pipe/p_shader_tokens.h"
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 37e8bf0..066fb67 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -23,6 +23,7 @@
 #include "r600_sq.h"
 #include "r600_opcodes.h"
 #include "r600_formats.h"
+#include "r600_shader.h"
 #include "r600d.h"
 
 #include <errno.h>
diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h
index d8f258f..8a9f318 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -23,9 +23,7 @@
 #ifndef R600_ASM_H
 #define R600_ASM_H
 
-#include "r600.h"
-
-struct r600_context;
+#include "r600_pipe.h"
 
 struct r600_bytecode_alu_src {
 	unsigned			sel;
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index bf3d0bd..578cbbe 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -31,7 +31,6 @@
 #include "r600.h"
 #include "r600_llvm.h"
 #include "r600_public.h"
-#include "r600_shader.h"
 #include "r600_resource.h"
 #include "evergreen_compute.h"
 
@@ -46,6 +45,8 @@
 #define R600_BIG_ENDIAN 0
 #endif
 
+struct r600_shader_key;
+
 /* This encapsulates a state or an operation which can emitted into the GPU
  * command stream. It's not limited to states only, it can be used for anything
  * that wants to write commands into the CS (e.g. cache flushes). */
@@ -261,27 +262,6 @@ struct r600_pipe_shader_selector {
 	unsigned	nr_ps_max_color_exports;
 };
 
-struct r600_shader_key {
-	unsigned color_two_side:1;
-	unsigned alpha_to_one:1;
-	unsigned nr_cbufs:4;
-};
-
-struct r600_pipe_shader {
-	struct r600_pipe_shader_selector *selector;
-	struct r600_pipe_shader	*next_variant;
-	struct r600_shader		shader;
-	struct r600_pipe_state		rstate;
-	struct r600_resource		*bo;
-	unsigned	sprite_coord_enable;
-	unsigned	flatshade;
-	unsigned	pa_cl_vs_out_cntl;
-	unsigned	nr_ps_color_outputs;
-	struct r600_shader_key	key;
-	unsigned		db_shader_control;
-	unsigned		ps_depth_export;
-};
-
 struct r600_pipe_sampler_state {
 	uint32_t			tex_sampler_words[3];
 	uint32_t			border_color[4];
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 0b45d4f..053a988 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -24,6 +24,7 @@
 #include "r600_llvm.h"
 #include "r600_formats.h"
 #include "r600_opcodes.h"
+#include "r600_shader.h"
 #include "r600d.h"
 
 #include "pipe/p_shader_tokens.h"
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h
index 2b8412a..f76d591 100644
--- a/src/gallium/drivers/r600/r600_shader.h
+++ b/src/gallium/drivers/r600/r600_shader.h
@@ -62,4 +62,25 @@ struct r600_shader {
 	boolean			vs_out_point_size;
 };
 
+struct r600_shader_key {
+	unsigned color_two_side:1;
+	unsigned alpha_to_one:1;
+	unsigned nr_cbufs:4;
+};
+
+struct r600_pipe_shader {
+	struct r600_pipe_shader_selector *selector;
+	struct r600_pipe_shader	*next_variant;
+	struct r600_shader	shader;
+	struct r600_pipe_state	rstate;
+	struct r600_resource	*bo;
+	unsigned		sprite_coord_enable;
+	unsigned		flatshade;
+	unsigned		pa_cl_vs_out_cntl;
+	unsigned		nr_ps_color_outputs;
+	struct r600_shader_key	key;
+	unsigned		db_shader_control;
+	unsigned		ps_depth_export;
+};
+
 #endif
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 208973a..7ae4558 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -21,6 +21,7 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "r600_formats.h"
+#include "r600_shader.h"
 #include "r600d.h"
 
 #include "pipe/p_shader_tokens.h"
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 8b8e34d..ef18f6b 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -25,6 +25,7 @@
  *          Jerome Glisse <jglisse at redhat.com>
  */
 #include "r600_formats.h"
+#include "r600_shader.h"
 #include "r600d.h"
 
 #include "util/u_draw_quad.h"




More information about the mesa-commit mailing list