From 614b66529de2832575cdb0c97581d0d5f791ed72 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 18 Apr 2025 23:42:14 +0200 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c index 08a5ab5fb7b..708f0788b58 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c @@ -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); }