etnaviv: Add support for ARB_texture_gather
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The hardware support for tg4 is unclear from  RE and feature databases.
Enable this extension on halti5 GPUs as a conservative starting point.

Support for 128 bit formats is missing, so it's gated behind ETNA_MESA_DEBUG=deqp.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36622>
This commit is contained in:
Christian Gmeiner 2025-06-25 21:19:20 +02:00 committed by Marge Bot
parent 870252379c
commit b4bac915f0
2 changed files with 6 additions and 0 deletions

View file

@ -224,6 +224,10 @@ etna_emit_tex(struct etna_compile *c, nir_tex_instr * tex, unsigned dst_swiz,
inst.opcode = ISA_OPC_TXF;
inst.src[2] = etna_immediate_int(0x1100);
break;
case nir_texop_tg4:
inst.opcode = ISA_OPC_TG4;
inst.src[1] = etna_immediate_int(tex->component);
break;
default:
compile_error(c, "Unhandled NIR tex type: %d\n", tex->op);
}

View file

@ -280,6 +280,8 @@ etna_init_screen_caps(struct etna_screen *screen)
caps->min_texel_offset = -8;
caps->max_texel_offset = 7;
caps->max_texture_gather_components =
(VIV_FEATURE(screen, ETNA_FEATURE_HALTI5) && DBG_ENABLED(ETNA_DBG_DEQP)) ? 4 : 0;
caps->seamless_cube_map_per_texture =
caps->seamless_cube_map = VIV_FEATURE(screen, ETNA_FEATURE_SEAMLESS_CUBE_MAP);
caps->texture_multisample = DBG_ENABLED(ETNA_DBG_DEQP);