summaryrefslogtreecommitdiffstats
path: root/src/glx
Commit message (Collapse)AuthorAgeFilesLines
* darwin: Address a build failure on Leopard and earlier OS versionsJeremy Huddleston2012-05-181-0/+10
| | | | | | | <https://trac.macports.org/ticket/34499> Regression-from: 51691f0767f6a75a1f549cd979a878a0ad12a228 Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Eliminate a possible race condition while destroying a surfaceJeremy Huddleston2012-05-161-4/+4
| | | | | Introduced by: c60ffd2840036af1ea6f2b6c6e1e9014bb8e2c34 Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Unlock our mutex before destroying itJeremy Huddleston2012-05-161-0/+3
| | | | | | http://xquartz.macosforge.org/trac/ticket/575 Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Use ASL for loggingJeremy Huddleston2012-05-035-21/+183
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Make reported errors more user-friendlyJeremy Huddleston2012-05-031-9/+10
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Fix an error messageJeremy Huddleston2012-05-031-1/+1
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Eliminate a pthread mutex leakJeremy Huddleston2012-04-241-0/+7
| | | | | Signed-off-by: Jeremy Huddleston <[email protected]> Tested-by: Charles Davis <[email protected]>
* apple: Fix a use after freeJonas Maebe2012-04-231-2/+4
| | | | Reviewed-by: Jeremy Huddleston <[email protected]>
* glx: Hook up the unit tests again using the internal gtest.Eric Anholt2012-04-122-3/+9
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glx: fix compile warningsYuanhan Liu2012-04-091-0/+2
| | | | | | | | Fix 'set but not used' warnings; gl_version, gl_versions_profiles and glx_extensions variables are used just only HAVE_XCB_GLX_CREATE_CONTEXT is defined. Thus those warnings are shown when that macro isn't defined. Signed-off-by: Yuanhan Liu <[email protected]>
* Use -no-undefined libtool flag in src/glx/Makefile.amJon TURNEY2012-03-281-1/+1
| | | | | | | | "Use -no-undefined to assure libtool that the library has no unresolved symbols at link time, so that libtool will build a shared library on platforms that require that all symbols are resolved when the library is linked." Signed-off-by: Jon TURNEY <[email protected]>
* glx:dri_common.c: check psc->driScreen->createDrawable return valueWang YanQing2012-03-281-0/+6
| | | | | | | | | | createDrawable may return NULL value, we should check it, or it will make a segment failed. [minor-indent-issue-fixed-by: Yuanhan Liu] Signed-off-by: Wang YanQing <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* glx/drisw: avoid segfaults when we fail to get visualDave Airlie2012-03-241-2/+9
| | | | | | | | piglit glx-tfp segfaults on llvmpipe when run vs a 16-bit radeon screen, it now fails instead of segfaulting, much prettier. Signed-off-by: Dave Airlie <[email protected]>
* glx: Fix glXGetProcAddress() of global glX symbols post-automake conversion.Eric Anholt2012-03-211-0/+1
| | | | | | | | | | | | | | | | | When a GL LD_PRELOAD library like apitrace was used, glXGetProcAddress() would return the preload's symbols instead of libGL's symbol, leading to infinite recursion when the returned function was called. This didn't hit apitrace on most apps because who calls glXGetProcAddress() on the global functions. The -Bsymbolic, which was present in mklib before automake conversion, causes the glxcmds.c:GLX_functions table to be resolved at link time, so that LD_PRELOADs don't affect it any more. Fixes crashes when running wine under apitrace. Tested-by: Matt Turner <[email protected]> Tested-by: Marek Olšák <[email protected]>
* Add Makefile.in to toplevel .gitignoreKenneth Graunke2012-03-201-1/+0
| | | | | | | To avoid redundancies, this patch also removes Makefile.in from the other .gitignore files. Acked-by: Eric Anholt <[email protected]>
* Add .deps/, .libs/, and *.la to toplevel .gitignorePaul Berry2012-03-201-3/+0
| | | | | | | To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <[email protected]>
* shared-glapi: Convert to automakeKristian Høgsberg2012-03-191-1/+1
| | | | | | | | | | This fixes a build problem where EGL links to libgbm.la, which encodes a relative path to it's libglapi.so dependency. The relative path breaks when the linker tries to resolve it from src/egl/main instead of src/gbm. Typically we silently fall back to the system libglapi.so, which is wrong and breaks when there isn't one. Morale of the story: don't mix mklib and libtool.
* darwin: Build create_context.cJeremy Huddleston2012-03-162-1/+7
| | | | | | Fixes a build regression from: 588042a8ec4ea91a952c07a0768516fd590758f4 Signed-off-by: Jeremy Huddleston <[email protected]>
* Set close on exec flag FD_CLOEXECDavid Fries2012-03-111-1/+9
| | | | | | | | | Set the close on exec flag when opening dri character devices, so they will be closed and free any resouces allocated in exec. Signed-off-by: David Fries <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glx: Also put a symlink from libGL.so in lib/ for now.Johannes Obermayr2012-03-071-0/+1
| | | | | | | | | This fixes the libGLU.so.* build when a system libGL.so is not present since it is relying on the lib/ to build against until it gets converted to automake. Tested-by: Stéphane Marchesin <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* glx: Convert to automake.Eric Anholt2012-02-293-119/+127
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Emit a critical error if the swrast driver fails to load.Carl Worth2012-02-081-2/+4
| | | | | | | | | | | | | | | | Something has gone wrong if swrast is requested but cannot be loaded. The user really should be made aware of this, (and instructed to set LIBGL_DEBUG for more details). The wording of this error message is updated from "reverting to indirect rendering" to the more objectively descriptive "failed to load driver: swrast". The former wording makes assumptions about what the calling code will decide to do next, rather than simply describing what went wrong within the current function. The new wording is consistent with the critical errors recently added for hardware drivers that fail to load. Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Emit a critical error if a named driver fails to load.Carl Worth2012-02-082-0/+4
| | | | | | | | | Something has gone wrong if we were asked to load a driver of a specific name, but it failed to load for some reason. The user really should be made aware of this, (and instructed to set LIBGL_DEBUG for more details). Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Add a CriticalErrorMessageF macro.Carl Worth2012-02-082-0/+26
| | | | | | | | | | | | | Sometimes an error is so sever that we want to print it even when the user hasn't specifically requested debugging by setting LIBGL_DEBUG. Add a CriticalErrorMessageF macro to be used for this case. (The error message can still be slienced with the existing LIBGL_DEBUG=quiet). For critical error messages we also direct the user to set the LIBGL_DEBUG environment variable for more details. Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Clarify comments on InfoMessageF and ErrorMessageF macros.Carl Worth2012-02-081-1/+6
| | | | | | | | | | | The description of ErrorMessageF was misleading in the case of LIBGL_DEBUG being unset, (the previous comment could be understood to mean the error should be printed, but the code does not print in this case). InfoMessageF previously had no comment at all. Reviewed-by: Eugeni Dodonov <[email protected]>
* Have __glImageSize handle format GL_DEPTH_STENCIL_NV the same way as the ↵Jon TURNEY2012-02-061-0/+1
| | | | | | | | | | | server does There is a mismatch between the way the X server and GLX library calculates the image size for format GL_DEPTH_STENCIL(|_NV|_EXT) See https://bugs.freedesktop.org/show_bug.cgi?id=30102 Signed-off-by: Jon TURNEY <[email protected]>
* Revert "Always build shared glapi"Matt Turner2012-01-245-0/+15
| | | | | | | | | | | This reverts commit adefee50d954151f76150af80207081ae3c247d9. Shared glapi was never tested with --enable-xlib-glx and turns out to cause a lot of problems. Conflicts: configure.ac
* Always build shared glapiMatt Turner2012-01-205-15/+0
| | | | | | | | libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all come from the same version of Mesa or bad things may happen. Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* scons: Fix libGL.so build.Roland Scheidegger2012-01-131-0/+1
|
* glx/dri: Initialize api even if num_attribs == 0.Kenneth Graunke2012-01-111-1/+3
| | | | | | | | | | | | Both dri2_create_context_attribs and drisw_create_context_attribs call dri2_convert_glx_attribs, expecting it to fill in *api on success. However, when num_attribs == 0, it was returning true without setting *api, causing the caller to use an uninitialized value. Tested-by: Vadim Girlin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glx: Suppress unused variable warning for cmdlenPaul Berry2012-01-111-1/+1
| | | | | | | | | | | | No functional change. In the function __indirect_glAreTexturesResident(), the variable cmdlen is only used if USE_XCB is not defined. This patch avoids a compile warning in the event that USE_XCB is defined. v2: just move cmdlen declaration inside the #else part. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* scons: Fix libGL.so build.José Fonseca2012-01-101-0/+3
|
* glx/dri2: print FPS when env var LIBGL_SHOW_FPS is 1 (v2)Marek Olšák2012-01-051-1/+34
| | | | | | | | | This is useful for apps which don't print FPS. Only enabled in SwapBuffers. v2: track state per drawable, use libGL prefix Reviewed-by: Michel Dänzer <[email protected]>
* glx: More hacking around versions of XCB that lack GLX_ARB_create_context ↵Ian Romanick2012-01-043-4/+7
| | | | | | | | | | | | | | | | support Detect whether a new enough version of XCB is installed at configure time. If it is not, don't enable the extension and don't build the unit tests. v2: Move the AM_CONDIATION outside the case-statement so that it is invoked even for non-GLX builds. This prevents build failures with osmesa, for example. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Robert Hooker <[email protected]>
* drisw: Fix drawable creation against non-default screensAdam Jackson2012-01-041-2/+1
| | | | | | | | | | | | We don't want to match the visual against the default screen. If the drawable is on a non-default screen then the appropriate visual might not exist on the default screen. Conversely, if the same visual is available on multiple screens then simply selecting for the right VID is sufficient, since the server has promised that the same visual is compatible with multiple screens. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx: Hack around versions of XCB that lack GLX_ARB_create_context supportIan Romanick2012-01-032-0/+23
| | | | | | | | | A lot of tests in 'make check' will fail under these circumstances, but at least the build should work. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tests/glx: Add unit tests for GLX_ARB_create_context GLX protocolIan Romanick2012-01-021-1/+4
| | | | | | | | | | This adds a new tests directory at the top-level and some extra build infrastructure. The tests use the Google C++ Testing Framework, and they will only be built if configure can detect its availability. The tests are automatically wired-in to run with 'make check'. Signed-off-by: Ian Romanick <[email protected]> Acked-by: Chad Versace <[email protected]>
* glx: Don't use 'new' as a function parameter nameIan Romanick2012-01-021-1/+1
| | | | | | | | Using 'new' as a function parameter name prevents including glxclient.h the unit tests (future patch) that use the Google C++ Testing Framework. Signed-off-by: Ian Romanick <[email protected]>
* glx: Enable GLX_EXT_create_context_es2_profileIan Romanick2012-01-025-0/+39
| | | | | | | | | | | | This extension is only enabled if the underlying driver advertises support for OpenGL ES 2.0. This happens either through the getAPIMask function in version 2 of the DRI2 extension or implicity through version 2 of the DRISW extension. Since there is no OpenGL ES 2.0 protocol, this extension is marked as only available with direct-rendering. Signed-off-by: Ian Romanick <[email protected]>
* glx/dri2: Implement glx_screen_vtable::create_context_attribs for DRISW contextsIan Romanick2012-01-021-1/+88
| | | | | | | | This also enables GLX_ARB_create_context and GLX_ARB_create_context_profile if the driver supports DRI_DRISW version 3 or greater. Signed-off-by: Ian Romanick <[email protected]>
* glx/dri: Add utility function dri2_convert_glx_attribsIan Romanick2012-01-022-0/+108
| | | | | | | This converts all of the GLX data from glXCreateContextAttribsARB to the values expected by the DRI driver interfaces. Signed-off-by: Ian Romanick <[email protected]>
* glx: Add extension strings for GLX_ARB_create_context and ↵Ian Romanick2012-01-022-1/+5
| | | | | | | | | GLX_ARB_create_context_profile Note that these extensions are not automatically enabled for screens capable of direct-rendering. Signed-off-by: Ian Romanick <[email protected]>
* glx: Connect glXCreateContextAttribsARB to glXGetProcAddressIan Romanick2012-01-021-0/+3
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glx: Initial implementation of glXCreateContextAttribsARBIan Romanick2012-01-024-1/+121
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glx/dri2: Implement glx_screen_vtable::create_context_attribs for DRI2 contextsIan Romanick2012-01-021-1/+91
| | | | | | | | This also enables GLX_ARB_create_context and GLX_ARB_create_context_profile if the driver supports DRI_DRI2 version 3 or greater. Signed-off-by: Ian Romanick <[email protected]>
* glx: Implement glx_screen_vtable::create_context_attribs for indirect contextsIan Romanick2012-01-021-1/+23
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glx: Add glx_screen_vtable::create_context_attribsIan Romanick2012-01-024-3/+14
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glx: Use __glX_send_client_info with XCBIan Romanick2012-01-021-0/+4
| | | | | | | __glX_send_client_info only supports XCB, so use that instead of __glXClientInfo when USE_XCB is defined. Signed-off-by: Ian Romanick <[email protected]>
* glx: Add __glX_send_client_info super functionIan Romanick2012-01-023-0/+160
| | | | | | | | This function picks the correct client-info protocol (based on the server's GLX version and set of extensions) and sends it to the server. Signed-off-by: Ian Romanick <[email protected]>
* glx: Propagate the glXIsDirect protocol error back to the applicationIan Romanick2011-12-231-3/+26
| | | | | | | | | | | | If the server returned BadContext, the error would just get droped on the floor. Fixes the piglit test glx-import-context-single-process NOTE: This is a candidate for the 7.11 branch, but it also requires the previous patch. Signed-off-by: Ian Romanick <[email protected]>