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

Mario Kleiner mario.kleiner.de at gmail.com
Sat Sep 9 10:38:04 UTC 2017


On 09/07/2017 04:33 PM, Emil Velikov wrote:
> 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?
> 

Yes, makes sense. I wonder if we should call it more generally 
allow_deep_color or something like that, as a general switch for any 
format with more than the usual rgb888 precision? Assuming any client 
that has trouble with 1010102 would also have the same kind of trouble 
with future higher bit depths?

>> 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.
> 

Will do.
-mario


> -Emil
> 


More information about the mesa-dev mailing list