[Mesa-dev] [PATCH 06/10] dri/common: Add option to disable exposure of 10 bpc color configs.

Emil Velikov emil.l.velikov at gmail.com
Thu Sep 7 14:33:45 UTC 2017


On 5 September 2017 at 06:01, Mario Kleiner <mario.kleiner.de at gmail.com> wrote:
> A few clients don't like RGB10X2 and RGB10A2 fbconfigs and
> visuals. Add a new driconf option 'expose_rgb10_configs' to
> allow per application enable/disable.
>
> The option defaults to enabled.
>
Most configs tends to be called "force.." or "allow...". How about we
use the allow here?

> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
> ---
>  src/mesa/drivers/dri/common/dri_util.c | 11 +++++++----
>  src/util/xmlpool/t_options.h           |  5 +++++
>  2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
> index 31a3040..972a1a4 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -55,6 +55,10 @@ const char __dri2ConfigOptions[] =
>        DRI_CONF_SECTION_PERFORMANCE
>           DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_1)
>        DRI_CONF_SECTION_END
> +
> +      DRI_CONF_SECTION_MISCELLANEOUS
> +         DRI_CONF_EXPOSE_RGB10_CONFIGS("true")
> +      DRI_CONF_SECTION_END
>     DRI_CONF_END;
>
>  /*****************************************************************/
> @@ -144,6 +148,9 @@ driCreateNewScreen2(int scrn, int fd,
>      psp->fd = fd;
>      psp->myNum = scrn;
>
> +    driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
> +    driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2");
> +
Please add a note why drirc should be parsed before InitScreen.
Otherwise someone might unintentionally move it.

-Emil


More information about the mesa-dev mailing list