intel/fs: Make the result of is_unordered() dependent on devinfo.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20072>
This commit is contained in:
Francisco Jerez
2022-02-18 21:58:24 -08:00
committed by Marge Bot
parent d608706875
commit 051887fbf3
3 changed files with 12 additions and 11 deletions

View File

@@ -207,7 +207,7 @@ namespace {
has_invalid_src_region(const intel_device_info *devinfo, const fs_inst *inst, has_invalid_src_region(const intel_device_info *devinfo, const fs_inst *inst,
unsigned i) unsigned i)
{ {
if (is_unordered(inst) || inst->is_control_source(i)) if (is_send(inst) || inst->is_math() || inst->is_control_source(i))
return false; return false;
/* Empirical testing shows that Broadwell has a bug affecting half-float /* Empirical testing shows that Broadwell has a bug affecting half-float
@@ -248,7 +248,7 @@ namespace {
has_invalid_dst_region(const intel_device_info *devinfo, has_invalid_dst_region(const intel_device_info *devinfo,
const fs_inst *inst) const fs_inst *inst)
{ {
if (is_unordered(inst)) { if (is_send(inst) || inst->is_math()) {
return false; return false;
} else { } else {
const brw_reg_type exec_type = get_exec_type(inst); const brw_reg_type exec_type = get_exec_type(inst);

View File

@@ -112,7 +112,7 @@ namespace {
(inst->opcode == BRW_OPCODE_MAD && (inst->opcode == BRW_OPCODE_MAD &&
MIN2(type_sz(inst->src[1].type), type_sz(inst->src[2].type)) >= 4)); MIN2(type_sz(inst->src[1].type), type_sz(inst->src[2].type)) >= 4));
if (is_unordered(inst)) if (is_unordered(devinfo, inst))
return TGL_PIPE_NONE; return TGL_PIPE_NONE;
else if (devinfo->verx10 < 125) else if (devinfo->verx10 < 125)
return TGL_PIPE_FLOAT; return TGL_PIPE_FLOAT;
@@ -173,8 +173,9 @@ namespace {
* (again) don't use virtual instructions if you want optimal * (again) don't use virtual instructions if you want optimal
* scheduling. * scheduling.
*/ */
if (!is_unordered(inst) && (p == IDX(inferred_exec_pipe(devinfo, inst)) || if (!is_unordered(devinfo, inst) &&
p == IDX(TGL_PIPE_ALL))) (p == IDX(inferred_exec_pipe(devinfo, inst)) ||
p == IDX(TGL_PIPE_ALL)))
return 1; return 1;
else else
return 0; return 0;
@@ -623,7 +624,7 @@ namespace {
dependency_for_write(const struct intel_device_info *devinfo, dependency_for_write(const struct intel_device_info *devinfo,
const fs_inst *inst, dependency dep) const fs_inst *inst, dependency dep)
{ {
if (!is_unordered(inst) && if (!is_unordered(devinfo, inst) &&
is_single_pipe(dep.jp, inferred_exec_pipe(devinfo, inst))) is_single_pipe(dep.jp, inferred_exec_pipe(devinfo, inst)))
dep.ordered &= TGL_REGDIST_DST; dep.ordered &= TGL_REGDIST_DST;
return dep; return dep;
@@ -942,7 +943,7 @@ namespace {
if (find_unordered_dependency(deps, TGL_SBID_SET, exec_all)) if (find_unordered_dependency(deps, TGL_SBID_SET, exec_all))
return find_unordered_dependency(deps, TGL_SBID_SET, exec_all); return find_unordered_dependency(deps, TGL_SBID_SET, exec_all);
else if (has_ordered && is_unordered(inst)) else if (has_ordered && is_unordered(devinfo, inst))
return TGL_SBID_NULL; return TGL_SBID_NULL;
else if (find_unordered_dependency(deps, TGL_SBID_DST, exec_all) && else if (find_unordered_dependency(deps, TGL_SBID_DST, exec_all) &&
(!has_ordered || ordered_pipe == inferred_sync_pipe(devinfo, inst))) (!has_ordered || ordered_pipe == inferred_sync_pipe(devinfo, inst)))
@@ -977,7 +978,7 @@ namespace {
return true; return true;
else else
return ordered_pipe == inferred_sync_pipe(devinfo, inst) && return ordered_pipe == inferred_sync_pipe(devinfo, inst) &&
unordered_mode == (is_unordered(inst) ? TGL_SBID_SET : unordered_mode == (is_unordered(devinfo, inst) ? TGL_SBID_SET :
TGL_SBID_DST); TGL_SBID_DST);
} }
@@ -1032,7 +1033,7 @@ namespace {
/* Track any destination registers of this instruction. */ /* Track any destination registers of this instruction. */
const dependency wr_dep = const dependency wr_dep =
is_unordered(inst) ? dependency(TGL_SBID_DST, ip, exec_all) : is_unordered(devinfo, inst) ? dependency(TGL_SBID_DST, ip, exec_all) :
is_ordered ? dependency(TGL_REGDIST_DST, jp, exec_all) : is_ordered ? dependency(TGL_REGDIST_DST, jp, exec_all) :
dependency(); dependency();
@@ -1158,7 +1159,7 @@ namespace {
sb.get(brw_uvec_mrf(8, inst->base_mrf + j, 0)))); sb.get(brw_uvec_mrf(8, inst->base_mrf + j, 0))));
} }
if (is_unordered(inst) && !inst->eot) if (is_unordered(devinfo, inst) && !inst->eot)
add_dependency(ids, deps[ip], add_dependency(ids, deps[ip],
dependency(TGL_SBID_SET, ip, exec_all)); dependency(TGL_SBID_SET, ip, exec_all));

View File

@@ -546,7 +546,7 @@ is_send(const fs_inst *inst)
* assumed to complete in-order. * assumed to complete in-order.
*/ */
static inline bool static inline bool
is_unordered(const fs_inst *inst) is_unordered(const intel_device_info *devinfo, const fs_inst *inst)
{ {
return is_send(inst) || inst->is_math(); return is_send(inst) || inst->is_math();
} }