summaryrefslogtreecommitdiffstats
path: root/src/glx
Commit message (Collapse)AuthorAgeFilesLines
* darwin: Fix test for kCGLPFAOpenGLProfile support at runtimeJeremy Huddleston Sequoia2014-05-201-5/+9
| | | | Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
* glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414Emil Velikov2014-05-101-3/+3
| | | | | | | | | | | C++ does not support designated initializers, thus compilation is not guaranteed to succeed. Surprisingly gcc 4.6.3 fails to build the code, while version 4.9.0 compiles it without a hitch. Cc: "10.2" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78403 Signed-off-by: Emil Velikov <[email protected]> Tested-by: Vinson Lee <[email protected]>
* glx: Conditionally compile GLX_MESA_query_renderer DRI3 supportArmin K2014-05-021-0/+4
| | | | | | | Missed out with commit 625bdd64e5ea3327d4459b1ccccff8dab89129d0. Cc: "10.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri3: Enable GLX_MESA_query_renderer on DRI3 tooIan Romanick2014-05-024-2/+56
| | | | | | | | | | | | | | This should have happend around the time of commit 4680d23, but Keith's DRI3 patches and my GLX_MESA_query_renderer patches crossed in the mail. I don't have a working DRI3 setup, so I haven't been able to actually verify this. I'm hoping that someone can piglit this for me on DRI3... It's also unfortunate the DRI2 and DRI3 can't share more code. Signed-off-by: Ian Romanick <[email protected]> Cc: Keith Packard <[email protected]> Cc: "10.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx/drisw: fix memory leak when destroying screen.Roland Scheidegger2014-05-011-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* glx/drisw: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+13
| | | | | | | | ... to improve readability of code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/dri3: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+13
| | | | | | | | ... to improve readability of code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/dri2: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-13/+13
| | | | | | | | ... to improve readability of code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/dri: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-13/+13
| | | | | | | | ... to improve readability of code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/indirect: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-12/+14
| | | | | | | | ... to improve readability of code. Set indirect_screen_vtable as a static const. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/apple: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+14
| | | | | | | | ... to improve readability of code. Set applegl_screen_vtable as a static const. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx/tests: explicitly set __DRI2rendererQueryExtension membersEmil Velikov2014-04-281-4/+4
| | | | | | | While we're here use the typcast'ed name and constify. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri3: rework __DRIextension handlingEmil Velikov2014-04-282-10/+9
| | | | | | | | Use a const array with the extensions, rather than assigning each one to a fixed size array at runtime. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri2: rework __DRIextension handlingEmil Velikov2014-04-281-1/+1
| | | | | | | | | | | | Make sure that the DRI*Extensions report the version of the interface implemented over the listed in the headers. While both are currently the same, this may change in the future. v2: Keep loader extensions handling as is. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Kristian Høgsberg <[email protected]>
* dri_interface: Update __DRItexBufferExtensionRec to version 3Emil Velikov2014-04-283-13/+8
| | | | | | | | | | | | | | | | | | | | With commit e59fa4c46c8("dri2: release texture image.") we updated the extension without bumping the version number. The patch itself added an interface required to enable texture_from_pixmap on certain platforms. The new code was effectively never build, as it depended on __DRI_TEX_BUFFER_VERSION >= 3, which never came to be in upstream mesa. This commit bumps the version number, drops the __DRI_TEX_BUFFER_VERSION checks and resolves all the build conflicts. Additionally it add a version check as egl and dri3, as require version 2 of the extension which does not have the releaseTexBuffer hook. Cc: Juan Zhao <[email protected]> Cc: Kristian Høgsberg <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glx: drop obsolete _XUnlock_Mutex in __glXInitialize error pathEmil Velikov2014-04-091-3/+1
| | | | | | | | | | | | | | With commit 1f1928db001(glx: Drop _Xglobal_lock while we create and initialize glx display) we've split the big _Xglobal_lock handling in a more fine grained manner. Unfortunatelly we forgot to drop the unlock_mutex on the error paths, leading to undefined behaviour as the mutex is already unlocked. Cc: Kristian Høgsberg <[email protected]> Cc: "9.2 10.0 10.1" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* automake: don't enable -Wl,--no-undefined on OpenBSDJonathan Gray2014-04-051-1/+1
| | | | | | | | | | | | | | | | OpenBSD does not have DT_NEEDED entries for libc by design, over concerns how the symbols would be referenced after changing the major version of the library. So avoid -no-undefined checks on OpenBSD as they will fail. v2: don't include the -no-undefined libtool option in the variable and change -Wl,--no-undefined references in Automake.inc as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76856 Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glx: Do not advertise buffer_age on dri2Adel Gadllah2014-04-021-1/+1
| | | | | | | | | | | | | Previously GLX_EXT_buffer_age has always been advertised as supported because both client_glx_support and client_glx_only where set. So it did not matter that direct_support is only set when running dri3 and we ended up always advertising it. Fix that by not setting client_glx_only for buffer_age in known_glx_extensions. Signed-off-by: Adel Gadllah <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glx: add extra null check in getFBConfigsJuha-Pekka Heikkila2014-04-021-0/+4
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: remove unused __glXClientInfo()Juha-Pekka Heikkila2014-04-021-13/+0
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* automake: ask the linker to do garbage collectionEmil Velikov2014-03-311-0/+1
| | | | | | | | | | | | | | By doing GC the linker removes all the symbols that are not referenced and/or used by the final library. This results in a saving of ~100K up-to ~600K per (stripped) binary (classic vs gallium drivers). If interested one can ask the compiler to print the sections that are removed using -Wl,--print-gc-sections. v2: Check if ld supports the flag before using it. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> (v1)
* automake: add -Wl,--no-undefined to all librariesEmil Velikov2014-03-311-1/+3
| | | | | | | | | ... apart from the dri drivers. With this final change we can build mesa without fear that the resulting libraries will have unresolved symbols. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* loader: add special logic to distinguish nouveau from nouveau_vieuxIlia Mirkin2014-03-191-10/+10
| | | | | | | | | | | There are a lot of different pci ids supported by nouveau, and more are added all the time. The relevant distinguisher between drivers is the chipset id. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.1" <[email protected]>
* glx: Fix incorrect pdp assignment in dri2_bind_context().Charmaine Lee2014-03-181-1/+2
| | | | | | | pdp should be set to dpyPriv->dri2Display. Fixes blank frame failure running glretrace ClearView. Reviewed-by: Brian Paul <[email protected]>
* dri3: Add GLX_EXT_buffer_age supportAdel Gadllah2014-03-137-3/+55
| | | | | | | | | | | v2: Indent according to Mesa style, reuse sbc instead of making a new swap_count field, and actually get a usable back before returning the age of the back (fixing updated piglit tests). Changes by anholt. Signed-off-by: Adel Gadllah <[email protected]> Reviewed-by: Robert Bragg <[email protected]> (v1) Reviewed-by: Adel Gadllah <[email protected]> (v2) Reviewed-by: Eric Anholt <[email protected]>
* dri3: Prefer the last chosen back when finding a new one.Eric Anholt2014-03-131-10/+7
| | | | | | | | | | | | | | With the buffer_age code, I need to be able to potentially call this more than once per frame, and it would be bad if a new special event showing up meant I chose a different back mid-frame. Now, once we've chosen a back for the frame, another find_back will choose it again since we know that it won't have ->busy set until swap. Note that this makes find_back return a buffer id instead of a backbuffer index. That's kind of a silly distinction anyway, since it's an identity mapping between the two (it's the front buffer that is at an offset). Reviewed-By: Adel Gadllah <[email protected]>
* glx: cleanup unneeded headersEmil Velikov2014-03-117-11/+1
| | | | | | | | | | | - xf86dri.h is the old dri1 header, not required by dri2 nor dri3 - fold xf86drm.h inclusiong inside dri2.h - dri3_glx does not have any drm specific dependencies - glapi.h is not required by the dri2 and dri3 codepaths Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/tests: honor enable-driglx-direct configure flagJon TURNEY2014-03-111-0/+4
| | | | | | | | | | | | | | | Recent commit fixed build issues in dri2_query_renderer.c by wrapping in defined(direct_rendering) && !defined(applegl) This patch targets the query_renderer tests, so that make check passes on platforms such as hurd and cygwin. v2: (Emil) - Rebase and update commit message. Signed-off-by: Jon TURNEY <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* configure: use LIB_EXT rather than hardcoded .soEmil Velikov2014-03-111-4/+4
| | | | | | | | | | | | | | | Some platforms different library extension - dll, dylib, a. Honor that when we are creating the required links. Rename LIB_EXTENSION to LIB_EXT while we're here. With libglapi linking aside, building classic drivers on non-linux platforms should be possible now. v2: Resolve conflicts. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* automake: do not use symbols names for static glapi.laEmil Velikov2014-03-111-5/+3
| | | | | | | | | | | | In the cases where one links against the static glapi.la there is no need to create temporary variables only to explicitly link agaist it. Instead use SHARED_GLAPI_LIB to explicitly indicate when one is building and linking with the shared glapi provider. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* configure: remove old makefile variablesEmil Velikov2014-03-111-5/+4
| | | | | | | | | | | | All the variables were used before the automake conversion and do not make sense (nor are used) currently. Replace GL_LIB_NAME with lib$(GL_LIB).$(LIB_EXTENSION) for apple-glx. The build has been broken for ages, but this will ease the recovery process as it happens. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* glx_pbuffer: Refactor GetDrawableAttributeAdel Gadllah2014-03-071-5/+6
| | | | | | | | Move the pdraw != NULL check out so that they don't have to be duplicated. Signed-off-by: Adel Gadllah <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove remaining uses of _glthread_GetID()Brian Paul2014-03-051-10/+0
| | | | | | | | | | | | | | | It was really only used in the radeon driver for a debug printf. And evidently, libGL.so referenced it just to work around some sort of linker issue. This patch removes the two calls to the function and the function itself. Fixes undefined _glthread_GetID symbol in libGL reported by 'nm'. Though, the missing symbol doesn't cause any issues on my system but it does cause glxinfo to fail on one of our test systems. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove empty glthread.h fileBrian Paul2014-03-031-1/+0
| | | | Reviewed-by: José Fonseca <[email protected]>
* glx/dri2: fix build failure on HURDJulien Cristau2014-03-031-0/+5
| | | | | | | Patch from Debian package. Cc: "10.0 10.1" <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/apple: Fixed glx context memory leak in case of failure.Siavash Eliasi2014-02-281-0/+1
| | | | | Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia: <[email protected]>
* glx: Fix the GLXFBConfig attrib sort prioritiesFredrik Höglund2014-02-261-7/+4
| | | | | | | | | The sort priorites for GLX_SAMPLES and GLX_SAMPLE_BUFFERS are not defined in GL_ARB_multisample, but they are defined in the GLX 1.4 specification. Cc: "9.2 10.0 10.1" <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx: Fix the default values for GLXFBConfig attributesFredrik Höglund2014-02-261-7/+2
| | | | | | | | | | | | The default values for GLX_DRAWABLE_TYPE and GLX_RENDER_TYPE are GLX_WINDOW_BIT and GLX_RGBA_BIT respectively, as specified in the GLX 1.4 specification. This fixes the glx-choosefbconfig-defaults piglit test. Cc: "9.2 10.0 10.1" <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/drisw: use the implemented version of __DRIswrastLoaderExtensionEmil Velikov2014-02-231-5/+6
| | | | | | | | ... over the one provided by the headers. Explicitly set extension members to improve clarity. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri: use the implemented version of __DRIdamageExtensionEmil Velikov2014-02-231-2/+3
| | | | | | | | ... over the one provided by the headers. Explicitly set extension members to improve clarity. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri_common: use the implemented version of __DRIsystemTimeExtensionEmil Velikov2014-02-231-3/+4
| | | | | | | | ... over the one provided by the headers. Explicitly set extension members to improve clarity. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri: use the implemented version of __DRIgetDrawableInfoExtensionEmil Velikov2014-02-231-2/+3
| | | | | | | ... over the one provided by the headers. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri3: set the implemented version of __DRIimageLoaderExtensionEmil Velikov2014-02-231-3/+4
| | | | | | | | | ... over the one provided by the spec. Currently both versions are identical, but that is not guaranteed to be the case in the future. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx/dri2: set the implemented version of __DRIdri2LoaderExtensionEmil Velikov2014-02-231-8/+10
| | | | | | | | ... over the version number provided by the headers. Explicitly set extension members to improve clarity. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx: Add missing null check in __glX_send_client_info()Juha-Pekka Heikkila2014-02-071-0/+4
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Add some missing null checks in glx_pbuffer.cJuha-Pekka Heikkila2014-02-071-4/+15
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Add missing null check in __glXCloseDisplayJuha-Pekka Heikkila2014-02-071-1/+2
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Add missing null checks in glxcmds.cJuha-Pekka Heikkila2014-02-071-8/+20
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Pass NULL DRI drawables into the DRI driver for None GLX drawablesKristian Høgsberg2014-02-062-5/+15
| | | | | | | | | | | | | | GLX_ARB_create_context allows making a GLX context current with None drawable and readables, but this was never implemented correctly in GLX. We would create a __DRIdrawable for the None GLX drawable and pass that to the DRI driver and that would somehow work. Now it's somehow broken. The way this should have worked is that we pass a NULL DRI drawable to the DRI driver when the GLX user calls glXMakeContextCurrent() with None for drawable and readables. https://bugs.freedesktop.org/show_bug.cgi?id=74143 Signed-off-by: Kristian Høgsberg <[email protected]>
* dri3: Track current Present swap mode and adjust buffer countsKeith Packard2014-01-302-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | This automatically adjusts the number of buffers that we want based on what swapping mode the X server is using and the current swap interval: swap mode interval buffers copy > 0 1 copy 0 2 flip > 0 2 flip 0 3 Note that flip with swap interval 0 is currently limited to twice the underlying refresh rate because of how the kernel manages flipping. Moving from 3 to 4 buffers would help, but that seems ridiculous. v2: Just update num_back at the point that the values that change num_back change. This means we'll have the updated value at the point that the freeing of old going-to-be-unused backbuffers happens, which might not have been the case before (change by anholt, acked by keithp). Signed-off-by: Keith Packard <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]>