intel/brw: Rename brw_reg() helper to brw_make_reg()

To avoid conflict with the name of the type later on.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29791>
This commit is contained in:
Caio Oliveira
2024-06-18 23:25:14 -07:00
committed by Marge Bot
parent 6b2405e1f5
commit 69f4ed3102
3 changed files with 64 additions and 64 deletions

View File

@@ -2007,7 +2007,7 @@ fs_visitor::emit_repclear_shader()
/* We pass the clear color as a flat input. Copy it to the output. */ /* We pass the clear color as a flat input. Copy it to the output. */
fs_reg color_input = fs_reg color_input =
brw_reg(BRW_GENERAL_REGISTER_FILE, 2, 3, 0, 0, BRW_TYPE_UD, brw_make_reg(BRW_GENERAL_REGISTER_FILE, 2, 3, 0, 0, BRW_TYPE_UD,
BRW_VERTICAL_STRIDE_8, BRW_WIDTH_2, BRW_HORIZONTAL_STRIDE_4, BRW_VERTICAL_STRIDE_8, BRW_WIDTH_2, BRW_HORIZONTAL_STRIDE_4,
BRW_SWIZZLE_XYZW, WRITEMASK_XYZW); BRW_SWIZZLE_XYZW, WRITEMASK_XYZW);

View File

