mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
etnaviv: Add support for ARB_texture_gather
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:
parent
870252379c
commit
b4bac915f0
2 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue