Mesa (master): gallium/ttn: add TXB2
Rob Clark
robclark at kemper.freedesktop.org
Tue Jun 30 16:20:41 UTC 2015
Module: Mesa
Branch: master
Commit: d1f0e019797863b23388bfef53a77f659f749d3c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1f0e019797863b23388bfef53a77f659f749d3c
Author: Rob Clark <robclark at freedesktop.org>
Date: Fri Jun 26 13:48:29 2015 -0400
gallium/ttn: add TXB2
Signed-off-by: Rob Clark <robclark at freedesktop.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/gallium/auxiliary/nir/tgsi_to_nir.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index c5b65ee..bd4cdcb 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -1068,6 +1068,11 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
op = nir_texop_txb;
num_srcs = 2;
break;
+ case TGSI_OPCODE_TXB2:
+ op = nir_texop_txb;
+ num_srcs = 2;
+ samp = 2;
+ break;
case TGSI_OPCODE_TXL:
op = nir_texop_txl;
num_srcs = 2;
@@ -1169,6 +1174,12 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
src_number++;
}
+ if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXB2) {
+ instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[1], X));
+ instr->src[src_number].src_type = nir_tex_src_bias;
+ src_number++;
+ }
+
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXL) {
instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[0], W));
instr->src[src_number].src_type = nir_tex_src_lod;
More information about the mesa-commit
mailing list