This is backwards from what we are going to want in the long term, which is:

- brw_vec4.h declares general-purpose vec4 infrastructure needed by
  both VS and GS
- brw_vs.h includes brw_vec4.h and adds VS-specific parts.
- brw_gs.h includes brw_vec4.h and adds GS-specific parts.

Note that at the moment brw_vec.h contains a fair amount of
VS-specific declarations--I plan to address that in a later patch.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp                    | 1 +
 src/mesa/drivers/dri/i965/brw_vec4.h                      | 5 ++++-
 src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp       | 1 +
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp            | 1 +
 src/mesa/drivers/dri/i965/brw_vec4_vp.cpp                 | 1 +
 src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp | 1 +
 6 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 429e8cc..d7671a4 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -23,6 +23,7 @@
 
 #include "brw_vec4.h"
 #include "brw_cfg.h"
+#include "brw_vs.h"
 
 extern "C" {
 #include "main/macros.h"
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h 
b/src/mesa/drivers/dri/i965/brw_vec4.h
index b6d4c4e..e46d2b1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -28,7 +28,6 @@
 #include "brw_shader.h"
 #include "main/compiler.h"
 #include "program/hash_table.h"
-#include "brw_vs.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -43,6 +42,10 @@ extern "C" {
 
 #include "glsl/ir.h"
 
+struct brw_vec4_compile;
+struct brw_vs_compile;
+struct brw_vec4_prog_key;
+
 #ifdef __cplusplus
 namespace brw {
 
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 10a9c57..0b27383 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -27,6 +27,7 @@ extern "C" {
 } /* extern "C" */
 
 #include "brw_vec4.h"
+#include "brw_vs.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 455d9dc..c307049 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -22,6 +22,7 @@
  */
 
 #include "brw_vec4.h"
+#include "brw_vs.h"
 #include "glsl/ir_uniform.h"
 extern "C" {
 #include "main/context.h"
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
index eedf59b..1787df8 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
@@ -29,6 +29,7 @@
 
 #include "brw_context.h"
 #include "brw_vec4.h"
+#include "brw_vs.h"
 extern "C" {
 #include "program/prog_parameter.h"
 #include "program/prog_print.h"
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 6e8391b..e141305 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
@@ -23,6 +23,7 @@
 
 #include <gtest/gtest.h>
 #include "brw_vec4.h"
+#include "brw_vs.h"
 
 using namespace brw;
 
-- 
1.8.3.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to