[Mesa-dev] [PATCH 1/7] i965: Include brw_reg.h in brw_disasm.c.
Kenneth Graunke
kenneth at whitecape.org
Tue Dec 10 02:33:12 PST 2013
We're going to move some things from brw_defines.h there in a moment.
Both files contain symbols named negate, so we need to arbitrarily
rename them. (The "m_" prefix is a convention I adopted in the Gen8+
code).
We can always rename the brw_reg.h copy of negate at a later date.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_disasm.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index ade7e7f..92fc889 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -31,6 +31,7 @@
#include "brw_context.h"
#include "brw_defines.h"
+#include "brw_reg.h"
const struct opcode_desc opcode_descs[128] = {
[BRW_OPCODE_MOV] = { .name = "mov", .nsrc = 1, .ndst = 1 },
@@ -114,7 +115,7 @@ const char * const conditional_modifier[16] = {
[BRW_CONDITIONAL_U] = ".u",
};
-static const char * const negate[2] = {
+static const char * const m_negate[2] = {
[0] = "",
[1] = "-",
};
@@ -635,7 +636,7 @@ static int src_da1 (FILE *file, unsigned type, unsigned _reg_file,
unsigned reg_num, unsigned sub_reg_num, unsigned __abs, unsigned _negate)
{
int err = 0;
- err |= control (file, "negate", negate, _negate, NULL);
+ err |= control (file, "negate", m_negate, _negate, NULL);
err |= control (file, "abs", _abs, __abs, NULL);
err |= reg (file, _reg_file, reg_num);
@@ -661,7 +662,7 @@ static int src_ia1 (FILE *file,
unsigned _vert_stride)
{
int err = 0;
- err |= control (file, "negate", negate, _negate, NULL);
+ err |= control (file, "negate", m_negate, _negate, NULL);
err |= control (file, "abs", _abs, __abs, NULL);
string (file, "g[a0");
@@ -689,7 +690,7 @@ static int src_da16 (FILE *file,
unsigned swz_w)
{
int err = 0;
- err |= control (file, "negate", negate, _negate, NULL);
+ err |= control (file, "negate", m_negate, _negate, NULL);
err |= control (file, "abs", _abs, __abs, NULL);
err |= reg (file, _reg_file, _reg_nr);
@@ -740,7 +741,7 @@ static int src0_3src (FILE *file, struct brw_instruction *inst)
unsigned swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3;
unsigned swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 0x3;
- err |= control (file, "negate", negate, inst->bits1.da3src.src0_negate, NULL);
+ err |= control (file, "negate", m_negate, inst->bits1.da3src.src0_negate, NULL);
err |= control (file, "abs", _abs, inst->bits1.da3src.src0_abs, NULL);
err |= reg (file, BRW_GENERAL_REGISTER_FILE, inst->bits2.da3src.src0_reg_nr);
@@ -791,7 +792,7 @@ static int src1_3src (FILE *file, struct brw_instruction *inst)
unsigned src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low |
(inst->bits3.da3src.src1_subreg_nr_high << 2));
- err |= control (file, "negate", negate, inst->bits1.da3src.src1_negate,
+ err |= control (file, "negate", m_negate, inst->bits1.da3src.src1_negate,
NULL);
err |= control (file, "abs", _abs, inst->bits1.da3src.src1_abs, NULL);
@@ -843,7 +844,7 @@ static int src2_3src (FILE *file, struct brw_instruction *inst)
unsigned swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3;
unsigned swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3;
- err |= control (file, "negate", negate, inst->bits1.da3src.src2_negate,
+ err |= control (file, "negate", m_negate, inst->bits1.da3src.src2_negate,
NULL);
err |= control (file, "abs", _abs, inst->bits1.da3src.src2_abs, NULL);
--
1.8.4.4
More information about the mesa-dev
mailing list