zink: avoid host transfer usage with sparse

It's not a requirement to support this for implementations. Also
doesn't make much sense...

Fixes
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency
on Anv with VK_EXT_host_image_copy enabled.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f24891269d ("zink: check/use suboptimal HIC during ici init")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31391>
This commit is contained in:
Lionel Landwerlin
2024-09-26 15:43:28 +03:00
committed by Marge Bot
parent 159cc0fe6f
commit fe57b10221
2 changed files with 4 additions and 4 deletions
@@ -135,6 +135,3 @@ spec@!opengl 1.0@gl-1.0-dlist-beginend,Crash
spec@nv_texture_barrier@blending-in-shader,Crash
spec@arb_viewport_array@display-list,Fail
# passes locally
KHR-GL46.sparse_texture_tests.SparseTextureCommitment,Fail
+4 -1
View File
@@ -453,7 +453,10 @@ get_image_usage_for_feats(struct zink_screen *screen, VkFormatFeatureFlags2 feat
if (bind & PIPE_BIND_STREAM_OUTPUT)
usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
if (screen->info.have_EXT_host_image_copy && feats & VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT)
/* Add host transfer if not sparse */
if (!(templ->flags & PIPE_RESOURCE_FLAG_SPARSE) &&
screen->info.have_EXT_host_image_copy &&
feats & VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT)
usage |= VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT;
return usage;