same as cube types, if this is a single layer then it's not an array
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9684>
ivci.viewType = VK_IMAGE_VIEW_TYPE_CUBE;
else if (templ->u.tex.first_layer || ivci.subresourceRange.layerCount != res->base.array_size)
ivci.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
+ } else if (ivci.viewType == VK_IMAGE_VIEW_TYPE_2D_ARRAY) {
+ if (templ->u.tex.first_layer == templ->u.tex.last_layer)
+ ivci.viewType = VK_IMAGE_VIEW_TYPE_2D;
}
return ivci;