zink: further simplify zs case for zink_descriptor_util_image_layout_eval

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
This commit is contained in:
Mike Blumenkrantz 2022-04-05 14:13:44 -04:00 committed by Marge Bot
parent fd9a5fed16
commit f24b966d27

View file

@ -570,9 +570,7 @@ zink_descriptor_util_image_layout_eval(const struct zink_resource *res, bool is_
if (res->image_bind_count[is_compute])
return VK_IMAGE_LAYOUT_GENERAL;
if (res->aspect & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
return res->aspect == VK_IMAGE_ASPECT_DEPTH_BIT ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :
res->aspect == VK_IMAGE_ASPECT_STENCIL_BIT ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL :
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
return VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
}
return VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
}