diff options
author | Adam Jackson <ajax@redhat.com> | 2021-10-04 16:19:29 -0400 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-10-13 16:36:27 +0000 |
commit | ea038747df019a1a4175e665c2b624858fc60e63 (patch) | |
tree | b7e21edff77ad5c64e3840fdd9f594eaa6043769 | |
parent | b01fe97a39cfca67d01ddcd632ff2bcd794e62c9 (diff) |
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>
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 | ||||
-rw-r--r-- | src/gallium/frontends/dri/dri_screen.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_screen.c | 5 | ||||
-rw-r--r-- | src/util/driconf.h | 4 |
4 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index fe23c0af65f..3b630f77698 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -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 diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c index be33a6b8a2b..ea7f7996be5 100644 --- a/src/gallium/frontends/dri/dri_screen.c +++ b/src/gallium/frontends/dri/dri_screen.c @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_screen.c b/src/mesa/drivers/dri/i965/brw_screen.c index 9e00819b338..b8e44f4b412 100644 --- a/src/mesa/drivers/dri/i965/brw_screen.c +++ b/src/mesa/drivers/dri/i965/brw_screen.c @@ -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)) diff --git a/src/util/driconf.h b/src/util/driconf.h index 973ba8a39cd..b708a2d8c86 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -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") |