mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
vc4: Return NULL when we can't make our shadow for a sampler view.
I'm not sure what the caller does is appropriate (just have a NULL sampler at this slot), but it fixes the immediate crash. Cc: "11.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
eb8fb0064d
commit
5980389bbf
1 changed files with 4 additions and 0 deletions
|
|
@ -583,6 +583,10 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
tmpl.last_level = cso->u.tex.last_level - cso->u.tex.first_level;
|
||||
|
||||
prsc = vc4_resource_create(pctx->screen, &tmpl);
|
||||
if (!prsc) {
|
||||
free(so);
|
||||
return NULL;
|
||||
}
|
||||
rsc = vc4_resource(prsc);
|
||||
clone = vc4_resource(prsc);
|
||||
clone->shadow_parent = &shadow_parent->base.b;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue