brw: Stop using is_send_from_grf() in CSE pass

Explicitly list FS_OPCODE_INTERPOLATE_AT_* as allowed, as they were
already allowed by the default case.  Interlock, memory fence, and
barrier were disallowed and remain so.  Uniform pull constant load
was allowed and remains so.  SHADER_OPCODE_SEND and SEND_GATHER get
explicit handling.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
This commit is contained in:
Kenneth Graunke 2025-01-20 01:36:26 -08:00 committed by Marge Bot
parent e5ed6f64d9
commit 3c455c3532

View file

@ -126,14 +126,21 @@ is_expression(const brw_shader *v, const brw_inst *const inst)
case SHADER_OPCODE_SIN:
case SHADER_OPCODE_COS:
case SHADER_OPCODE_LOAD_SUBGROUP_INVOCATION:
case FS_OPCODE_INTERPOLATE_AT_SAMPLE:
case FS_OPCODE_INTERPOLATE_AT_SHARED_OFFSET:
case FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET:
return true;
case SHADER_OPCODE_MEMORY_LOAD_LOGICAL:
return inst->src[MEMORY_LOGICAL_MODE].ud == MEMORY_MODE_CONSTANT;
case SHADER_OPCODE_LOAD_PAYLOAD:
return !is_coalescing_payload(*v, inst);
case SHADER_OPCODE_SEND:
case SHADER_OPCODE_SEND_GATHER:
return !inst->send_has_side_effects &&
!inst->send_is_volatile &&
!inst->eot;
default:
return inst->is_send_from_grf() && !inst->has_side_effects() &&
!inst->is_volatile();
return false;
}
}