@@ -93,17 +93,17 @@ isPowerofTwo(unsigned int x)
static struct brw_reg static struct brw_reg
set_direct_src_operand(struct brw_reg *reg, int type) set_direct_src_operand(struct brw_reg *reg, int type)
{ {
return brw_reg(reg->file, return brw_make_reg(reg->file,
reg->nr, reg->nr,
reg->subnr, reg->subnr,
0, // negate 0, // negate
0, // abs 0, // abs
type, type,
0, // vstride 0, // vstride
0, // width 0, // width
0, // hstride 0, // hstride
BRW_SWIZZLE_NOOP, BRW_SWIZZLE_NOOP,
WRITEMASK_XYZW); WRITEMASK_XYZW);
} }
static void static void
@@ -1471,17 +1471,17 @@ directsrcaccoperand:
srcarcoperandex: srcarcoperandex:
srcarcoperandex_typed region reg_type srcarcoperandex_typed region reg_type
{ {
$$ = brw_reg($1.file, $$ = brw_make_reg($1.file,
$1.nr, $1.nr,
$1.subnr, $1.subnr,
0, 0,
0, 0,
$3, $3,
$2.vstride, $2.vstride,
$2.width, $2.width,
$2.hstride, $2.hstride,
BRW_SWIZZLE_NOOP, BRW_SWIZZLE_NOOP,
WRITEMASK_XYZW); WRITEMASK_XYZW);
} }
| nullreg region reg_type | nullreg region reg_type
{ {
@@ -1508,17 +1508,17 @@ srcarcoperandex_typed:
indirectsrcoperand: indirectsrcoperand:
negate abs indirectgenreg indirectregion swizzle reg_type negate abs indirectgenreg indirectregion swizzle reg_type
{ {
$$ = brw_reg($3.file, $$ = brw_make_reg($3.file,
0, 0,
$3.subnr, $3.subnr,
$1, // negate $1, // negate
$2, // abs $2, // abs
$6, $6,
$4.vstride, $4.vstride,
$4.width, $4.width,
$4.hstride, $4.hstride,
$5, $5,
WRITEMASK_X); WRITEMASK_X);
$$.address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER; $$.address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER;
// brw_reg set indirect_offset to 0 so set it to valid value // brw_reg set indirect_offset to 0 so set it to valid value
@@ -1536,17 +1536,17 @@ directgenreg_list:
directsrcoperand: directsrcoperand:
negate abs directgenreg_list region swizzle reg_type negate abs directgenreg_list region swizzle reg_type
{ {
$$ = brw_reg($3.file, $$ = brw_make_reg($3.file,
$3.nr, $3.nr,
$3.subnr, $3.subnr,
$1, $1,
$2, $2,
$6, $6,
$4.vstride, $4.vstride,
$4.width, $4.width,
$4.hstride, $4.hstride,
$5, $5,
WRITEMASK_X); WRITEMASK_X);
} }
| srcarcoperandex | srcarcoperandex
; ;

View File

@@ -356,17 +356,17 @@ brw_int_type(unsigned sz, bool is_signed)
* \param writemask WRITEMASK_X/Y/Z/W bitfield * \param writemask WRITEMASK_X/Y/Z/W bitfield
*/ */
static inline struct brw_reg static inline struct brw_reg
brw_reg(enum brw_reg_file file, brw_make_reg(enum brw_reg_file file,
unsigned nr, unsigned nr,
unsigned subnr, unsigned subnr,
unsigned negate, unsigned negate,
unsigned abs, unsigned abs,
enum brw_reg_type type, enum brw_reg_type type,
unsigned vstride, unsigned vstride,
unsigned width, unsigned width,
unsigned hstride, unsigned hstride,
unsigned swizzle, unsigned swizzle,
unsigned writemask) unsigned writemask)
{ {
struct brw_reg reg; struct brw_reg reg;
if (file == BRW_GENERAL_REGISTER_FILE) if (file == BRW_GENERAL_REGISTER_FILE)
@@ -413,7 +413,7 @@ brw_reg(enum brw_reg_file file,
static inline struct brw_reg static inline struct brw_reg
brw_vec16_reg(enum brw_reg_file file, unsigned nr, unsigned subnr) brw_vec16_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
{ {
return brw_reg(file, return brw_make_reg(file,
nr, nr,
subnr, subnr,
0, 0,
@@ -430,7 +430,7 @@ brw_vec16_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
static inline struct brw_reg static inline struct brw_reg
brw_vec8_reg(enum brw_reg_file file, unsigned nr, unsigned subnr) brw_vec8_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
{ {
return brw_reg(file, return brw_make_reg(file,
nr, nr,
subnr, subnr,
0, 0,
@@ -447,7 +447,7 @@ brw_vec8_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
static inline struct brw_reg static inline struct brw_reg
brw_vec4_reg(enum brw_reg_file file, unsigned nr, unsigned subnr) brw_vec4_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
{ {
return brw_reg(file, return brw_make_reg(file,
nr, nr,
subnr, subnr,
0, 0,
@@ -464,7 +464,7 @@ brw_vec4_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
static inline struct brw_reg static inline struct brw_reg
brw_vec2_reg(enum brw_reg_file file, unsigned nr, unsigned subnr) brw_vec2_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
{ {
return brw_reg(file, return brw_make_reg(file,
nr, nr,
subnr, subnr,
0, 0,
@@ -481,7 +481,7 @@ brw_vec2_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
static inline struct brw_reg static inline struct brw_reg
brw_vec1_reg(enum brw_reg_file file, unsigned nr, unsigned subnr) brw_vec1_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
{ {
return brw_reg(file, return brw_make_reg(file,
nr, nr,
subnr, subnr,
0, 0,
@@ -610,7 +610,7 @@ brw_ud1_reg(enum brw_reg_file file, unsigned nr, unsigned subnr)
static inline struct brw_reg static inline struct brw_reg
brw_imm_reg(enum brw_reg_type type) brw_imm_reg(enum brw_reg_type type)
{ {
return brw_reg(BRW_IMMEDIATE_VALUE, return brw_make_reg(BRW_IMMEDIATE_VALUE,
0, 0,
0, 0,
0, 0,
@@ -891,7 +891,7 @@ brw_tdr_reg(void)
static inline struct brw_reg static inline struct brw_reg
brw_ip_reg(void) brw_ip_reg(void)
{ {
return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE, return brw_make_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_IP, BRW_ARF_IP,
0, 0,
0, 0,
@@ -907,7 +907,7 @@ brw_ip_reg(void)
static inline struct brw_reg static inline struct brw_reg
brw_notification_reg(void) brw_notification_reg(void)
{ {
return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE, return brw_make_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_NOTIFICATION_COUNT, BRW_ARF_NOTIFICATION_COUNT,
0, 0,
0, 0,