mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
zink: handle null samplerview in get_imageview_for_binding()
this is legal cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
This commit is contained in:
parent
5b58f8df53
commit
19eddeb226
1 changed files with 1 additions and 1 deletions
|
|
@ -470,7 +470,7 @@ get_imageview_for_binding(struct zink_context *ctx, enum pipe_shader_type stage,
|
|||
switch (type) {
|
||||
case ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW: {
|
||||
struct zink_sampler_view *sampler_view = zink_sampler_view(ctx->sampler_views[stage][idx]);
|
||||
if (!sampler_view->base.texture)
|
||||
if (!sampler_view || !sampler_view->base.texture)
|
||||
return NULL;
|
||||
/* if this is a non-seamless cube sampler, return the cube array view */
|
||||
return (ctx->di.emulate_nonseamless[stage] & ctx->di.cubes[stage] & BITFIELD_BIT(idx)) ?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue