[Mesa-dev] [PATCH 11/23] i965/gs: Make MAX_GS_INPUT_VERTICES a #define in brw_context.h.

Kenneth Graunke kenneth at whitecape.org
Wed Sep 30 00:58:15 PDT 2015


For scalar VS, I'll need this in brw_fs.cpp as well.  It seems silly to
redeclare it in three places.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_context.h           | 2 ++
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 2 --
 src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp     | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 118d664..414a9f1 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -976,6 +976,8 @@ struct intel_batchbuffer {
    } saved;
 };
 
+#define MAX_GS_INPUT_VERTICES 6
+
 #define BRW_MAX_XFB_STREAMS 4
 
 struct brw_transform_feedback_object {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index d2edc57..f3a0299 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -30,8 +30,6 @@
 #include "brw_vec4_gs_visitor.h"
 #include "gen6_gs_visitor.h"
 
-const unsigned MAX_GS_INPUT_VERTICES = 6;
-
 namespace brw {
 
 vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler,
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
index 4c9c960..5fcc525 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
@@ -31,8 +31,6 @@
 
 #include "gen6_gs_visitor.h"
 
-const unsigned MAX_GS_INPUT_VERTICES = 6;
-
 namespace brw {
 
 void
-- 
2.5.3



More information about the mesa-dev mailing list