diff --git a/.pick_status.json b/.pick_status.json index 8a8dc078b07..b39cb0a02f7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3344,7 +3344,7 @@ "description": "brw: brw_reg::nr for an accumulator is not part of the offset", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "937373eb25c53b0803e526b7b273afc2b3330752", "notes": null diff --git a/src/intel/compiler/brw/brw_reg.h b/src/intel/compiler/brw/brw_reg.h index ab9ad970455..786c4bdee04 100644 --- a/src/intel/compiler/brw/brw_reg.h +++ b/src/intel/compiler/brw/brw_reg.h @@ -1447,7 +1447,8 @@ reg_space(const brw_reg &r) static inline unsigned reg_offset(const brw_reg &r) { - return (r.file == ADDRESS || r.file == VGRF || r.file == IMM || r.file == ATTR ? 0 : r.nr) * + return (r.file == ADDRESS || r.file == VGRF || r.file == IMM || + r.file == ATTR || brw_reg_is_arf(r, BRW_ARF_ACCUMULATOR) ? 0 : r.nr) * (r.file == UNIFORM ? 4 : REG_SIZE) + r.offset + (r.file == ADDRESS || r.file == ARF || r.file == FIXED_GRF ? r.subnr : 0); } diff --git a/src/intel/compiler/brw/test_helpers.h b/src/intel/compiler/brw/test_helpers.h index 25e4155371d..b1ec3cd7143 100644 --- a/src/intel/compiler/brw/test_helpers.h +++ b/src/intel/compiler/brw/test_helpers.h @@ -128,6 +128,18 @@ protected: brw_init_isa_info(&compiler->isa, devinfo); } + void + set_gfx_platform(const char *name) + { + int pci_id = intel_device_name_to_pci_device_id(name); + assert(pci_id > 0); + + intel_get_device_info_from_pci_id(pci_id, devinfo); + assert(devinfo->ver > 0); + + brw_init_isa_info(&compiler->isa, devinfo); + } + brw_builder make_shader(mesa_shader_stage stage = MESA_SHADER_FRAGMENT, unsigned dispatch_width = 0)