glx: Don't use sRGB configs on llvmpipe with depth 16
ClosedPublic

Authored by fredrik on Jul 2 2019, 12:19 AM.

Details

Summary

This is necessary to keep openQA working, which uses LLVMpipe as a
renderer on a Cirrus device that operates in depth 16.

LLVMpipe advertises 24/32 bit sRGB configurations on this setup, but
they cannot be presented.

CCBUG: 408594

Test Plan

Compile tested only.

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
fredrik created this revision.Jul 2 2019, 12:19 AM
Restricted Application added a project: KWin. · View Herald TranscriptJul 2 2019, 12:19 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
fredrik requested review of this revision.Jul 2 2019, 12:19 AM
fvogt added a subscriber: fvogt.EditedJul 2 2019, 8:32 AM

llvmpipe generally works fine, just not when using it with cirrus if the kernel uses 16bpp.

romangg added a subscriber: romangg.Jul 9 2019, 3:11 PM

Please be more verbose in your summary.

fvogt requested changes to this revision.Aug 13 2019, 7:22 AM
fvogt added a reviewer: KWin.

From the bug report:

(In reply to Fabian Vogt from comment #31)
> (In reply to Fredrik Höglund from comment #30)
> > (In reply to Fabian Vogt from comment #27)
> > > > So I'm going to solve this by blacklisting sRGB configs on LLVMPipe instead.
> > >
> > > That sounds like a bit too much, everything except cirrus with 16bpp seems to
> > > work.
> >
> > Unfortunately we can't easily detect that the video device is a Cirrus
> > device. The OpenGL driver can only tell us that it is llvmpipe; it doesn't
> > know where the results of the rendering is going to be presented.
>
> Luckily that shouldn't be necessary, as we only know that llvmpipe + 16bpp
> is broken. Is detecting a 16bpp default framebuffer possible?

That's something that we can do.

I'll update https://phabricator.kde.org/D22203

This revision now requires changes to proceed.Aug 13 2019, 7:22 AM
fredrik updated this revision to Diff 65565.Sep 7 2019, 11:37 AM
fredrik retitled this revision from glx: Don't use sRGB configs on llvmpipe to glx: Don't use sRGB configs on llvmpipe with depth 16.
fredrik edited the summary of this revision. (Show Details)
fredrik edited the test plan for this revision. (Show Details)

Only disable sRGB configurations on LLVMpipe when the default depth is 16.

zzag accepted this revision.Sep 7 2019, 1:50 PM
fvogt accepted this revision.Sep 9 2019, 9:44 AM

Tested, works, thanks!

This revision is now accepted and ready to land.Sep 9 2019, 9:44 AM
This revision was automatically updated to reflect the committed changes.