From: Alyssa Rosenzweig Date: Sun, 23 May 2021 21:27:26 +0000 (-0400) Subject: agx: Track current_block X-Git-Tag: upstream/21.2.3~2768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7918ebc82629ed83aedb2b3dc7a62cec19ac18b;p=platform%2Fupstream%2Fmesa.git agx: Track current_block Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 338b031..d3fb649 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -732,6 +732,7 @@ emit_block(agx_context *ctx, nir_block *block) agx_block *blk = agx_create_block(ctx); list_addtail(&blk->link, &ctx->blocks); list_inithead(&blk->instructions); + ctx->current_block = blk; agx_builder _b = agx_init_builder(ctx, agx_after_block(blk)); diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index 0c45c0e..a9d818d 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -321,6 +321,9 @@ typedef struct { /* I don't really understand how writeout ops work yet */ bool did_writeout; + /* During instruction selection, for inserting control flow */ + agx_block *current_block; + /* Stats for shader-db */ unsigned loop_count; unsigned spills;