asahi: Add and support the no_fp16 driconf flag

This is the driconf equivalent of our debug no16 flag, which disables
fp16 support to work around apps using bad GLSL precision qualifiers.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
Asahi Lina 2023-08-30 15:42:04 +09:00 committed by Marge Bot
parent 45be01374f
commit 025da70013
3 changed files with 9 additions and 0 deletions

View file

@ -2150,6 +2150,10 @@ agx_screen_create(int fd, struct renderonly *ro,
driParseConfigFiles(config->options, config->options_info, 0, "asahi", NULL,
NULL, NULL, 0, NULL, 0);
/* Forward no16 flag from driconf */
if (driQueryOptionb(config->options, "no_fp16"))
agx_screen->dev.debug |= AGX_DBG_NO16;
agx_screen->dev.fd = fd;
agx_screen->dev.ro = ro;

View file

@ -2,4 +2,5 @@
/* clang-format off */
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_NO_FP16(false)
DRI_CONF_SECTION_END

View file

@ -465,6 +465,10 @@
DRI_CONF_OPT_B(allow_multisampled_copyteximage, def, \
"Allow CopyTexSubImage and other to copy sampled framebuffer")
#define DRI_CONF_NO_FP16(def) \
DRI_CONF_OPT_B(no_fp16, def, \
"Disable 16-bit float support")
/**
* \brief Initialization configuration options
*/