zink: do not warn about rare features until used
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 27 Aug 2021 08:05:52 +0000 (10:05 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Aug 2021 18:21:08 +0000 (18:21 +0000)
commit64c558ab8302cfc7f21c6283cb88b9c214d893e9
tree3a4ea986580b9ada30accc4a1723fb0a615399b9
parent28b3563a95ab1d760e0998dd5de82e467ebf5f27
zink: do not warn about rare features until used

We currently cause the following scary warning to be printed on
start-up for *every* application regardless if that feature is being
used or not when run on top of ANV:

> WARNING: Some incorrect rendering might occur because the selected
> Vulkan device (Intel(R) UHD Graphics 620 (KBL GT2)) doesn't support
> base Zink requirements: line_rast_feats.stippledRectangularLines
> line_rast_feats.stippledSmoothLines

There's no need to scare the users about this, as most applications
don't care about these combinational features. So let's instead emit a
warning when these features are attempted (but failed) to be used
instead.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12587>
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_state.c