if (err == -1)
return 0;
if (sub_reg_num) {
- unsigned elem_size = brw_hw_reg_type_to_size(devinfo, type, _reg_file);
+ unsigned elem_size = brw_hw_reg_type_to_size(devinfo, _reg_file, type);
format(file, ".%d", sub_reg_num / elem_size); /* use formal style like spec */
}
src_align1_region(file, _vert_stride, _width, _horiz_stride);
return 0;
if (_subreg_nr) {
unsigned elem_size =
- brw_hw_reg_type_to_size(devinfo, _reg_type, _reg_file);
+ brw_hw_reg_type_to_size(devinfo, _reg_file, _reg_type);
/* bit4 for subreg number byte addressing. Make this same meaning as
in da1 case, so output looks consistent. */
*/
unsigned
brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
- enum brw_reg_type type, enum brw_reg_file file)
+ enum brw_reg_file file,
+ enum brw_reg_type type)
{
if (file == BRW_IMMEDIATE_VALUE) {
static const enum hw_imm_type hw_types[] = {
*/
unsigned
brw_hw_reg_type_to_size(const struct gen_device_info *devinfo,
- unsigned type, enum brw_reg_file file)
+ enum brw_reg_file file,
+ unsigned type)
{
if (file == BRW_IMMEDIATE_VALUE) {
static const int hw_sizes[] = {
brw_inst_set_dst_reg_file(devinfo, inst, dest.file);
brw_inst_set_dst_reg_type(devinfo, inst,
- brw_reg_type_to_hw_type(devinfo, dest.type,
- dest.file));
+ brw_reg_type_to_hw_type(devinfo, dest.file,
+ dest.type));
brw_inst_set_dst_address_mode(devinfo, inst, dest.address_mode);
if (dest.address_mode == BRW_ADDRESS_DIRECT) {
brw_inst_set_src0_reg_file(devinfo, inst, reg.file);
brw_inst_set_src0_reg_type(devinfo, inst,
- brw_reg_type_to_hw_type(devinfo, reg.type, reg.file));
+ brw_reg_type_to_hw_type(devinfo, reg.file, reg.type));
brw_inst_set_src0_abs(devinfo, inst, reg.abs);
brw_inst_set_src0_negate(devinfo, inst, reg.negate);
brw_inst_set_src0_address_mode(devinfo, inst, reg.address_mode);
brw_inst_set_src1_reg_file(devinfo, inst, reg.file);
brw_inst_set_src1_reg_type(devinfo, inst,
- brw_reg_type_to_hw_type(devinfo, reg.type, reg.file));
+ brw_reg_type_to_hw_type(devinfo, reg.file, reg.type));
brw_inst_set_src1_abs(devinfo, inst, reg.abs);
brw_inst_set_src1_negate(devinfo, inst, reg.negate);
unsigned exec_type = execution_type(devinfo, inst);
unsigned exec_type_size =
- brw_hw_reg_type_to_size(devinfo, exec_type, BRW_GENERAL_REGISTER_FILE);
+ brw_hw_reg_type_to_size(devinfo, BRW_GENERAL_REGISTER_FILE, exec_type);
unsigned dst_type_size = brw_element_size(devinfo, inst, dst);
/* On IVB/BYT, region parameters and execution size for DF are in terms of
};
unsigned brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
- enum brw_reg_type type, enum brw_reg_file file);
+ enum brw_reg_file file, enum brw_reg_type type);
#define brw_element_size(devinfo, inst, operand) \
brw_hw_reg_type_to_size(devinfo, \
- brw_inst_ ## operand ## _reg_type(devinfo, inst), \
- brw_inst_ ## operand ## _reg_file(devinfo, inst))
+ brw_inst_ ## operand ## _reg_file(devinfo, inst), \
+ brw_inst_ ## operand ## _reg_type(devinfo, inst))
unsigned brw_hw_reg_type_to_size(const struct gen_device_info *devinfo,
- unsigned type, enum brw_reg_file file);
+ enum brw_reg_file file, unsigned type);
const char *brw_reg_type_letters(unsigned brw_reg_type);
uint32_t brw_swizzle_immediate(enum brw_reg_type type, uint32_t x, unsigned swz);