summaryrefslogtreecommitdiffstats
path: root/src/glx
Commit message (Collapse)AuthorAgeFilesLines
* glx/dri2: add dri2 prime support.Dave Airlie2012-08-161-0/+13
| | | | | | | | | | This adds support for having libGL pick a different driver for prime support. DRI_PRIME env var is set to the value retrieved from the server randr provider calls, by the calling process. (generally DRI_PRIME=1 will be the right answer). Signed-off-by: Dave Airlie <[email protected]>
* build/glx: fix include paths for out-of-tree buildsChristopher James Halse Rogers2012-08-131-0/+2
| | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]>
* build: fix location of generated files in src/mesa (v4)Christopher James Halse Rogers2012-08-131-0/+4
| | | | | | | | | | | | | | | Also fix include paths for the generated headers. v2: Switch to using self-explanatory BUILDDIR/SRCDIR defined from top_builddir/top_srcdir rather than the ambiguous TOP. v3: Add both top_builddir and top_srcdir to include flags for mesa asm. These rely on both in-tree and build-time-generated includes. v4: Rebased on top of 948c8f502a. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* glx/dri: Initialize reset to __DRI_CTX_RESET_NO_NOTIFICATION.Kenneth Graunke2012-08-082-2/+2
| | | | | | | | | | | | | | | | | | | | If the application has requested reset notification, then dri2_convert_glx_attribs will initialize this to the correct value. Otherwise, it's supposed to initialize this to NO_NOTIFICATION, but doesn't when num_attribs == 0. (The consensus seems to be that we should make it do so, but that's more invasive, so I'm pushing this for now.) Fixes a regression since a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473 where trying to run OilRush_x86 or apitrace heaven_x64 would result in: dri_util.c:221: dri2CreateContextAttribs: Assertion `!"Should not get here."' failed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53076 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glx: Don't use glapitable.h at allIan Romanick2012-08-083-6/+10
| | | | | | | | | | | | When --enable-shared-glapi is used, all non-ABI entries in the table are lies. Avoiding the use of glapitable.h avoids the lies. The only entries used in this code are entries that are ABI. For these, the ABI offset can be used directly. Since this code is in src/glx, it can't use src/mesa/main/dispatch.h to get the pretty names for these offsets. Signed-off-by: Ian Romanick <[email protected]>
* glx: Don't rely on struct _glapi_tableIan Romanick2012-08-082-666/+654
| | | | | | | | | | | | | | | | | | | When --enable-shared-glapi is used, all non-ABI entries in the table are lies. There are two completely separate code generation paths used to assign dispatch offset. Neither has any clue about the other. Unsurprisingly, the can't agree on what offsets to assign. This adds a bunch of overhead to __glXNewIndirectAPI, but this function is called at most once. The test ExtensionNopDispatch was removed. There was just no way to make this test work with the information provided in shared-glapi. Since indirect_glx.c uses _glapi_get_proc_offset now, it was also impossible to make the tests work without shared-glapi. So much pain. This fixes indirect rendering with shared-glapi. Signed-off-by: Ian Romanick <[email protected]>
* automake: Honor GL_LIB for mangled/custom lib namesBrad King2012-07-231-20/+7
| | | | | | | | | | | | | | | | Commit 2d4b77c7 (automake: Convert src/mesa/drivers/x11/Makefile to automake, 2012-06-12) dropped the old Makefile, which used GL_LIB, and replaced it with a Makefile.am hard-coding the name "GL". This broke handling of --enable-mangling and --with-gl-lib-name options which depend on GL_LIB to specify the GL library name. Use "@GL_LIB@" in src/mesa/drivers/x11/Makefile.am to configure the library name. Also use this approach to simplify src/glx/Makefile.am and drop the HAVE_MANGLED_GL conditional. While at it, fix the compatibility link we create in "lib" for the software-only driver to use version GL_MAJOR instead of hard-coding "1". Reviewed-by: Dan Nicholson <[email protected]>
* glx: build tests after libglx.laMatt Turner2012-07-171-1/+1
| | | | | | | Previously, if you ran make followed by make check it would work, but if you just ran make check the test program would fail to compile. Reviewed-by: Jon TURNEY <[email protected]>
* automake: convert libglapiJon TURNEY2012-07-131-1/+1
| | | | | | | | | | | | | | | | | | | * "configure substitutions are not allowed in _SOURCES variables" in automake, so remove the AC_SUBST'ed GLAPI_ASM_SOURCES and instead use some AM_CONDITIONALS to choose which asm sources are used * Change GLAPI_LIB to point to the .la file in other Makefile.am files, and make a link to the .a file for the convenience of other Makefiles which have not yet been converted to automake v2: - Use AM_CPPFLAGS for cleaner build output - EXTRA_SOURCES is not needed - Remove libglapi.a compatibility link on clean Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* scons: Also require recent XCB.José Fonseca2012-07-121-0/+3
| | | | And don't trip when it's not found -- simply skip building src/glx.
* mesa: Require current libxcb.Eric Anholt2012-07-124-33/+1
| | | | | | | | | | Without that, people with buggy apps that looked at just the server string for GLX_ARB_create_context would call this function that just threw an error when you tried to make a context. Google shows plenty of complaints about this. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri2: Add support for GLX_ARB_create_context_robustnessIan Romanick2012-07-116-6/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the infrastructure required for this extension. There is no xserver support and no driver support yet. Drivers can enable this be advertising DRI2 version 4 and accepting the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag and the __DRI_CTX_ATTRIB_RESET_STRATEGY attribute in create context. Some additional Mesa infrastructure is needed before drivers can do this. The GL_ARB_robustness spec, which all Mesa drivers already advertise, requires: "If the behavior is LOSE_CONTEXT_ON_RESET_ARB, a graphics reset will result in the loss of all context state, requiring the recreation of all associated objects." It is necessary to land this infrastructure now so that the related infrastructure can land in the xserver. The xserver has very long release schedules, and the remaining Mesa parts should land long, long before the next xserver merge window opens. v2: Expose robustness as a DRI2 extension rather than bumping __DRI_DRI2_VERSION. v3: Add a comment explaining why dri2->base.version >= 3 is also required for GLX_ARB_create_context_robustness. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx/tests: Fix off-by-one error in allocating extension string bufferIan Romanick2012-07-031-1/+1
| | | | | | | | | | | NOTE: This is a candidate for the 8.0 release branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: Markus Oehme <[email protected]>
* glx/tests: Fix signed/unsigned comparison warnings.Paul Berry2012-06-202-27/+27
|
* glx/tests and mesa/tests: Update .gitignore files.Paul Berry2012-06-141-1/+1
| | | | | | | | | This patch updates .gitignore files to account for the new build artifacts introduced by the following commits: ae376f0 glx/tests: Rename test as glx-test 8fecdcc mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions a29ad2b mesa/tests: Add tests for the generated dispatch table
* glx/tests: Add unit tests for generated code in indirect_init.cIan Romanick2012-06-132-1/+1536
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx/tests: Add unit tests for generated code in indirect_size.cIan Romanick2012-06-132-0/+557
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx/tests: Rename test as glx-testIan Romanick2012-06-131-4/+4
| | | | | | | This matches the existing test in src/glsl/tests. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Move tests from tests/glx to src/glx/testsIan Romanick2012-06-138-0/+1499
| | | | | | | This matches the organization of other unit tests in Mesa. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Handle a null reply in QueryVersion.Stéphane Marchesin2012-06-121-0/+3
| | | | | | | | Works around crashes when X connections break. Reviewed-by: Ian Romanick <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* automake: Globally add stub automake targets to the old Makefiles.Eric Anholt2012-06-111-1/+1
| | | | | | | | | I tried to update all the old Makefiles that included the default config to be sure they had a default target if they didn't previously have one, since this new all target will always point at it. Almost everything had one. Reviewed-by: Kenneth Graunke <[email protected]>
* scons: add code to generate the various GL API filesBrian Paul2012-05-311-0/+51
| | | | | | | This fixes recent build breakage when we began building the generated API files from xml as part of the normal build process. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=50475
* mesa: Remove the generated glapi from source control, and just build it.Eric Anholt2012-05-296-12714/+6
| | | | | | | | | | | Mesa already always depends on python to build. The checked in changes are not reviewed (because any trivial change rewrites the world). We also have been pushing commits between xml change and regen where at-build-time xml-generated code disagrees with committed xml-generated code. And worst of all, sometimes we ("I") check in *stale* xml-generated code. Acked-by: Ian Romanick <[email protected]>
* 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