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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user