.op = f16 ? BIFROST_ADD_OP_TEX_COMPACT_F16 :
BIFROST_ADD_OP_TEX_COMPACT_F32,
.unknown = 1,
- .tex_index = 0,
- .sampler_index = 0
+ .tex_index = ins->texture.texture_index,
+ .sampler_index = ins->texture.sampler_index
};
bi_write_data_register(clause, ins);
static void
emit_tex_compact(bi_context *ctx, nir_tex_instr *instr)
{
- /* TODO: Pipe through indices */
- assert(instr->texture_index == 0);
- assert(instr->sampler_index == 0);
-
bi_instruction tex = {
.type = BI_TEX,
.op = { .texture = BI_TEX_COMPACT },
+ .texture = {
+ .texture_index = instr->texture_index,
+ .sampler_index = instr->sampler_index,
+ },
.dest = pan_dest_index(&instr->dest),
.dest_type = instr->dest_type,
.src_types = { nir_type_float32, nir_type_float32 },