From bf460a525d35dfae5b87628c2191373276492763 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 16 Apr 2026 13:36:13 +0200 Subject: [PATCH] gallium: completely remove T{EX,XF}_LZ opcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This isn't in use, let's cull it. Reviewed-by: Marek Olšák Part-of: --- docs/gallium/tgsi.rst | 23 ------------------- src/gallium/auxiliary/tgsi/tgsi_info.c | 1 - .../auxiliary/tgsi/tgsi_info_opcodes.h | 4 ++-- src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h | 2 -- src/gallium/auxiliary/tgsi/tgsi_util.c | 2 -- src/gallium/include/pipe/p_shader_tokens.h | 4 ++-- 6 files changed, 4 insertions(+), 32 deletions(-) diff --git a/docs/gallium/tgsi.rst b/docs/gallium/tgsi.rst index 64d6a11499d..8f49c433bfe 100644 --- a/docs/gallium/tgsi.rst +++ b/docs/gallium/tgsi.rst @@ -804,29 +804,6 @@ used. & src0.y \times src1.y \end{aligned} -.. opcode:: TEX_LZ - Texture Lookup With LOD = 0 - - This is the same as TXL with LOD = 0. Like every texture opcode, it obeys - pipe_sampler_view::u.tex.first_level and pipe_sampler_state::min_lod. - There is no way to override those two in shaders. - - .. math:: - - coord.x = src0.x - - coord.y = src0.y - - coord.z = src0.z - - coord.w = none - - lod = 0 - - unit = src1 - - dst = texture\_sample(unit, coord, lod) - - .. opcode:: TXL - Texture Lookup With explicit LOD for cube map array textures, the explicit LOD value diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index 72527057419..a1cd9575c1c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -248,7 +248,6 @@ tgsi_opcode_infer_src_type(enum tgsi_opcode opcode, unsigned src_idx) switch (opcode) { case TGSI_OPCODE_UIF: case TGSI_OPCODE_TXF: - case TGSI_OPCODE_TXF_LZ: case TGSI_OPCODE_U2F: case TGSI_OPCODE_U2D: case TGSI_OPCODE_UADD: diff --git a/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h b/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h index 99ee14d724e..bfe96636a2a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h +++ b/src/gallium/auxiliary/tgsi/tgsi_info_opcodes.h @@ -15,7 +15,7 @@ OPCODE(1, 2, COMP, MAX) OPCODE(1, 2, COMP, SLT) OPCODE(1, 2, COMP, SGE) OPCODE(1, 3, COMP, MAD) -OPCODE(1, 2, OTHR, TEX_LZ, .is_tex = 1) +OPCODE_GAP(17) /* removed */ OPCODE(1, 3, COMP, LRP) OPCODE(1, 3, COMP, FMA) OPCODE(1, 1, REPL, SQRT) @@ -23,7 +23,7 @@ OPCODE(1, 2, COMP, LDEXP) OPCODE(1, 1, COMP, F2U64) OPCODE(1, 1, COMP, F2I64) OPCODE(1, 1, COMP, FRC) -OPCODE(1, 2, OTHR, TXF_LZ, .is_tex = 1) +OPCODE_GAP(25) /* removed */ OPCODE(1, 1, COMP, FLR) OPCODE(1, 1, COMP, ROUND) OPCODE(1, 1, REPL, EX2) diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h index ed87d736cde..2783e81c339 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h +++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h @@ -57,12 +57,10 @@ OP12(SLT) OP12(SGE) OP13(MAD) OP13(DMAD) -OP12_TEX(TEX_LZ) OP13(LRP) OP11(SQRT) OP11(DSQRT) OP11(FRC) -OP12_TEX(TXF_LZ) OP11(FLR) OP11(ROUND) OP11(EX2) diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c index 4367b8b550b..4b1001239ed 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.c +++ b/src/gallium/auxiliary/tgsi/tgsi_util.c @@ -196,8 +196,6 @@ tgsi_util_get_src_usage_mask(enum tgsi_opcode opcode, break; case TGSI_OPCODE_TEX: - case TGSI_OPCODE_TEX_LZ: - case TGSI_OPCODE_TXF_LZ: case TGSI_OPCODE_TXF: case TGSI_OPCODE_TXB: case TGSI_OPCODE_TXL: diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 139196c4309..fbfacbe7b6a 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -357,7 +357,7 @@ enum tgsi_opcode { TGSI_OPCODE_SLT = 14, TGSI_OPCODE_SGE = 15, TGSI_OPCODE_MAD = 16, - TGSI_OPCODE_TEX_LZ = 17, + /* gap */ TGSI_OPCODE_LRP = 18, TGSI_OPCODE_FMA = 19, TGSI_OPCODE_SQRT = 20, @@ -365,7 +365,7 @@ enum tgsi_opcode { TGSI_OPCODE_F2U64 = 22, TGSI_OPCODE_F2I64 = 23, TGSI_OPCODE_FRC = 24, - TGSI_OPCODE_TXF_LZ = 25, + /* gap */ TGSI_OPCODE_FLR = 26, TGSI_OPCODE_ROUND = 27, TGSI_OPCODE_EX2 = 28,