Commit feecf0a3 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜 Committed by Marge Bot
Browse files

pan/bi: Implement bi_emit_ld_tile via the builder


Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!8135>
parent 4de806a8
......@@ -120,6 +120,30 @@ bi_load_old(enum bi_class T, nir_intrinsic_instr *instr, unsigned offset_idx)
return load;
}
static void
bi_emit_ld_tile(bi_builder *b, nir_intrinsic_instr *instr)
{
assert(b->shader->is_blend);
/* We want to load the current pixel.
* FIXME: The sample to load is currently hardcoded to 0. This should
* be addressed for multi-sample FBs.
*/
struct bifrost_pixel_indices pix = {
.y = BIFROST_CURRENT_PIXEL,
};
uint32_t indices = 0;
memcpy(&indices, &pix, sizeof(indices));
bi_ld_tile_to(b, bi_dest_index(&instr->dest), bi_imm_u32(indices),
bi_register(60), /* coverage bitmap, TODO ra */
/* Only keep the conversion part of the blend descriptor. */
bi_imm_u32(b->shader->blend_desc >> 32),
(instr->num_components - 1));
}
static void
bi_emit_ld_output(bi_context *ctx, nir_intrinsic_instr *instr)
{
......
Markdown is supported
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