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>
(cherry picked from commit b50275a4b6)
This commit is contained in:
Chad Versace 2020-09-08 09:44:43 -07:00 committed by Dylan Baker
parent 8d5be4e02e
commit 6a6f94e9ec
2 changed files with 5 additions and 5 deletions

View file

@ -1516,7 +1516,7 @@
"description": "anv/image: Fix isl_surf_usage_flags for stencil images",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -540,14 +540,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,