diff options
author | Rob Clark <[email protected]> | 2015-06-26 13:48:29 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-06-30 12:13:44 -0400 |
commit | d1f0e019797863b23388bfef53a77f659f749d3c (patch) | |
tree | 49dff5028936f8a7fb08c64431175bb4c404ba90 | |
parent | 6082515de7c7b4885bd685d88aee32fc9e5103a1 (diff) |
gallium/ttn: add TXB2
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/nir/tgsi_to_nir.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index c5b65eeae0c..bd4cdcbbfcf 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; |