Commit 5cd1d8c1 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

pan/bi: Add support for load_vertex_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: <mesa/mesa!7472>
parent 255f7842
......@@ -741,6 +741,20 @@ bi_emit_point_coord(bi_context *ctx, nir_intrinsic_instr *instr)
bi_emit(ctx, ins);
}
static void
bi_emit_vertex_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 | 61 },
.src_types = { nir_type_int32 },
};
bi_emit(ctx, mov);
}
static void
emit_intrinsic(bi_context *ctx, nir_intrinsic_instr *instr)
{
......@@ -832,6 +846,10 @@ emit_intrinsic(bi_context *ctx, nir_intrinsic_instr *instr)
bi_emit_point_coord(ctx, instr);
break;
case nir_intrinsic_load_vertex_id:
bi_emit_vertex_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