mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
ttn: do not handle T{EX,XF}_LZ
Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40993>
This commit is contained in:
parent
ffe77d756f
commit
208ecb1827
1 changed files with 4 additions and 18 deletions
|
|
@ -1195,7 +1195,6 @@ ttn_tex(struct ttn_compile *c, nir_def **src)
|
|||
samp = 2;
|
||||
break;
|
||||
case TGSI_OPCODE_TXL:
|
||||
case TGSI_OPCODE_TEX_LZ:
|
||||
op = nir_texop_txl;
|
||||
num_srcs = 2;
|
||||
break;
|
||||
|
|
@ -1205,7 +1204,6 @@ ttn_tex(struct ttn_compile *c, nir_def **src)
|
|||
samp = 2;
|
||||
break;
|
||||
case TGSI_OPCODE_TXF:
|
||||
case TGSI_OPCODE_TXF_LZ:
|
||||
if (tgsi_inst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
|
||||
tgsi_inst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA) {
|
||||
op = nir_texop_txf_ms;
|
||||
|
|
@ -1322,12 +1320,8 @@ ttn_tex(struct ttn_compile *c, nir_def **src)
|
|||
src_number++;
|
||||
}
|
||||
|
||||
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXL ||
|
||||
tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TEX_LZ) {
|
||||
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TEX_LZ)
|
||||
instr->src[src_number].src = nir_src_for_ssa(nir_imm_int(b, 0));
|
||||
else
|
||||
instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[0], W));
|
||||
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;
|
||||
src_number++;
|
||||
}
|
||||
|
|
@ -1338,16 +1332,12 @@ ttn_tex(struct ttn_compile *c, nir_def **src)
|
|||
src_number++;
|
||||
}
|
||||
|
||||
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXF ||
|
||||
tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXF_LZ) {
|
||||
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXF) {
|
||||
if (op == nir_texop_txf_ms) {
|
||||
instr->src[src_number] = nir_tex_src_for_ssa(nir_tex_src_ms_index,
|
||||
ttn_channel(b, src[0], W));
|
||||
} else {
|
||||
if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_TXF_LZ)
|
||||
instr->src[src_number].src = nir_src_for_ssa(nir_imm_int(b, 0));
|
||||
else
|
||||
instr->src[src_number].src = nir_src_for_ssa(ttn_channel(b, src[0], W));
|
||||
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;
|
||||
}
|
||||
src_number++;
|
||||
|
|
@ -1661,11 +1651,9 @@ static const nir_op op_trans[TGSI_OPCODE_LAST] = {
|
|||
[TGSI_OPCODE_SLT] = nir_op_slt,
|
||||
[TGSI_OPCODE_SGE] = nir_op_sge,
|
||||
[TGSI_OPCODE_MAD] = nir_op_ffma,
|
||||
[TGSI_OPCODE_TEX_LZ] = 0,
|
||||
[TGSI_OPCODE_LRP] = 0,
|
||||
[TGSI_OPCODE_SQRT] = nir_op_fsqrt,
|
||||
[TGSI_OPCODE_FRC] = nir_op_ffract,
|
||||
[TGSI_OPCODE_TXF_LZ] = 0,
|
||||
[TGSI_OPCODE_FLR] = nir_op_ffloor,
|
||||
[TGSI_OPCODE_ROUND] = nir_op_fround_even,
|
||||
[TGSI_OPCODE_EX2] = nir_op_fexp2,
|
||||
|
|
@ -1951,7 +1939,6 @@ ttn_emit_instruction(struct ttn_compile *c)
|
|||
break;
|
||||
|
||||
case TGSI_OPCODE_TEX:
|
||||
case TGSI_OPCODE_TEX_LZ:
|
||||
case TGSI_OPCODE_TXP:
|
||||
case TGSI_OPCODE_TXL:
|
||||
case TGSI_OPCODE_TXB:
|
||||
|
|
@ -1960,7 +1947,6 @@ ttn_emit_instruction(struct ttn_compile *c)
|
|||
case TGSI_OPCODE_TXL2:
|
||||
case TGSI_OPCODE_TXB2:
|
||||
case TGSI_OPCODE_TXF:
|
||||
case TGSI_OPCODE_TXF_LZ:
|
||||
case TGSI_OPCODE_TG4:
|
||||
case TGSI_OPCODE_LODQ:
|
||||
dst = ttn_tex(c, src);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue