summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMario Kleiner <[email protected]>2017-12-15 23:04:54 +0100
committerMarek Olšák <[email protected]>2018-01-03 22:57:56 +0100
commit67674ad0dc68eb128e5f176f772d902931deb1de (patch)
tree0d2913402e29928b5a39d9e6bd36cef103124d6d /src/mesa/drivers
parent9e63cbacb6bc10b4426fc2af4989fbdc86ec4167 (diff)
dri/common: Add option to allow exposure of 10 bpc color configs. (v2)
Some clients may not like RGB10X2 and RGB10A2 fbconfigs and visuals. Add a new driconf option 'allow_rgb10_configs' to allow per application enable/disable. The option defaults to enabled. v2: Rename expose_rgb10_configs to allow_rgb10_configs, as suggested by Emil. Add comment to option parsing, to make sure it stays before the ->InitScreen(). Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index d504751c392..d4fba0b2747 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_ALLOW_RGB10_CONFIGS("true")
+ DRI_CONF_SECTION_END
DRI_CONF_END;
/*****************************************************************/
@@ -144,6 +148,10 @@ driCreateNewScreen2(int scrn, int fd,
psp->fd = fd;
psp->myNum = scrn;
+ /* Option parsing before ->InitScreen(), as some options apply there. */
+ driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
+ driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2");
+
*driver_configs = psp->driver->InitScreen(psp);
if (*driver_configs == NULL) {
free(psp);
@@ -179,10 +187,6 @@ driCreateNewScreen2(int scrn, int fd,
if (psp->max_gl_es2_version >= 30)
psp->api_mask |= (1 << __DRI_API_GLES3);
- driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
- driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2");
-
-
return psp;
}