mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-15 00:10:25 +01:00
agx: Emit trap at pack-time, not during isel
This makes the shaderdb stats make more sense. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18804>
This commit is contained in:
parent
1dcaade3e2
commit
72a1e1f33f
2 changed files with 6 additions and 4 deletions
|
|
@ -1836,10 +1836,6 @@ agx_compile_shader_nir(nir_shader *nir,
|
|||
agx_builder _b = agx_init_builder(ctx, agx_after_block(last_block));
|
||||
agx_stop(&_b);
|
||||
|
||||
/* Also add traps to match the blob, unsure what the function is */
|
||||
for (unsigned i = 0; i < 8; ++i)
|
||||
agx_trap(&_b);
|
||||
|
||||
/* Index blocks now that we're done emitting so the order is consistent */
|
||||
agx_foreach_block(ctx, block)
|
||||
block->index = ctx->num_blocks++;
|
||||
|
|
|
|||
|
|
@ -701,5 +701,11 @@ agx_pack_binary(agx_context *ctx, struct util_dynarray *emission)
|
|||
util_dynarray_foreach(&fixups, struct agx_branch_fixup, fixup)
|
||||
agx_fixup_branch(emission, *fixup);
|
||||
|
||||
/* Dougall calls the instruction in this footer "trap". Match the blob. */
|
||||
for (unsigned i = 0; i < 8; ++i) {
|
||||
uint16_t trap = agx_opcodes_info[AGX_OPCODE_TRAP].encoding.exact;
|
||||
util_dynarray_append(emission, uint16_t, trap);
|
||||
}
|
||||
|
||||
util_dynarray_fini(&fixups);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue