mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
nir_to_tgsi: Require the block index to always be populated
In some cases like when using `NIR_DEBUG=serialize`, impl->num_blocks is 0
which leads to assertions error in the blocklist. Make sure to require the
num_blocks to be populated.
Fixes: 74c02d99b2
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15640>
This commit is contained in:
parent
6cfde0abe9
commit
f86bc873ff
1 changed files with 2 additions and 0 deletions
|
|
@ -355,6 +355,8 @@ ntt_live_reg_setup_def_use(struct ntt_compile *c, nir_function_impl *impl, struc
|
|||
static void
|
||||
ntt_live_regs(struct ntt_compile *c, nir_function_impl *impl)
|
||||
{
|
||||
nir_metadata_require(impl, nir_metadata_block_index);
|
||||
|
||||
c->liveness = rzalloc_array(c, struct ntt_reg_interval, c->num_temps);
|
||||
|
||||
struct ntt_live_reg_state state = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue