Bug 92105

Summary: [bisected] Screen corrupted upon login
Product: xorg Reporter: Nick Sarnie <sarnex>
Component: Server/Acceleration/glamorAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: emil.l.velikov
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
screenshot
none
bad xorg.log
none
good xorg.log none

Description Nick Sarnie 2015-09-24 15:01:36 UTC
Created attachment 118433 [details]
screenshot

Hi.

After 'glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import', my screen is corrupted upon login. I've attached a screenshot of what it looks like.

Let me know if you need any more info.

Thanks,
sarnex
Comment 1 Michel Dänzer 2015-09-25 02:49:09 UTC
Please attach the corresponding Xorg.0.log file.
Comment 2 Nick Sarnie 2015-09-25 03:30:59 UTC
Created attachment 118438 [details]
bad xorg.log

I talked to xexaxo on irc about this a bit, here's some of the information I sent him.
Comment 3 Nick Sarnie 2015-09-25 03:31:18 UTC
Created attachment 118439 [details]
good xorg.log
Comment 4 Michel Dänzer 2015-09-25 08:33:10 UTC
The problem is that epoxy_has_gl_extension() is called before the context is made current (or even created). Every OpenGL API call requires a current context, including the one for getting the list of supported extensions.
Comment 5 Emil Velikov 2015-09-25 13:02:45 UTC
Ouch, did not notice that the eglMakeCurrent call is after the extension checks. A patch can be found here [1], if it hasn't hit your inbox.

[1] http://patchwork.freedesktop.org/patch/60400/
Comment 6 Nick Sarnie 2015-09-25 13:15:45 UTC
(In reply to Emil Velikov from comment #5)
> Ouch, did not notice that the eglMakeCurrent call is after the extension
> checks. A patch can be found here [1], if it hasn't hit your inbox.
> 
> [1] http://patchwork.freedesktop.org/patch/60400/

That fixed it, thanks!
Comment 7 Michel Dänzer 2015-09-30 00:04:30 UTC
commit 19a87257f92e7f57a167fc03fba014ee22d8e1ab
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Fri Sep 25 14:04:34 2015 +0100

    glamor: move 'dri3_capable' extension checks after eglMakeCurrent

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.