[Mesa-dev] [PATCH 1/1] r600g,sb: Don't use standard macro name

Jan Vesely jan.vesely at rutgers.edu
Tue May 17 17:32:04 UTC 2016


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 src/gallium/drivers/r600/sb/sb_bc.h           | 1 -
 src/gallium/drivers/r600/sb/sb_bc_builder.cpp | 6 +++---
 src/gallium/drivers/r600/sb/sb_bc_decoder.cpp | 6 +++---
 src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc | 8 ++++----
 src/gallium/drivers/r600/sb/sb_bc_parser.cpp  | 1 +
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index 6961600..2c662ac 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -793,7 +793,6 @@ public: \
 
 // CLAMP macro defined elsewhere interferes with bytecode field name
 #undef CLAMP
-#undef ARRAY_SIZE
 #include "sb_bc_fmt_def.inc"
 
 #undef BC_FORMAT_BEGIN
diff --git a/src/gallium/drivers/r600/sb/sb_bc_builder.cpp b/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
index 5dec169..b0df3d9 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
@@ -334,7 +334,7 @@ int bc_builder::build_cf_mem(cf_node* n) {
 
 	if (!ctx.is_egcm())
 		bb << CF_ALLOC_EXPORT_WORD1_BUF_R6R7()
-				.ARRAY_SIZE(bc.array_size)
+				.ARR_SIZE(bc.array_size)
 				.BARRIER(bc.barrier)
 				.BURST_COUNT(bc.burst_count)
 				.CF_INST(ctx.cf_opcode(bc.op))
@@ -345,7 +345,7 @@ int bc_builder::build_cf_mem(cf_node* n) {
 
 	else if (ctx.is_evergreen())
 		bb << CF_ALLOC_EXPORT_WORD1_BUF_EG()
-				.ARRAY_SIZE(bc.array_size)
+				.ARR_SIZE(bc.array_size)
 				.BARRIER(bc.barrier)
 				.BURST_COUNT(bc.burst_count)
 				.CF_INST(ctx.cf_opcode(bc.op))
@@ -356,7 +356,7 @@ int bc_builder::build_cf_mem(cf_node* n) {
 
 	else // cayman
 		bb << CF_ALLOC_EXPORT_WORD1_BUF_CM()
-		.ARRAY_SIZE(bc.array_size)
+		.ARR_SIZE(bc.array_size)
 		.BARRIER(bc.barrier)
 		.BURST_COUNT(bc.burst_count)
 		.CF_INST(ctx.cf_opcode(bc.op))
diff --git a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
index b98b661..8712abe 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
@@ -260,7 +260,7 @@ int bc_decoder::decode_cf_mem(unsigned & i, bc_cf& bc) {
 		bc.end_of_program = w1.get_END_OF_PROGRAM();
 		bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
 		bc.mark = w1.get_MARK();
-		bc.array_size = w1.get_ARRAY_SIZE();
+		bc.array_size = w1.get_ARR_SIZE();
 		bc.comp_mask = w1.get_COMP_MASK();
 
 	} else if (ctx.is_cayman()) {
@@ -269,7 +269,7 @@ int bc_decoder::decode_cf_mem(unsigned & i, bc_cf& bc) {
 		bc.burst_count = w1.get_BURST_COUNT();
 		bc.mark = w1.get_MARK();
 		bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
-		bc.array_size = w1.get_ARRAY_SIZE();
+		bc.array_size = w1.get_ARR_SIZE();
 		bc.comp_mask = w1.get_COMP_MASK();
 
 	} else { // r67
@@ -279,7 +279,7 @@ int bc_decoder::decode_cf_mem(unsigned & i, bc_cf& bc) {
 		bc.end_of_program = w1.get_END_OF_PROGRAM();
 		bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
 		bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
-		bc.array_size = w1.get_ARRAY_SIZE();
+		bc.array_size = w1.get_ARR_SIZE();
 		bc.comp_mask = w1.get_COMP_MASK();
 		bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
 	}
diff --git a/src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc b/src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc
index b30baf0..35ecee5 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc
+++ b/src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc
@@ -168,7 +168,7 @@ BC_FIELD(CF_ALLOC_EXPORT_WORD0_RAT, ELEM_SIZE,      ES,         31, 30)
 BC_FORMAT_END(CF_ALLOC_EXPORT_WORD0_RAT)
 
 BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, R6R7)
-BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARRAY_SIZE,         ARR_SZ,     11, 0)
+BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
 BC_RSRVD(CF_ALLOC_EXPORT_WORD1_BUF,                                 16, 16)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      20, 17)
@@ -180,7 +180,7 @@ BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BARRIER,            B,          31, 31)
 BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_BUF)
 
 BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, EG)
-BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARRAY_SIZE,         ARR_SZ,     11, 0)
+BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      19, 16)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, VALID_PIXEL_MODE,   VPM,        20, 20)
@@ -191,7 +191,7 @@ BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BARRIER,            B,          31, 31)
 BC_FORMAT_END(CF_ALLOC_EXPORT_WORD1_BUF)
 
 BC_FORMAT_BEGIN_HW(CF_ALLOC_EXPORT_WORD1_BUF, CM)
-BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARRAY_SIZE,         ARR_SZ,     11, 0)
+BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, ARR_SIZE,           ARR_SZ,     11, 0)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, COMP_MASK,          MASK,       15, 12)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, BURST_COUNT,        BURST,      19, 16)
 BC_FIELD(CF_ALLOC_EXPORT_WORD1_BUF, VALID_PIXEL_MODE,   VPM,        20, 20)
@@ -568,4 +568,4 @@ BC_FIELD(MEM_GDS_WORD2,     DST_SEL_X,              DSX,        2, 0)
 BC_FIELD(MEM_GDS_WORD2,     DST_SEL_Y,              DSY,        5, 3)
 BC_FIELD(MEM_GDS_WORD2,     DST_SEL_Z,              DSZ,        8, 6)
 BC_FIELD(MEM_GDS_WORD2,     DST_SEL_W,              DSW,       11, 9)
-BC_FORMAT_END(MEM_GDS_WORD2)
\ No newline at end of file
+BC_FORMAT_END(MEM_GDS_WORD2)
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index 87a6c97..ae92a76 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -41,6 +41,7 @@
 #include "sb_bc.h"
 #include "sb_shader.h"
 #include "sb_pass.h"
+#include "util/macros.h"
 
 namespace r600_sb {
 
-- 
2.5.5



More information about the mesa-dev mailing list