etnaviv: Implement TXD

Fill in support for TXD instruction which emits shader TEXLDD opcode.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17500>
This commit is contained in:
Marek Vasut
2022-04-23 15:41:13 +02:00
committed by Marge Bot
parent 221d042c31
commit 378da2c3ff
3 changed files with 5 additions and 0 deletions
@@ -522,10 +522,12 @@ emit_tex(struct etna_compile *c, nir_tex_instr * tex)
break;
case nir_tex_src_bias:
case nir_tex_src_lod:
case nir_tex_src_ddx:
assert(!src1);
src1 = &tex->src[i].src;
break;
case nir_tex_src_comparator:
case nir_tex_src_ddy:
src2 = &tex->src[i].src;
break;
default:
@@ -212,6 +212,7 @@ etna_emit_tex(struct etna_compile *c, nir_texop op, unsigned texid, unsigned dst
switch (op) {
case nir_texop_tex: inst.opcode = INST_OPCODE_TEXLD; break;
case nir_texop_txb: inst.opcode = INST_OPCODE_TEXLDB; break;
case nir_texop_txd: inst.opcode = INST_OPCODE_TEXLDD; break;
case nir_texop_txl: inst.opcode = INST_OPCODE_TEXLDL; break;
default:
compile_error(c, "Unhandled NIR tex type: %d\n", op);
@@ -108,6 +108,8 @@ etna_lower_io(nir_shader *shader, struct etna_shader_variant *v)
src1 = &tex->src[i].src;
src1_idx = i;
break;
case nir_tex_src_ddx:
case nir_tex_src_ddy:
case nir_tex_src_comparator:
break;
default: