|
|
|
|
|
|
|
|
num_srcs = 3; |
|
|
num_srcs = 3; |
|
|
samp = 3; |
|
|
samp = 3; |
|
|
break; |
|
|
break; |
|
|
|
|
|
case TGSI_OPCODE_LODQ: |
|
|
|
|
|
op = nir_texop_lod; |
|
|
|
|
|
num_srcs = 1; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
default: |
|
|
default: |
|
|
fprintf(stderr, "unknown TGSI tex op %d\n", tgsi_inst->Instruction.Opcode); |
|
|
fprintf(stderr, "unknown TGSI tex op %d\n", tgsi_inst->Instruction.Opcode); |
|
|
|
|
|
|
|
|
*/ |
|
|
*/ |
|
|
sview = instr->sampler_index; |
|
|
sview = instr->sampler_index; |
|
|
|
|
|
|
|
|
if (sview < c->num_samp_types) { |
|
|
|
|
|
|
|
|
if (op == nir_texop_lod) { |
|
|
|
|
|
instr->dest_type = nir_type_float; |
|
|
|
|
|
} else if (sview < c->num_samp_types) { |
|
|
instr->dest_type = c->samp_types[sview]; |
|
|
instr->dest_type = c->samp_types[sview]; |
|
|
} else { |
|
|
} else { |
|
|
instr->dest_type = nir_type_float; |
|
|
instr->dest_type = nir_type_float; |
|
|
|
|
|
|
|
|
[TGSI_OPCODE_UMUL_HI] = nir_op_umul_high, |
|
|
[TGSI_OPCODE_UMUL_HI] = nir_op_umul_high, |
|
|
|
|
|
|
|
|
[TGSI_OPCODE_TG4] = 0, |
|
|
[TGSI_OPCODE_TG4] = 0, |
|
|
[TGSI_OPCODE_LODQ] = 0, /* XXX */ |
|
|
|
|
|
|
|
|
[TGSI_OPCODE_LODQ] = 0, |
|
|
|
|
|
|
|
|
[TGSI_OPCODE_IBFE] = nir_op_ibitfield_extract, |
|
|
[TGSI_OPCODE_IBFE] = nir_op_ibitfield_extract, |
|
|
[TGSI_OPCODE_UBFE] = nir_op_ubitfield_extract, |
|
|
[TGSI_OPCODE_UBFE] = nir_op_ubitfield_extract, |
|
|
|
|
|
|
|
|
case TGSI_OPCODE_TXQ_LZ: |
|
|
case TGSI_OPCODE_TXQ_LZ: |
|
|
case TGSI_OPCODE_TXF: |
|
|
case TGSI_OPCODE_TXF: |
|
|
case TGSI_OPCODE_TG4: |
|
|
case TGSI_OPCODE_TG4: |
|
|
|
|
|
case TGSI_OPCODE_LODQ: |
|
|
ttn_tex(c, dest, src); |
|
|
ttn_tex(c, dest, src); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|