diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index ba81bd278a8..71a991798dd 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -828,11 +828,12 @@ agx_create_shader_state(struct pipe_context *pctx, const struct pipe_shader_state *cso) { struct agx_uncompiled_shader *so = CALLOC_STRUCT(agx_uncompiled_shader); - so->base = *cso; if (!so) return NULL; + so->base = *cso; + if (cso->type == PIPE_SHADER_IR_NIR) { so->nir = cso->ir.nir; } else {