pan/bi: Count blocks
For u_worklist. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16279>
This commit is contained in:
parent
eb0001bf2b
commit
d496fe153a
|
@ -37,6 +37,7 @@ bit_builder(void *memctx)
|
|||
{
|
||||
bi_context *ctx = rzalloc(memctx, bi_context);
|
||||
list_inithead(&ctx->blocks);
|
||||
ctx->num_blocks = 1;
|
||||
|
||||
bi_block *blk = rzalloc(ctx, bi_block);
|
||||
|
||||
|
|
|
@ -4555,12 +4555,9 @@ bi_compile_variant_nir(nir_shader *nir,
|
|||
break; /* TODO: Multi-function shaders */
|
||||
}
|
||||
|
||||
unsigned block_source_count = 0;
|
||||
|
||||
/* Index blocks now that we're done emitting */
|
||||
bi_foreach_block(ctx, block) {
|
||||
/* Name blocks now that we're done emitting so the order is
|
||||
* consistent */
|
||||
block->index = block_source_count++;
|
||||
block->index = ctx->num_blocks++;
|
||||
}
|
||||
|
||||
bi_validate(ctx, "NIR -> BIR");
|
||||
|
|
|
@ -731,6 +731,7 @@ typedef struct {
|
|||
uint32_t quirks;
|
||||
unsigned arch;
|
||||
enum bi_idvs_mode idvs;
|
||||
unsigned num_blocks;
|
||||
|
||||
/* In any graphics shader, whether the "IDVS with memory
|
||||
* allocation" flow is used. This affects how varyings are loaded and
|
||||
|
|
Loading…
Reference in New Issue