r600g,sb: Don't use standard macro name
authorJan Vesely <jan.vesely@rutgers.edu>
Tue, 17 May 2016 17:29:40 +0000 (13:29 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Tue, 17 May 2016 19:28:03 +0000 (15:28 -0400)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/drivers/r600/sb/sb_bc.h
src/gallium/drivers/r600/sb/sb_bc_builder.cpp
src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
src/gallium/drivers/r600/sb/sb_bc_fmt_def.inc
src/gallium/drivers/r600/sb/sb_bc_parser.cpp

index 696160098b521afba1021e322a978cbbacd03172..2c662acf914b5e5b9e6a45fea1eeb2db0541906c 100644 (file)
@@ -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
index 5dec169bac98dbe584633468ff26cdbe6810a865..b0df3d9a54490a51e3f0ac5148d06db28d42ee09 100644 (file)
@@ -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))
index b98b661ee82e05d4d6a073c6c6cffc97ecd90c24..8712abe5f7894158b60a5fb16e2d3f9bb008d202 100644 (file)
@@ -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();
        }
index b30baf09bc50d5af74bd1e6eadf5600877506c93..35ecee5701db393917ccd31bd496e8ec0db288be 100644 (file)
@@ -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)
index b3a3b56632170c4e7b20bafff858d4c50e373fbb..0983974ab5dc42e68e1e807068f2c57e12175bfc 100644 (file)
@@ -41,6 +41,7 @@
 #include "sb_bc.h"
 #include "sb_shader.h"
 #include "sb_pass.h"
+#include "util/macros.h"
 
 namespace r600_sb {