summaryrefslogtreecommitdiff
path: root/hw/xquartz/GL
AgeCommit message (Collapse)AuthorFilesLines
2010-07-28XQuartz: GLX: Don't mangle __GLXDrawable's pDrawJeremy Huddleston1-3/+2
We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in __GLXAquaDrawable. (we should refactor to eliminate this redundancy later) This was causing http://xquartz.macosforge.org/trac/ticket/426 This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 The root cause of this change was fed7ccc481ad1caaa518cafe944c2327a5d0b6c65 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-06-11xquartz: Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-6/+6
ditto for XQuartz Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov3-13/+13
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-11XQuartz GL: Fix __glXAquaScreenCreateDrawable prototypeJeremy Huddleston1-4/+6
Fixes regression introduced in 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-02XQuartz GLX: Change around includes for better compatability with different ↵Jeremy Huddleston2-1/+4
OS versions Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-15XQuartz GLX: Don't let garbage enter our pixel requestJeremy Huddleston1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=27654 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-29darwin: Generate crash reports on FatalError()Jeremy Huddleston1-2/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com>
2010-03-21XQuartz: GLX: Fix Availability for Tiger ppc workaroundJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-03-15Merge remote branch 'jeremyhu/master'Keith Packard2-1/+5
2010-03-15XQuartz: remove undefined XSERVER_CFLAGS variableGaetan Nadon1-1/+1
This is a variable local to configure.ac which is not AC_SUBST() It is undefined in any generated Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-11XQuartz: Include os.h for OsAbort()Jeremy Huddleston1-0/+4
Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11XQuartz: GLX: Fix prototype for swapBuffersJeremy Huddleston1-1/+1
This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-17os: Prevent core dump from being truncated.Rami Ylimaki1-1/+1
The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-15XQuartz: clang static analysis fixesJeremy Huddleston2-3/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2009-09-27XQuartz: Fix a bunch of compilation warnings about styleJeremy Huddleston1-1/+1
(cherry picked from commit 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8)
2009-09-23XQuartz: GLX capabilities: Allow 16bit accumulation buffersJeremy Huddleston1-6/+8
http://xquartz.macosforge.org/trac/ticket/308 (cherry picked from commit e9e63a2118b76b6c31c4081fec08a99e4d796e22)
2009-08-31XQuartz: GLX: Drawable does not contain resize anymore.Jeremy Huddleston1-8/+0
(cherry picked from commit 1e642f22fbf029bb3917091cb5fa2f78b4a92f62)
2009-08-31XQuartz: GL: Unset GL_EXT_gpu_program_parameters for Tiger/ppcJeremy Huddleston1-0/+8
See http://trac.macports.org/ticket/20638 (cherry picked from commit 0f3a89d306838b3c75a73cd1e9e2928737222b70)
2009-08-31XQuartz: GL: Explicitly set GL_EXT symbols to 0 if they are not in ↵Jeremy Huddleston1-0/+73
OpenGL.framework to prevent X11's glext.h from setting them to 1. (cherry picked from commit 7fe37137d826d1b698e87a5b35050dd02f0a4d4b)
2009-08-05XQuartz: AIGLX: Provide empty __glXAquaDrawableResize to avoid crashing in ↵Jeremy Huddleston1-0/+7
DoMakeCurrent (cherry picked from commit 60a1d2c2764f2f02c0751940a264588717afce79)
2009-07-31XQuartz: Unify how we set our bitmasks for visualsJeremy Huddleston1-19/+11
(cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9)
2009-07-31XQuartz: Cleanup the bitmask setting for GLX visuals.Jeremy Huddleston1-20/+18
(cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b)
2009-07-26XQuartz: Overhaul setting up visualsJeremy Huddleston3-383/+212
The main change is cleanup of the visualConfigs and setting up alpha correctly there to match the visuals being added earlier (so the default visual has a corresponding GLX visual) (cherry picked from commit 7351db5c8746be30a4047469ee9b50bc19e62a89)
2009-07-16XQuartz: Cleanup getGlCapabilities to avoid hardcoding the number of displaysJeremy Huddleston1-39/+18
(cherry picked from commit 12f7365f1f58d648217b16f09c2152fa47dcd7a1)
2009-07-16XQuartz: Allow more than 3 OSX displaysJeremy Huddleston1-1/+1
(cherry picked from commit 45045eb3968069a8d74ce9188890a5537dc60fec)
2009-06-06XQuartz: AIGLX dispatch table cleanupJeremy Huddleston1-746/+946
This should fix some issues when building on different versions of OSX. We only use extensions that OpenGL.framework's glext.h header tells us are supported. (cherry picked from commit e10c53421f1e780573c8adcd8ea89d6ffa28a819)
2009-02-21XQuartz: GL: Change from xalloc to xcalloc to potentially avoidGeorge Staplin1-1/+1
uninitialized data in the __GLXAquaContext. (cherry picked from commit d3120241f9f48d21f9a6ecfb848434a4a0270855)
2009-02-21XQuartz: GL: Fix a bug with an uninitialized GLX data structure.George Staplin1-11/+30
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 c7e338330943e0d03a99328c740540d03f018d20)
2009-02-17XQuartz: Don't need GlxSetVisualConfig any moreJeremy Huddleston1-2/+0
Fixes build failure resulting from 516f8e2cad1311a09764e2633644188d1e3c31bb (cherry picked from commit 066b17028a35956a089815716e38571f305469c5)
2009-02-02XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on LeopardJeremy Huddleston1-1/+1
(cherry picked from commit 8620579483789ae9ac1b68dbefe32b70011386de)
2009-02-01XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXTJeremy Huddleston1-0/+2
(cherry picked from commit e01662cadcaa4052e3a5aa82cbaed00a2d0220e0)
2009-01-26XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.George Staplin1-0/+19
(cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b)
2009-01-18Kill off --with-mesa-source completelyDan Nicholson1-2/+0
There were a few spots left in the source that were using the --with-mesa-source defined headers or the now removed $(top_srcdir)/GL directory. These aren't needed anymore as all the necessary source for GLX is in $(top_srcdir)/glx. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-01-15XQuartz: GL: Make indirect.c build and work in the 1.6 branch.George Staplin1-588/+84
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 d514152195452ae11ec7769c76489651620ad380)
2009-01-10XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT.George Staplin1-1/+1
(cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a)
2009-01-10XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch.George Staplin1-261/+190
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 94162b0f8a25267aca280d25e216cc6bde47da6e)
2008-11-28XQuartz: GL: Make various changes to makeFormat, so that it works better. ↵George Staplin1-99/+54
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 755f53eb40c4329d8c82a31cb910c31fdd4ea12e)
2008-11-22XQuartz: GL: Remove the inclusion of glcontextmodes.h.George Staplin1-7/+28
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 b772d64fce31d16b498c621096e39d5203994d6e)
2008-11-22XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access.George Staplin1-22/+35
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 17f6a261fca6d5856069dce28bb4838261afc6bc)
2008-11-21XQuartz: GLX: sync up indirect.c to match George's updates in the ↵Jeremy Huddleston1-66/+237
xorg-server-1.5-apple branch
2008-11-21XQuartz: GL: remove glcontextmodes.* from the Makefile.am. It has been ↵George Staplin1-2/+0
replaced. The new replacement is __GLXconfig. (cherry picked from commit 3bed9b65c807a1aeb662b8042826cbb54280181d)
2008-11-14XQuartz: Actually add glcontextmodes.[hc]Jeremy Huddleston2-0/+604
(cherry picked from commit 763195d338345e3637d112279bdbe002b6e7791a)
2008-11-14XQuartz: Initial work on readding GLX to the 1.5 serverJeremy Huddleston1-0/+2
(cherry picked from commit a186cab6ae82340770c13b37ff5df731ce2a0ceb)
2008-11-13XQuartz: GL: Handle the alpha differently when the alpha is equal to ↵George Staplin1-6/+24
GLCAPS_COLOR_BUF_INVALID_VALUE. This prevents visuals with odd sizes. The machine I use didn't have this problem, but it shows up on some others. (cherry picked from commit ed181382ddeb77019577d39b9c06b1cd839e18e4)
2008-11-05XQuartz: GL: Add capability detection for depth buffers, and multisampling.George Peter Staplin3-75/+179
GL/capabilities.c: Add handleDepthModes(), and extend handleRendererDescription() for the various depth and multisampling flags. Add initialization of the new config options to initConfig(). GL/capabilities.h: Add depth and multisample config members. GL/visualConfigs.c: Add depth and multisampling support to the visual config setup. (cherry picked from commit f527381eea6a8ae6cd791475b2060d21fcf8efb2)
2008-11-05XQuartz: GL: Work around problems with really deep visuals.George Peter Staplin3-72/+95
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 1e5f63f15e13a40a6e69a1505934d10d6990b6a2)
2008-10-31XQuartz: LP64 related casting fixes from Bob MurphyJeremy Huddleston1-7/+7
(cherry picked from commit ea71710aaa7166ab510abe70f2dc47942de0ead7)
2008-10-31XQuartz: GL: Mark visuals that are slower than others, due to lack of ↵George Peter Staplin1-1/+7
acceleration. This is used in libGL to determine a preferred visual. glxinfo -v will also report "visualCaveat=Slow" for such visuals. (cherry picked from commit d5c17f585a240be9f9135975738e62951cde3353)
2008-10-28XQuartz: GL: Fix several error handling mistakes in ↵George Peter Staplin1-3/+3
handleRenderDescriptions, that were leftover before the final code evolved. (cherry picked from commit fe35a3639081dc78ac6cc4123cde37770f6a39fd)
2008-10-28XQuartz: GL: Add feature detection of color sizes, and accum sizes.George Peter Staplin4-103/+530
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 98a084ce9c455260ecdb5f8eecb67f33dbb53b69)