diff options
author | Erik Faye-Lund <[email protected]> | 2019-07-10 14:59:58 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-28 08:51:46 +0000 |
commit | 10439594ecec3242d0ca94754bcde521363560d6 (patch) | |
tree | 5f90a7a6942804c408a01364c0a792416f66c182 | |
parent | 4480aefc38ab9bbac965d36942ee8c0111a4f988 (diff) |
zink: only consider format-desc if checking details
Acked-by: Jordan Justen <[email protected]>
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 260d4bf90db..86fa16fdba4 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -588,9 +588,9 @@ zink_is_format_supported(struct pipe_screen *pscreen, if (vkformat == VK_FORMAT_UNDEFINED) return FALSE; - const struct util_format_description *desc = util_format_description(format); if (sample_count >= 1) { VkSampleCountFlagBits sample_mask = vk_sample_count_flags(sample_count); + const struct util_format_description *desc = util_format_description(format); if (util_format_is_depth_or_stencil(format)) { if (util_format_has_depth(desc)) { if (bind & PIPE_BIND_DEPTH_STENCIL && @@ -651,9 +651,12 @@ zink_is_format_supported(struct pipe_screen *pscreen, return FALSE; } - if (desc->layout == UTIL_FORMAT_LAYOUT_BPTC && - !screen->feats.textureCompressionBC) - return FALSE; + if (util_format_is_compressed(format)) { + const struct util_format_description *desc = util_format_description(format); + if (desc->layout == UTIL_FORMAT_LAYOUT_BPTC && + !screen->feats.textureCompressionBC) + return FALSE; + } return TRUE; } |