zink: disallow intensity buffer images

Fixes: 475c43cf8a ("zink: translate intensity formats")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36199>
This commit is contained in:
Karol Herbst 2025-07-17 02:47:29 +02:00 committed by Marge Bot
parent 3a2f38cd44
commit 146e843254

View file

@ -1363,6 +1363,11 @@ zink_is_format_supported(struct pipe_screen *pscreen,
}
}
/* We can't swizzle buffer views */
if (bind & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE) &&
util_format_is_intensity(format))
return false;
if (bind & PIPE_BIND_SAMPLER_VIEW &&
!(props->bufferFeatures & VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT))
return false;