mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 01:08:03 +02:00
intel/brw: Add and call brw_lsc_supports_base_offset() in places that checks for support of this feature
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39817>
This commit is contained in:
parent
91c5744e25
commit
39ec9e3448
4 changed files with 10 additions and 4 deletions
|
|
@ -1624,6 +1624,12 @@ brw_max_immediate_offset_bits(enum lsc_addr_surface_type binding_type)
|
|||
return max_bits[binding_type];
|
||||
}
|
||||
|
||||
static inline bool
|
||||
brw_lsc_supports_base_offset(const struct intel_device_info *devinfo)
|
||||
{
|
||||
return devinfo->ver >= 20;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4175,7 +4175,7 @@ memory_address(nir_to_brw_state &ntb,
|
|||
const brw_builder ubld = src_offset.is_scalar ? bld.scalar_group() : bld;
|
||||
brw_reg address;
|
||||
|
||||
if (devinfo->ver < 20 ||
|
||||
if ((brw_lsc_supports_base_offset(devinfo) == false) ||
|
||||
(!nir_intrinsic_has_base(instr) && !nir_src_is_const(*nir_src_offset))) {
|
||||
address =
|
||||
nir_intrinsic_has_base(instr) ?
|
||||
|
|
|
|||
|
|
@ -1088,7 +1088,7 @@ setup_lsc_surface_descriptors(const brw_builder &bld, brw_send_inst *send,
|
|||
{
|
||||
const ASSERTED intel_device_info *devinfo = bld.shader->devinfo;
|
||||
|
||||
assert(base_offset == 0 || devinfo->ver >= 20);
|
||||
assert(base_offset == 0 || brw_lsc_supports_base_offset(devinfo));
|
||||
|
||||
send->src[SEND_SRC_DESC] = brw_imm_ud(0);
|
||||
send->src[SEND_SRC_EX_DESC] = brw_imm_ud(0);
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ brw_shader::assign_curb_setup()
|
|||
|
||||
brw_reg addr;
|
||||
|
||||
if (i != 0 && devinfo->ver < 20) {
|
||||
if (i != 0 && brw_lsc_supports_base_offset(devinfo) == false) {
|
||||
if (pull_constants_a64) {
|
||||
dirty_bits |= BRW_DEPENDENCY_VARIABLES;
|
||||
/* We need to do the carry manually as when this pass is run,
|
||||
|
|
@ -444,7 +444,7 @@ brw_shader::assign_curb_setup()
|
|||
BRW_TYPE_UD);
|
||||
|
||||
send->src[SEND_SRC_DESC] = brw_imm_ud(0);
|
||||
send->src[SEND_SRC_EX_DESC] = devinfo->ver >= 20 ?
|
||||
send->src[SEND_SRC_EX_DESC] = brw_lsc_supports_base_offset(devinfo) ?
|
||||
brw_imm_ud(lsc_flat_ex_desc(devinfo,
|
||||
i * REG_SIZE)) :
|
||||
brw_imm_ud(0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue