etnaviv: nir: Add support for txf texture operation

The src[2] value 0x1100 is set based on observed behavior of the blob driver,
though its exact meaning remains to be documented.

Passes all dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*
tests on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
This commit is contained in:
Christian Gmeiner 2025-04-18 23:42:14 +02:00
parent eefe486533
commit 614b66529d

View file

@ -212,6 +212,10 @@ etna_emit_tex(struct etna_compile *c, nir_texop op, unsigned texid, unsigned dst
case nir_texop_txb: inst.opcode = ISA_OPC_TEXLDB; break;
case nir_texop_txd: inst.opcode = ISA_OPC_TEXLDD; break;
case nir_texop_txl: inst.opcode = ISA_OPC_TEXLDL; break;
case nir_texop_txf:
inst.opcode = ISA_OPC_TXF;
inst.src[2] = etna_immediate_int(0x1100);
break;
default:
compile_error(c, "Unhandled NIR tex type: %d\n", op);
}