Make sure we check for any GL errors generated from glGetIntegerv
Needs RevisionPublic

Authored by garg on Jan 22 2019, 7:07 PM.

Details

Reviewers
zzag
Group Reviewers
KWin
Summary

Some GLES implementations generate GL_INVALID_ENUM when querying
for GL_CONTEXT_FLAGS.

Diff Detail

Repository
R108 KWin
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7423
Build 7441: arc lint + arc unit
garg created this revision.Jan 22 2019, 7:07 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 22 2019, 7:07 PM
garg requested review of this revision.Jan 22 2019, 7:07 PM
zzag added a comment.Jan 22 2019, 8:19 PM

I don't think that's the right way to fix the problem.

Do you have OpenGL ES 3.2?

zzag edited reviewers, added: KWin; removed: kwin.Jan 22 2019, 8:20 PM

Also, it looks like we don't create debug context.

garg added a comment.Jan 23 2019, 9:01 AM
In D18460#398165, @zzag wrote:

Also, it looks like we don't create debug context.

Do we need a debug context to query GL_CONTEXT_FLAGS?

zzag added a comment.Jan 23 2019, 9:02 AM
In D18460#398295, @garg wrote:

Do we need a debug context to query GL_CONTEXT_FLAGS?

No.

garg added a comment.Jan 23 2019, 9:04 AM
In D18460#398164, @zzag wrote:

I don't think that's the right way to fix the problem.

Do you have OpenGL ES 3.2?

Yes, I have a strong suspicion that the Mali GLES implementation does not support querying that flag even though it advertises v3.2. I'm waiting on hearing back on this, but I also don't see a issue with adding what is essentially better error checking in our code?

zzag added a comment.EditedJan 23 2019, 9:11 AM
In D18460#398297, @garg wrote:

Yes, I have a strong suspicion that the Mali GLES implementation does not support querying that flag even though it advertises v3.2. I'm waiting on hearing back on this, but I also don't see a issue with adding what is essentially better error checking in our code?

The problem I see with it is that we're working around one specific GLES implementation. Given that querying context flags was introduced in 3.2, this should be discussed first with folks that develop the Mali GLES implementation.

Keep in mind that the Nvidia driver triggered endless loops in checkglerror.

The nvidia thing is with glGetError
checkglerror is in our code which handles that case.

garg added a comment.Jan 30 2019, 5:43 PM

I've heard back from Mali upstream and this particular bug has been fixed in r20 of their blob, and I'm pushing Rockchip to get that driver released. I'm still of the opinion that adding the error check is a good idea though. Any thoughts?

zzag added a comment.EditedJan 30 2019, 9:17 PM
In D18460#402510, @garg wrote:

... adding the error check is a good idea though.

No, it's not.

zzag requested changes to this revision.Apr 26 2019, 12:40 PM

Requesting changes to remove from review queue.

This revision now requires changes to proceed.Apr 26 2019, 12:40 PM