[Mesa-dev] [PATCH 1/4] st/dri: expose sRGB visuals (v2)
Marek Olšák
maraeo at gmail.com
Thu Jul 16 07:31:19 PDT 2015
I'm not familiar with DRI3, but it looks like sRGB visuals should work
with DRI3 too.
Now that I think about it, I can drop the change in
dri2_drawable_get_buffers, because it's not needed with the change in
dri_drawable_get_format.
Marek
On Thu, Jul 16, 2015 at 4:08 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 16/07/15 14:38, Marek Olšák wrote:
>> On Thu, Jul 16, 2015 at 3:06 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> On 12 July 2015 at 20:10, Marek Olšák <maraeo at gmail.com> wrote:
>>>> From: Marek Olšák <marek.olsak at amd.com>
>>>>
>>>> v2: The fix for the darkness in Ubuntu Unity is in the hunk
>>>> with the 4-line comment.
>>>> ---
>>>> src/gallium/state_trackers/dri/dri2.c | 2 ++
>>>> src/gallium/state_trackers/dri/dri_drawable.c | 7 ++++++-
>>>> src/gallium/state_trackers/dri/dri_screen.c | 23 +++++++++++++++++++----
>>>> src/mesa/state_tracker/st_manager.c | 1 +
>>>> 4 files changed, 28 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
>>>> index 1eda036..5aa785c 100644
>>>> --- a/src/gallium/state_trackers/dri/dri2.c
>>>> +++ b/src/gallium/state_trackers/dri/dri2.c
>>>> @@ -189,9 +189,11 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable,
>>>> */
>>>> switch(format) {
>>>> case PIPE_FORMAT_B8G8R8A8_UNORM:
>>>> + case PIPE_FORMAT_B8G8R8A8_SRGB:
>>>> depth = 32;
>>>> break;
>>>> case PIPE_FORMAT_B8G8R8X8_UNORM:
>>>> + case PIPE_FORMAT_B8G8R8X8_SRGB:
>>>> depth = 24;
>>>> break;
>>>> case PIPE_FORMAT_B5G6R5_UNORM:
>>> Have you looked what it'll take for get __DRI_IMAGE (dri3?) going ?
>>> From a quick look we need a couple extra defines, and some minimal
>>> changes in the st/dri2.
>>
>> I have really no idea. It shouldn't be difficult though. I had thought
>> Axel Davy had implemented __DRI_IMAGE, so I don't know.
>>
> True he has, but there is a bit of divergense. The above path is hit for
> dri2 drivers. The __DRI_IMAGE equivalent is dri_image_drawable_get_buffers.
>
> -Emil
>
More information about the mesa-dev
mailing list