On 11-04-06 12:16 AM, DRC wrote:
> On 4/5/11 11:53 AM, Nathan Kidd wrote:
>>>> d) M7 destroys the GLXPixmap before calling XCopyArea on the associated
>>>> Pixmap; a questionable practice probably left over from the days when
>>>> you could do 2D X drawing over a GLX drawable without problem. This is
>>>> worked around by deferring GLXPixmap deletion till Pixmap deletion. (My
>>>> NVIDIA driver + X.org gives a race when trying to do the XCopyArea, a
>>>> race that M7 always seems to win when run on the console but my test app
>>>> can occasionally loose, and VGL always seems to lose.)
>>
>> You probably understand this better than me; do we risk "leaking" video
>> memory with this approach? If the app calls glXDestroyPixmap but never
>> calls XFreePixmap how will libGL know the pbuffer isn't needed any more?
>> Of course we could just say "Bad app, don't do that", but I can imagine
>> this case being common because the app really isn't that bad; the Pixmap
>> will be implicitly freed when you close the X connection (but we can't
>> hook that implicit free).
>
> I don't understand the question. The Pbuffer gets destroyed in the body
> of the glXDestroyPixmap() function.
I mean, with that patch the real glXDestroyPixmap function is never
called unless XFreePixmap gets called. An app may be much more likely
to not call XFreePixmap because it is implicitly freed when closing the
X connection.
Or, stating my question another way. In a real OS with virtual memory
when your process dies it doesn't matter if you freed your mallocs or
not, the whole virtual address space is cleaned out by the OS. When
your app exits though, does your average libGL somehow know the video
memory is also unneeded? Thinking about an app that say, segfaults, how
would libGL be able to cleanup?
>> Sorry, by "push GLXPixmaps to the 2D X server" I mean push the rendered
>> pixels, just like we do for a GLX Window.
> I see several issues.
Thanks, those where exactly the kind of thoughts I wondered if I was
missing. Will reply separately after I've though about it for a bit.
>> Sorry, I meant *my changes* to rrfakerut were half-baked. Mathematica 7
>> is available as an eval if you ask, but tied to a specific machine. I'll
>> try to finish up unit tests for each of these issues.
>
> I was able to find a Mathematica 8 eval, but they don't seem to offer 7
> anymore. Also, can you post a procedure for reproducing the issue?
Hmph. Evidently released that immediately after giving me an eval of 7.
As soon as Mathematica comes up, in your blank window enter:
Plot3D[Sin[x+y^2], {x,-10,10}, {y,-10,10}]
Then hit Shift-Enter (in the menu something like Graphics -> Render, I
don't remember exactly.).
The result I get is nothing drawn below the Plot3D line. If you click
~200 pixels below the line and start to drag your mouse then you'll see
the 3D model rotate. When you let go the 3D model disappears. With my
patches applied when you let go of the mouse you still see the model.
The final image seen when you release the mouse comes through a
GLXPixmap XCopyArea'd to a Pixmap, XCopyArea'd to a Window.
-Nathan
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
VirtualGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtualgl-users