Skip to content
Commit ab75e1e2 authored by Caio Oliveira's avatar Caio Oliveira Committed by Juan A. Suarez Romero
Browse files

nir: Fix clone of nir_variable state slots



When num_state_slots is 0, don't create the array.  This was
triggering the following assert when running vkcube with
NIR_TEST_CLONE=1

    vkcube: ../src/compiler/nir/nir_split_per_member_structs.c:66:
    split_variable: Assertion `var->state_slots == NULL' failed.

Fixes: 9fbd390d "nir: Add support for cloning shaders"
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 005cc9ae)
parent 2153c3ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment