Skip to content
Snippets Groups Projects
Commit 1c054c8a authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Dylan Baker
Browse files

zink: reject resource creation if format features don't match attachment


if a rendertarget-specified image can't be a rendertarget or a blit dst
then it can't be used for the designated functionality and must be rejected

cc: mesa-stable

fixes hangs on various nv driver versions:
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgba5551_fastest

Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Part-of: <mesa/mesa!15960>
(cherry picked from commit 37ac8647)
parent 1163e9a8
No related branches found
No related tags found
No related merge requests found
......@@ -1388,7 +1388,7 @@
"description": "zink: reject resource creation if format features don't match attachment",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"because_sha": null
},
{
......
......@@ -254,7 +254,7 @@ get_image_usage_for_feats(struct zink_screen *screen, VkFormatFeatureFlags feats
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
if ((bind & (PIPE_BIND_LINEAR | PIPE_BIND_SHARED)) != (PIPE_BIND_LINEAR | PIPE_BIND_SHARED))
usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
} else if (templ->nr_samples)
} else if (templ->nr_samples || !(feats & VK_FORMAT_FEATURE_BLIT_DST_BIT))
/* this can't be populated, so we can't do it */
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment