panfrost: Fix crash in compute variant allocation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: d8a3501f1b ("panfrost: Dynamically allocate shader variants")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3515>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3515>
This commit is contained in:
committed by
Marge Bot
parent
d817f2c696
commit
4936120230
@@ -46,7 +46,8 @@ panfrost_create_compute_state(
|
||||
so->cbase = *cso;
|
||||
so->is_compute = true;
|
||||
|
||||
struct panfrost_shader_state *v = &so->variants[0];
|
||||
struct panfrost_shader_state *v = calloc(1, sizeof(*v));
|
||||
so->variants = v;
|
||||
|
||||
so->variant_count = 1;
|
||||
so->active_variant = 0;
|
||||
|
||||
Reference in New Issue
Block a user