dri: Remove the allow_fp16_configs option, always allow them

There's no danger of accidentally using these, the default pixel format
is integer and if you want float you need to have explicitly asked for
it in eglChooseConfig.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13182>
This commit is contained in:
Adam Jackson 2021-10-04 16:19:29 -04:00 committed by Marge Bot
parent b01fe97a39
commit ea038747df
4 changed files with 2 additions and 11 deletions

View file

@ -50,6 +50,5 @@ DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_VS_POSITION_ALWAYS_INVARIANT(false)
DRI_CONF_VS_POSITION_ALWAYS_PRECISE(false)
DRI_CONF_ALLOW_RGB10_CONFIGS(true)
DRI_CONF_ALLOW_FP16_CONFIGS(false)
DRI_CONF_FORCE_INTEGER_TEX_NEAREST(false)
DRI_CONF_SECTION_END

View file

@ -176,8 +176,7 @@ dri_fill_in_modes(struct dri_screen *screen)
allow_rgba_ordering = dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING);
allow_rgb10 = driQueryOptionb(&screen->dev->option_cache, "allow_rgb10_configs");
allow_fp16 = driQueryOptionb(&screen->dev->option_cache, "allow_fp16_configs");
allow_fp16 &= dri_loader_get_cap(screen, DRI_LOADER_CAP_FP16);
allow_fp16 = dri_loader_get_cap(screen, DRI_LOADER_CAP_FP16);
msaa_samples_max = (screen->st_api->feature_mask & ST_API_FEATURE_MS_VISUALS_MASK)
? MSAA_VISUAL_MAX_SAMPLES : 1;

View file

@ -98,7 +98,6 @@ static const driOptionDescription brw_driconf[] = {
DRI_CONF_VS_POSITION_ALWAYS_PRECISE(false)
DRI_CONF_ALLOW_RGB10_CONFIGS(false)
DRI_CONF_ALLOW_RGB565_CONFIGS(true)
DRI_CONF_ALLOW_FP16_CONFIGS(false)
DRI_CONF_SECTION_END
};
@ -2184,9 +2183,7 @@ brw_allowed_format(__DRIscreen *dri_screen, mesa_format format)
return false;
/* Shall we expose fp16 formats? */
bool allow_fp16_configs = driQueryOptionb(&screen->optionCache,
"allow_fp16_configs");
allow_fp16_configs &= brw_loader_get_cap(dri_screen, DRI_LOADER_CAP_FP16);
bool allow_fp16_configs = brw_loader_get_cap(dri_screen, DRI_LOADER_CAP_FP16);
if (!allow_fp16_configs &&
(format == MESA_FORMAT_RGBA_FLOAT16 ||
format == MESA_FORMAT_RGBX_FLOAT16))

View file

@ -371,10 +371,6 @@
DRI_CONF_OPT_B(allow_rgb565_configs, def, \
"Allow exposure of visuals and fbconfigs with rgb565 formats")
#define DRI_CONF_ALLOW_FP16_CONFIGS(def) \
DRI_CONF_OPT_B(allow_fp16_configs, def, \
"Allow exposure of visuals and fbconfigs with fp16 formats")
#define DRI_CONF_FORCE_INTEGER_TEX_NEAREST(def) \
DRI_CONF_OPT_B(force_integer_tex_nearest, def, \
"Force integer textures to use nearest filtering")