Bug 81800 - [Regression] Recent change in glamor make many X application in Xwayland totally blank
Summary: [Regression] Recent change in glamor make many X application in Xwayland tota...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/glamor (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Zhigang Gong
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 88198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-27 02:55 UTC by Boyan Ding
Modified: 2015-01-17 07:00 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Right rendering (with version 1.15.99.904) (423.17 KB, image/png)
2014-08-21 13:43 UTC, Boyan Ding
no flags Details
Wrong rendering (current git version) (394.10 KB, image/png)
2014-08-21 13:43 UTC, Boyan Ding
no flags Details
Make xwl_glamor_create_pixmap_for_bo match glamor_create_texture_from_image (635 bytes, patch)
2015-01-09 10:05 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Boyan Ding 2014-07-27 02:55:45 UTC
Launching a lot of X applications such as glxgears, gnome-terminal, etc. in weston using Xwayland in resent versions of X only shows a blank window.

After bisecting, the first bad commit was found to be:
6d4954884908ea9894fcfe9836db1ba7bb45be61 Merge remote-tracking branch 'origin/master' into glamor-next

and I found in the commit message that there were manual merge to resolve conflict. Did something went wrong there?
Comment 1 Boyan Ding 2014-07-27 03:49:24 UTC
It seems that my bisection is wrong... The first bad commit is the merge because the merge add glamor in xwayland in...

I'll try to find what exactly causes the issue.
Comment 2 Boyan Ding 2014-07-27 04:25:22 UTC
I replayed the patches of glamor-next branch on top of 1.16.0 where xwayland has glamor. And bisected. And I believe the first bad commit is:
45ebc4e3fac7f1a85167d05e2833949b89f02d64 glamor: Add glamor_program based copy acceleration
Comment 3 Boyan Ding 2014-08-21 13:39:59 UTC
Any updates on this issue?

I just found the rendering libreoffice-writer quite interesting, some part of the window is normal and other parts are black in recent versions. See the attachments below.
Comment 4 Boyan Ding 2014-08-21 13:43:02 UTC
Created attachment 105044 [details]
Right rendering (with version 1.15.99.904)

Screenshot taken under weston using the maynard shell.
Comment 5 Boyan Ding 2014-08-21 13:43:49 UTC
Created attachment 105045 [details]
Wrong rendering (current git version)
Comment 6 Michel Dänzer 2015-01-09 01:41:26 UTC
*** Bug 88198 has been marked as a duplicate of this bug. ***
Comment 7 Michel Dänzer 2015-01-09 01:56:30 UTC
Axel and Markus tracked down the cause of this a while ago, but never went through with a solution. :(
Comment 8 Markus Wick 2015-01-09 08:29:14 UTC
Michael: I think you're talking about this workaround? http://markus.members.selfnet.de/xorg/xwayland.patch

But I think it's a bug within mesa as glEGLImageTargetTexture2DOES should not return an incomplete texture.
Comment 9 Michel Dänzer 2015-01-09 10:05:04 UTC
Created attachment 111999 [details] [review]
Make xwl_glamor_create_pixmap_for_bo match glamor_create_texture_from_image

(In reply to Markus Wick from comment #8)
> But I think it's a bug within mesa as glEGLImageTargetTexture2DOES should
> not return an incomplete texture.

glEGLImageTargetTexture2DOES doesn't create a texture object but an image for the currently bound texture object.

Does this patch alone fix the problem?
Comment 10 drago01 2015-01-09 11:25:08 UTC
(In reply to Michel Dänzer from comment #9)
> Created attachment 111999 [details] [review] [review]
> Make xwl_glamor_create_pixmap_for_bo match glamor_create_texture_from_image
> 
> (In reply to Markus Wick from comment #8)
> > But I think it's a bug within mesa as glEGLImageTargetTexture2DOES should
> > not return an incomplete texture.
> 
> glEGLImageTargetTexture2DOES doesn't create a texture object but an image
> for the currently bound texture object.
> 
> Does this patch alone fix the problem?

Yes it does.
Comment 11 Boyan Ding 2015-01-17 07:00:21 UTC
commit 5af2f5b7d2f955586d0cb40eb30812f1893db22e
Author: Markus Wick <markus@selfnet.de>
Date:   Thu Jan 15 22:03:18 2015 +0100

    xwayland: Set glamor filter to nearest


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.