intel/compiler: avoid (RegDist, SBID) on DF instructions on MTL

When we use this form there's no way to specify which pipe RegDist
refers to, so there are a few rules to figure this out, which is what
inferred_sync_pipe() implements. But for MTL there's no long pipe and
the documentation does not explicitly explain what should be the
inferred type for its long (DF) instructions - which are out-of-order,
by the way.  One way to interpret this is that such case should be
avoided.  So add the extra check to entirely avoid this case.

Notice that this is not actually fixing any bug, since returning
TGL_PIPE_LONG (what we do today) will actually make these DF
instructions incompatible with every in-order instruction, so we'll
never opt to use the (RegDist, SBID) form anyway. But still, it's
better to have this case explicitly documented instead of having it
covered by a semi coincidence.

v2: use intel_device_info_is_mtl()  (Curro, Jordan)

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20072>
This commit is contained in:
Paulo Zanoni
2022-04-21 16:29:56 -07:00
committed by Marge Bot
parent 16b9f87104
commit 951855c349

View File

@@ -75,6 +75,7 @@ namespace {
{
if (devinfo->verx10 >= 125) {
bool has_int_src = false, has_long_src = false;
const bool has_long_pipe = !intel_device_info_is_mtl(devinfo);
if (is_send(inst))
return TGL_PIPE_NONE;
@@ -88,6 +89,16 @@ namespace {
}
}
/* Avoid the emitting (RegDist, SWSB) annotations for long
* instructions on platforms where they are unordered. It's not clear
* what the inferred sync pipe is for them or if we are even allowed
* to use these annotations in this case. Return NONE, which should
* prevent baked_{un,}ordered_dependency_mode functions from even
* trying to emit these annotations.
*/
if (!has_long_pipe && has_long_src)
return TGL_PIPE_NONE;
return has_long_src ? TGL_PIPE_LONG :
has_int_src ? TGL_PIPE_INT :
TGL_PIPE_FLOAT;