Browse Source

ttn: add LODQ support

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
tags/11.2-branchpoint
Ilia Mirkin 10 years ago
parent
commit
f0e670bdd7
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      src/gallium/auxiliary/nir/tgsi_to_nir.c

+ 9
- 2
src/gallium/auxiliary/nir/tgsi_to_nir.c View File

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;



Loading…
Cancel
Save