zink: reapply VkImageViewUsageCreateInfo when rebinding a surface

attachment bits must always be removed if they are not supported

fixes (ANV):
KHR-GL46.texture_view.view_classes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22713>
(cherry picked from commit 13eaa7cdd0)
This commit is contained in:
Mike Blumenkrantz 2023-04-26 09:52:56 -04:00 committed by Eric Engestrom
parent bed64b7062
commit 2236dd6d55
2 changed files with 2 additions and 1 deletions

View file

@ -1696,7 +1696,7 @@
"description": "zink: reapply VkImageViewUsageCreateInfo when rebinding a surface",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -421,6 +421,7 @@ zink_rebind_surface(struct zink_context *ctx, struct pipe_surface **psurface)
assert(entry);
_mesa_hash_table_remove(&res->surface_cache, entry);
VkImageView image_view;
apply_view_usage_for_format(screen, res, surface, surface->base.format, &ivci);
VkResult result = VKSCR(CreateImageView)(screen->dev, &ivci, NULL, &image_view);
if (result != VK_SUCCESS) {
mesa_loge("ZINK: failed to create new imageview (%s)", vk_Result_to_str(result));