Bug 15577 - texture_from_pixmap produces blank textures
Summary: texture_from_pixmap produces blank textures
Status: RESOLVED DUPLICATE of bug 14441
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-18 01:08 UTC by Ben Gamari
Modified: 2008-04-22 01:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg log (22.27 KB, text/plain)
2008-04-18 09:29 UTC, Ben Gamari
no flags Details
Xorg.conf (2.09 KB, text/plain)
2008-04-18 09:29 UTC, Ben Gamari
no flags Details
Compiz output (3.71 KB, text/plain)
2008-04-18 09:46 UTC, Ben Gamari
no flags Details

Description Ben Gamari 2008-04-18 01:08:00 UTC
It seems that recent xorg/mesa pulls have badly broken texture_from_pixmap. The progs/xdemocs/texture_from_pixmap example in mesa displays nothing but a black box surrounded by a gray border while compiz renders the desktop and all windows as black (while the caps of the cube plugin are rendered perfectly).

Strangely, I have found a texture_from_pixmap sample program that works as expected. I'll look into the differences between the mesa demo and the sample tomorrow. In the meantime, the sample code can be found at http://www.opengl.org/wiki/index.php/Programming_OpenGL_in_Linux:_Creating_a_texture_from_a_Pixmap. Any ideas? I'm certainly willing to take a stab at isolating the bug but I may need some input as to where the likely failure points may lie as my knowledge of this whole stack is pretty limited.

(I've tried bisecting xserver but trying to find mesa/drm/xf86-video-intel/xserver combinations that work together is practically impossible with the high churn rate recently. Any ideas on making the bisection process a little less painful?)
Comment 1 Michel Dänzer 2008-04-18 01:27:31 UTC
Are you using DRI2 or making sure it's using indirect rendering? (see bug 15477)

If that's not the problem, please attach at least the full xorg.conf and Xorg.0.log files and the full compiz output.
Comment 2 Ben Gamari 2008-04-18 09:28:16 UTC
Not using DRI2 (using xf86-video-intel master) and LIBGL_ALWAYS_INDIRECT is set (already made that mistake once). 
Comment 3 Ben Gamari 2008-04-18 09:29:02 UTC
Created attachment 16018 [details]
Xorg log
Comment 4 Ben Gamari 2008-04-18 09:29:22 UTC
Created attachment 16019 [details]
Xorg.conf
Comment 5 Ben Gamari 2008-04-18 09:46:03 UTC
Created attachment 16020 [details]
Compiz output

The strange thing about this bug is that applications using texture_from_pixmap (both the xdemo and compiz) detect no failure, as can be seen in this compiz log
Comment 6 Michel Dänzer 2008-04-18 10:03:41 UTC
Most likely the DRI1 driver support for GLX_EXT_texture_from_pixmap has been broken. It would be useful if you could try and find out which change of mesa or xf86-video-intel caused this.
Comment 7 Ben Gamari 2008-04-18 10:06:24 UTC
Do you suppose the problem is mesa or xf86-video-intel? I'll start with xf86-video-intel as it's substantially easier to bisect without breakage. Any tips for bisecting mesa without touching too many other packages?
Comment 8 Ben Gamari 2008-04-18 10:12:54 UTC
(In reply to comment #7)
> Do you suppose the problem is mesa or xf86-video-intel? I'll start with
> xf86-video-intel as it's substantially easier to bisect without breakage. Any
> tips for bisecting mesa without touching too many other packages?
> 

I guess what I was really asking in my first question is how (where) xf86-video-intel supports texture_from_pixmap. Are there any codepaths in particular to be looking for changes in?
Comment 9 Ben Gamari 2008-04-18 10:22:40 UTC
Alright, I just tried xf86-video-intel all the way back to 2e43bec8731ba1b172f7a0bf867bbb5c1adbda2d (Jan 30 2008) to no avail. Seems unlikely the problem is in the intel driver. This definitely presents some issues as that means I'll need to move back mesa. I'll report back as to how it went but I don't hold out much hope. Last night's bisections were slow and painful at best.
Comment 10 Michel Dänzer 2008-04-18 10:24:46 UTC
Only I830TexOffsetStart() is directly involved, so I'm afraid mesa is more likely.
Comment 11 Ben Gamari 2008-04-18 11:18:51 UTC
Alright finally. After an hour of fudging around with dozens of mesa and xserver revisions, I finally managed to get one combination to build (mesa 42a04ada10 and xserver 13bfa5937d) but unfortunately, compiz still doesn't work. Off to the next combination.
Comment 12 Ben Gamari 2008-04-18 11:44:03 UTC
(In reply to comment #11)
> Alright finally. After an hour of fudging around with dozens of mesa and
> xserver revisions, I finally managed to get one combination to build (mesa
> 42a04ada10 and xserver 13bfa5937d) but unfortunately, compiz still doesn't
> work. Off to the next combination.
> 

I'm beginning to think I'm missing something critical here. I have tried (mesa 403b161 (Mar 25), xserver d04ea267a (Feb 28)) and (mesa 1fd82451e (Feb 7), xserver fbd776894 (Feb 16); mid February) and neither have worked. I only recently started using the Intel driver so I can't be sure, but it seems unlikely that texture_from_pixmap has been broken for this long. Right?
Comment 13 Ben Gamari 2008-04-18 11:57:05 UTC
That's it. I give up. I can't bisect any further back. I've made it to mid-January (8517079cbcbbf31291b05420f3b776df712dfd47) and now mesa won't even compile (TTM crap). There must be a better way to do this. I don't mind gdbing (it's certainly a whole lot less frustrating than sifting through xserver/mesa commits)

What are the steps involved in the texture_from_pixmap extension? Where is the code involved? Thanks for your help so far!
Comment 14 Michel Dänzer 2008-04-21 02:14:10 UTC
(In reply to comment #12)
> [...] it seems unlikely that texture_from_pixmap has been broken for this long. > Right?

Right.

(In reply to comment #13)
> What are the steps involved in the texture_from_pixmap extension? Where is the
> code involved? Thanks for your help so far!

The central piece is __glXDRIbindTexImage() in GL/glx/glxdri.c.
Comment 15 Ben Gamari 2008-04-21 10:40:14 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > [...] it seems unlikely that texture_from_pixmap has been broken for this long. > Right?
> 
> Right.
> 
> (In reply to comment #13)
> > What are the steps involved in the texture_from_pixmap extension? Where is the
> > code involved? Thanks for your help so far!
> 
> The central piece is __glXDRIbindTexImage() in GL/glx/glxdri.c.
> 

Thank you very much for this. I'll do what I can with it.
Comment 16 Ben Gamari 2008-04-21 22:33:38 UTC
If I had to guess, I think bug #14441 might be this same issue. Any input?
Comment 17 Michel Dänzer 2008-04-22 01:38:21 UTC

*** This bug has been marked as a duplicate of bug 14441 ***


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.