summaryrefslogtreecommitdiffstats
path: root/src/glx
Commit message (Collapse)AuthorAgeFilesLines
* glx: Add GLXBadProfileARB to the error string listAdam Jackson2012-10-171-0/+1
| | | | | | | Note: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx: Fix listing of INTEL_swap_event in glXQueryExtensionsString()Owen W. Taylor2012-10-171-1/+1
| | | | | | | | | | | Due to a string mismatch, INTEL_swap_event wasn't listed among GLX extensions for the connection, even when present on both client and server. That is, glXQueryServerString and glXGetClientString reported the extension, but glXQueryExtensionsString did not. Note: This is a candidate for the stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56057 Reviewed-by: Chad Versace <[email protected]>
* glx: Fix a regression in the new XCB codeFredrik Höglund2012-10-161-3/+15
| | | | | | | | | | | dri2DrawableGetMSC(), dri2WaitForMSC() and dri2WaitForSBC() were inadvertently changed to return 0 on success. This resulted in the callers returning an error to the client. Restore the previous behavior and also check that the reply pointers are valid before accessing them. Reviewed-by: Eric Anholt <[email protected]>
* glx: Replace DRI2SwapBuffers() custom protocol with XCB.Eric Anholt2012-10-093-52/+31
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx: Fix some indentation.Eric Anholt2012-10-091-5/+5
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx: Replace DRI2SwapInterval custom protocol with XCB.Eric Anholt2012-10-093-29/+2
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx: Reuse setSwapInterval for setting initial swap interval.Eric Anholt2012-10-091-5/+2
|
* glx: Allow glXSwapInterval(0) when vblank_mode=0.Eric Anholt2012-10-091-1/+3
| | | | There's no reason to say no in this case.
* glx: Replace DRI2GetMSC custom protocol with XCB.Eric Anholt2012-10-093-52/+10
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx: Replace DRI2WaitForMSC custom protocol with XCB.Eric Anholt2012-10-093-66/+21
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx: Replace DRI2WaitForSBC custom protocol with XCB.Eric Anholt2012-10-093-54/+34
| | | | Reviewed-by: Chad Versace <[email protected]>
* glx/dri1: Remove uncompiled __DRI_SWAP_BUFFER_COUNTER code.Eric Anholt2012-10-091-61/+0
| | | | | | | It's been in place but never enabled since 2010. Note how one piece called a DRI2 function, suggesting never being tested. Reviewed-by: Chad Versace <[email protected]>
* glx: Unifdef some dri_interface.h defines.Eric Anholt2012-10-091-14/+1
| | | | | | | | | | | dri_interface.h comes from our tree, so why litter our tree with ifdefs for older versions of it? I left in the DRI_TEX_BUFFER_VERSION ifdefs, which is broken and uncompiled (the version wasn't bumped from 2 to 3 when the patch was landed), but I don't know what should be done with it. Reviewed-by: Chad Versace <[email protected]>
* glx: Unifdef USE_XCB.Eric Anholt2012-10-094-248/+0
| | | | | | | It's been required for building glx since b518dfb513742984f27577d25566f93afd86d4fc in january. Reviewed-by: Chad Versace <[email protected]>
* glx/dri2: use uint64_t instead of double to represent time for FPS calculationMarek Olšák2012-10-031-5/+6
| | | | | | | | | | | | Wine or a windows app changes fpucw to 0x7f, causing doubles to be equivalent to floats, which broke the calculation of FPS. We should be very careful about using doubles in Mesa. Henri Verbeet adds: For reference, this is done by for example d3d9 when a D3D device is created without D3DCREATE_FPU_PRESERVE set. In the general case applications can do all kinds of terrible things to the FPU control word of course.
* build: Use AX_PTHREAD's HAVE_PTHREAD preprocessor definitionMatt Turner2012-10-013-7/+7
|
* build: Use PTHREAD_LIBS and PTHREAD_CFLAGSMatt Turner2012-10-011-1/+2
|
* darwin: do not create double-buffered offscreen pixel formatsJonas Maebe2012-09-241-1/+1
| | | | | | http://xquartz.macosforge.org/trac/ticket/536 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
* glx: move 'prime' var into #ifdef'd code blockBrian Paul2012-09-061-8/+10
| | | | | | To silence unused var warning. Reviewed-by: Jose Fonseca <[email protected]>
* Replace another malloc/memset-0 combination with callocMatt Turner2012-09-051-2/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* Remove useless memset after callocMatt Turner2012-09-052-2/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* Use calloc instead of malloc/memset-0Matt Turner2012-09-055-24/+12
| | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: @@ expression E; identifier I; @@ - I = malloc(E); + I = calloc(1, E); ... - memset(I, 0, sizeof *I); Reviewed-by: Brian Paul <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-056-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-0511-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* Remove Xcalloc/Xmalloc/Xfree callsMatt Turner2012-09-0521-153/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These calls allowed Xlib to use a custom memory allocator, but Xlib has used the standard C library functions since at least its initial import into git in 2003. It seems unlikely that it will grow a custom memory allocator. The functions now just add extra overhead. Replacing them will make future Coccinelle patches simpler. This patch has been generated by the following Coccinelle semantic patch: // Remove Xcalloc/Xmalloc/Xfree calls @@ expression E1, E2; @@ - Xcalloc (E1, E2) + calloc (E1, E2) @@ expression E; @@ - Xmalloc (E) + malloc (E) @@ expression E; @@ - Xfree (E) + free (E) @@ expression E; @@ - XFree (E) + free (E) Reviewed-by: Brian Paul <[email protected]>
* Use the correct macro _WIN32 for Windows.Vinson Lee2012-09-051-1/+1
| | | | | | | | | | | | | | The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Clean glx Makefile.amMatt Turner2012-08-221-4/+1
| | | | | | mapi/glapi is already built when make is run in src/glx. Reviewed-by: Kenneth Graunke <[email protected]>
* 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]>