View Single Post
Old 12-10-06, 07:12 PM   #1
kwindla
Registered User
 
Join Date: Dec 2006
Posts: 6
Default GLX Pixmap destroy issue

Hi,

I'm using GLX Pixmaps and the texture_from_pixmap extension to render
textures in one process and use them from another. What I'm doing is
similar to what folks writing compositors are doing, except that I'm
not concerned about drawing from X Windows, only about textures I
create myself across multiple processes using GL.

I've got two -- I think, related -- problems that appear to me to be
driver bugs:

1) When I "wrap" an X Pixmap in two different GLX Pixmaps,
destruction of either GLX Pixmap makes the other one into a Bad
Drawable and renders the underlying X Pixmap unusable. This is
almost a show-stopper for me, although it's just barely possible
to work around this problem with a lot of interprocess
communication <laugh>.

2) A memory leak in the X server is created when a GLX Pixmap that
"shares" an underlying X Pixmap is destroyed -- either explicitly
or when a process terminates. This is a show-stopper, as I
haven't been able to figure out a work-around (other than
re-starting the X Server <laugh>.)

I'm attaching a stripped-down, single-process test case that
demonstrates both these issues (at least on my GeForce 6600 with
1.0-9631).

Some further notes ...

- My core work-flow looks like so:

Rendering Process: - create an X Pixmap
- create a GL Context and a GLX Pixmap
- make Context/glXPixmap current
- draw a bunch of stuff
- [... loop, drawing periodically]

Compositing Process: - create an X Window
- create a GL Contex
- create a GLX Pixmap that wraps an
X Pixmap created by a rendering process
- make Context/Window current
- call glXBindTexImageEXT to use the X Pixmap
as a texture
- draw that texture to the Window
- [... loop, drawing that and other textures]



- I need the speed of direct rendering both for creating the textures
in the rendering process and for drawing with them in the
compositing process. I may be running many rendering processes in
parallel, and so using a relatively large number of textures across
processes.

So my assumption has been that using this texture_from_pixmap
approach is the best way to go. Suggestions for alternative ways to
accomplish my goals are very welcome.

- I know that my graphics card is a bit on the elderly side. I'd be
happy to hear that my card is the problem. I'm porting from another
platform and using a cobbled-together linux box for testing. When I
get things working, I'll buy a spiffy new PCI-X machine and card
(or, actually, several of each!).

Kwin

Attachments:


Hi,

I'm using GLX Pixmaps and the texture_from_pixmap extension to render
textures in one process and use them from another. What I'm doing is
similar to what folks writing compositors are doing, except that I'm
not concerned about drawing from X Windows, only about textures I
create myself across multiple processes using GL.

I've got two -- I think, related -- problems that appear to me to be
driver bugs:

1) When I "wrap" an X Pixmap in two different GLX Pixmaps,
destruction of either GLX Pixmap makes the other one into a Bad
Drawable and renders the underlying X Pixmap unusable. This is
almost a show-stopper for me, although it's just barely possible
to work around this problem with a lot of interprocess
communication <laugh>.

2) A memory leak in the X server is created when a GLX Pixmap that
"shares" an underlying X Pixmap is destroyed -- either explicitly
or when a process terminates. This is a show-stopper, as I
haven't been able to figure out a work-around (other than
re-starting the X Server <laugh>.)

I'm attaching a stripped-down, single-process test case that
demonstrates both these issues (at least on my GeForce 6600 with
1.0-9631).

Some further notes ...

- My core work-flow looks like so:

Rendering Process: - create an X Pixmap
- create a GL Context and a GLX Pixmap
- make Context/glXPixmap current
- draw a bunch of stuff
- [... loop, drawing periodically]

Compositing Process: - create an X Window
- create a GL Contex
- create a GLX Pixmap that wraps an
X Pixmap created by a rendering process
- make Context/Window current
- call glXBindTexImageEXT to use the X Pixmap
as a texture
- draw that texture to the Window
- [... loop, drawing that and other textures]



- I need the speed of direct rendering both for creating the textures
in the rendering process and for drawing with them in the
compositing process. I may be running many rendering processes in
parallel, and so using a relatively large number of textures across
processes.

So my assumption has been that using this texture_from_pixmap
approach is the best way to go. Suggestions for alternative ways to
accomplish my goals are very welcome.

- I know that my graphics card is a bit on the elderly side. I'd be
happy to hear that my card is the problem. I'm porting from another
platform and using a cobbled-together linux box for testing. When I
get things working, I'll buy a spiffy new PCI-X machine and card
(or, actually, several of each!).

Kwin

Attachments:
http://g-speak.com/nvidia/nvidia-bug-report.log
http://g-speak.com/nvidia/pixbuff-destroy-test.c
kwindla is offline   Reply With Quote