anv/image: Fix isl_surf_usage_flags for stencil images

Respect VkImageStencilUsageCreateInfoEXT.

CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Chad Versace 2020-09-08 09:44:43 -07:00
parent 51a19c83b0
commit b50275a4b6
1 changed files with 4 additions and 4 deletions

View File

@ -563,14 +563,14 @@ make_surface(struct anv_device *device,
anv_get_format_plane(&device->info, image->vk_format, aspect, image->tiling);
struct anv_surface *anv_surf = &image->planes[plane].surface;
const isl_surf_usage_flags_t usage =
choose_isl_surf_usage(image->create_flags, image->usage,
isl_extra_usage_flags, aspect);
VkImageUsageFlags plane_vk_usage =
aspect == VK_IMAGE_ASPECT_STENCIL_BIT ?
image->stencil_usage : image->usage;
const isl_surf_usage_flags_t usage =
choose_isl_surf_usage(image->create_flags, plane_vk_usage,
isl_extra_usage_flags, aspect);
bool needs_shadow =
anv_image_plane_needs_shadow_surface(&device->info,
plane_format,