intel: Move devinfo->has_compr4 into the elk compiler

Used in exactly one place in elk.  Off to live there.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
This commit is contained in:
Kenneth Graunke 2025-02-24 19:41:37 -08:00
parent be8ec31e72
commit 7f6b1dee2c
3 changed files with 7 additions and 4 deletions

View file

@ -3408,6 +3408,12 @@ elk_fs_visitor::workaround_source_arf_before_eot()
return progress;
}
static bool
has_compr4(const struct intel_device_info *devinfo)
{
return devinfo->verx10 > 40 && devinfo->verx10 < 60;
}
bool
elk_fs_visitor::lower_load_payload()
{
@ -3467,7 +3473,7 @@ elk_fs_visitor::lower_load_payload()
assert(inst->header_size + 4 <= inst->sources);
for (uint8_t i = inst->header_size; i < inst->header_size + 4; i++) {
if (inst->src[i].file != BAD_FILE) {
if (devinfo->has_compr4) {
if (has_compr4(devinfo)) {
elk_fs_reg compr4_dst = retype(dst, inst->src[i].type);
compr4_dst.nr |= ELK_MRF_COMPR4;
ibld.MOV(compr4_dst, inst->src[i]);

View file

@ -130,7 +130,6 @@ static const struct intel_device_info intel_device_info_g4x = {
.ver = 4,
.verx10 = 45,
.has_pln = true,
.has_compr4 = true,
.platform = INTEL_PLATFORM_G4X,
.num_slices = 1,
.num_subslices = { 1, },
@ -151,7 +150,6 @@ static const struct intel_device_info intel_device_info_ilk = {
.ver = 5,
.platform = INTEL_PLATFORM_ILK,
.has_pln = true,
.has_compr4 = true,
.num_slices = 1,
.num_subslices = { 1, },
.max_eus_per_subslice = 12,

View file

@ -278,7 +278,6 @@ Struct("intel_device_info",
Member("bool", "has_64bit_float_via_math_pipe", compiler_field=True),
Member("bool", "has_64bit_int", compiler_field=True),
Member("bool", "has_integer_dword_mul", compiler_field=True),
Member("bool", "has_compr4", compiler_field=True),
Member("bool", "supports_simd16_3src", compiler_field=True),
Member("bool", "disable_ccs_repack"),