diff options
author | Rob Clark <[email protected]> | 2015-04-11 11:37:12 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-04-17 10:34:15 -0400 |
commit | a3cce7a38eb57b6845ee47c2aeeae7778c91be76 (patch) | |
tree | 11484d84e439348ea890ea5a66976f4516d6e4f3 /src/gallium/auxiliary/nir | |
parent | f44d836d7a26a7d7c4374cc9e1e8bdc96cd2db8e (diff) |
gallium/ttn: add support for TXL2
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/nir')
-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 7312e54aefb..42671c8bb18 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -1001,6 +1001,11 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src) op = nir_texop_txl; num_srcs = 2; break; + case TGSI_OPCODE_TXL2: + op = nir_texop_txl; + num_srcs = 2; + samp = 2; + break; case TGSI_OPCODE_TXF: op = nir_texop_txf; num_srcs = 1; @@ -1082,6 +1087,12 @@ ttn_tex(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src) src_number++; } + if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXL2) { + instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[1], X)); + instr->src[src_number].src_type = nir_tex_src_lod; + src_number++; + } + if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXD) { instr->src[src_number].src = nir_src_for_ssa(nir_swizzle(b, src[1], SWIZ(X, Y, Z, W), |