zink: Fix format query for minmax reduction support

All the rest of the filters here are written as "if asking for this
feature and it's not there, return false", with an implicit fallthrough
to the next test. There's no good reason to treat minmax differently.

Fixes: 22e1ed5722 zink: support format queries for VK_EXT_sampler_filter_minmax
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10397>
This commit is contained in:
Adam Jackson
2021-04-21 18:22:37 -04:00
committed by Marge Bot
parent 4a6b87ceab
commit fca09eb8f3
+3 -2
View File
@@ -879,8 +879,9 @@ zink_is_format_supported(struct pipe_screen *pscreen,
!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT))
return false;
if (bind & PIPE_BIND_SAMPLER_REDUCTION_MINMAX)
return props.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT;
if (bind & PIPE_BIND_SAMPLER_REDUCTION_MINMAX &&
!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT))
return false;
if ((bind & PIPE_BIND_SAMPLER_VIEW) || (bind & PIPE_BIND_RENDER_TARGET)) {
/* if this is a 3-component texture, force gallium to give us 4 components by rejecting this one */