Commit Graph

20 Commits

Author SHA1 Message Date
George Staplin
61abf3189f XQuartz: GL: Change from xalloc to xcalloc to potentially avoid
uninitialized data in the __GLXAquaContext.
(cherry picked from commit d3120241f9)
2009-02-21 23:35:26 -08:00
George Staplin
5587f9b771 XQuartz: GL: Fix a bug with an uninitialized GLX data structure.
This was causing a crash randomly, due to random memory contents.
Use xcalloc to prevent this in the future, due to future changes or mistakes.

Set the drawableType to include GLX_PIXMAP_BIT and GLX_PBUFFER_BIT.
The new libGL supports these.

Set the max Pbuffer width/height, based on the results of a test program.
We may someday want to revisit this depending on what users need, so that
we create a CGLContextObj, make it current, and call glGetIntegerv to
gather the information at runtime.
(cherry picked from commit c7e3383309)
2009-02-21 23:35:22 -08:00
Jeremy Huddleston
67faf41b3f XQuartz: Don't need GlxSetVisualConfig any more
Fixes build failure resulting from 516f8e2cad
(cherry picked from commit 066b17028a)
2009-02-17 23:27:08 -08:00
Jeremy Huddleston
f5c7f8a3ab XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard
(cherry picked from commit 8620579483)
2009-02-02 12:36:01 -08:00
Jeremy Huddleston
e2b4d3d4a1 XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT
(cherry picked from commit e01662cadc)
2009-02-01 15:13:40 -08:00
George Staplin
b137a0cdb1 XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.
(cherry picked from commit 143224405b)
2009-01-26 10:28:03 -08:00
George Staplin
c5d52d4c37 XQuartz: GL: Make indirect.c build and work in the 1.6 branch.
Reorder some header files and provide some types earlier on.

Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't
used in 1.4 or 1.5, and seems to have been removed from 1.6.  Remove
the data structures associated with that too.

Remove __glXAquaDrawableResize.  The GLX structure doesn't use
it anymore, and the Apple version did nothing useful before.

__glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc
member.  Now provide the the Apple/Aqua context in the __GLXAquaDrawable
struct.  Add the context member to the __GLXAquaDrawable struct.

Remove the fallback configs.  They aren't used in 1.4 or 1.5 either.

Remove init_visuals().  It's not used in 1.4 or 1.5 either.

In the drawable constructor initialize the state properly, including
the new context member.

Remove glAquaResetExtension() -- it's not used anymore.

This has been tested remotely and proven to work with glxgears,
fire, various texture programs I wrote, and various Mesa demos.
(cherry picked from commit d514152195)
2009-01-15 21:04:54 -08:00
George Staplin
0d8184de59 XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT.
(cherry picked from commit 3c14546f58)
2009-01-10 01:00:24 -08:00
George Staplin
9c3975d63e XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch.
Use a __GLXconfig linked list struct to store the configurations for the
fbconfigs and visuals in a pGlxScreen.

Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used
anymore.  There is more code we can remove later, but I want to do that in
separate commits.
(cherry picked from commit 94162b0f8a)
2009-01-10 01:00:09 -08:00
George Staplin
01eaebdc98 XQuartz: GL: Make various changes to makeFormat, so that it works better. Now glxgears looks normal with the old libGL.
Add various GLX extensions to the list of supported extensions.

Reformat the oddly formatted code in some areas.

Use xalloc and xfree instead of malloc and free.
(cherry picked from commit 755f53eb40)
2008-11-28 13:18:27 -08:00
George Staplin
6eb33bc0cb XQuartz: GL: Remove the inclusion of glcontextmodes.h.
Add some commentary about future directions needed for the GLX drawable
creation and destruction code.

Match xalloc with xfree.

I made some minor formatting improvements.
(cherry picked from commit b772d64fce)
2008-11-22 11:13:51 -08:00
George Staplin
429b4b20d5 XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access.
In attach() check for pDraw being NULL, and also print an ErrorF message,
because we eventually want to track down why this is occuring.

It's unclear how this occurs, but as I noted in the 1.4 branch, I believe that
the DrawablePtr/struct _Drawable -> id is the member being accessed that causes
KERN_PROTECTION_FAILURE at 0x0000000000000004

This passes my tests using: env LIBGL_ALWAYS_INDIRECT=1 ./sometest.

I fixed a warning: caused by initializing the screen->base.visuals with the
configs.  It is a ** not a *.  It seems that some other part of GLX will
initialize this for us.
(cherry picked from commit 17f6a261fc)
2008-11-22 11:13:46 -08:00
Jeremy Huddleston
76fcfc4801 XQuartz: GLX: sync up indirect.c to match George's updates in the xorg-server-1.5-apple branch 2008-11-21 20:25:55 -08:00
George Peter Staplin
34bb06b292 XQuartz: GL: Work around problems with really deep visuals.
GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel,
because they introduce drawing problems.

GL/indirect.c: Comment out some visual setup code that shouldn't be running, and
actually seemed to cause some problems.  The current visualConfigs.c code seems
to do a reasonable job of setting up visuals for XQuartz.

GL/visualConfigs.c: Make use of the proper visual .class.   Eliminate depth 0.
It seems we really just want 24 for now, and 0 I think was a flaw in the original
code.
(cherry picked from commit 1e5f63f15e)
2008-11-05 19:23:41 -08:00
Jeremy Huddleston
c5086badf0 XQuartz: LP64 related casting fixes from Bob Murphy
(cherry picked from commit ea71710aaa)
2008-10-31 19:03:38 -07:00
George Peter Staplin
21ea9d82aa XQuartz: GL: Add feature detection of color sizes, and accum sizes.
This gives us a *lot* more visuals, and they should be more accurate.
Some of the visuals may have been wrong before.  This may enable more
OpenGL programs to behave correctly.

I also suspect libGL needs a little work to handle some of these correctly.
(cherry picked from commit 98a084ce9c)
2008-10-28 22:00:29 -07:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Jeremy Huddleston
fc35c7a2e2 XQuartz: GLX - enable_stereo defaults option should work now
(cherry picked from commit 3a6898f487)
2008-10-04 21:16:54 -07:00
Kristian Høgsberg
77ff8fd507 Drop glcore GLX provider.
Obsoleted by the DRI swrast driver.
2008-05-21 12:15:18 -04:00
Jeremy Huddleston
d09c520b32 Moved Apple GL bits into our DDX subtree
(cherry picked from commit c9356f3289)
2008-04-23 10:22:34 -07:00