Commit d47969eb authored by Boris Brezillon's avatar Boris Brezillon
Browse files

pan/bi: Add support for load_instance_id



Signed-off-by: Boris Brezillon's avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <!7472>
parent 5cd1d8c1
Pipeline #226062 waiting for manual action with stages
in 24 seconds
......@@ -755,6 +755,20 @@ bi_emit_vertex_id(bi_context *ctx, nir_intrinsic_instr *instr)
bi_emit(ctx, mov);
}
static void
bi_emit_instance_id(bi_context *ctx, nir_intrinsic_instr *instr)
{
bi_instruction mov = {
.type = BI_MOV,
.dest = pan_dest_index(&instr->dest),
.dest_type = nir_type_int32,
.src = { BIR_INDEX_REGISTER | 62 },
.src_types = { nir_type_int32 },
};
bi_emit(ctx, mov);
}
static void
emit_intrinsic(bi_context *ctx, nir_intrinsic_instr *instr)
{
......@@ -850,6 +864,10 @@ emit_intrinsic(bi_context *ctx, nir_intrinsic_instr *instr)
bi_emit_vertex_id(ctx, instr);
break;
case nir_intrinsic_load_instance_id:
bi_emit_instance_id(ctx, instr);
break;
default:
unreachable("Unknown intrinsic");
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment