summaryrefslogtreecommitdiff
path: root/src/glx/dri_glx.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-07glx: Fix indirect fallback when a non-Mesa GLX extension is present.Aaron Plattner1-5/+16
When driCreateScreen calls driConvertConfigs to try to convert the configs for swrast, it fails and returns NULL. Instead of checking, it just clobbers psc->base.configs. Then, when the application asks for the FBconfigs, there aren't any. Instead, make the caller responsible for freeing the old modes lists if both calls to driConvertConfigs succeed. Without the second fix, glxinfo fails unless you run it with LIBGL_ALWAYS_INDIRECT: $ glxinfo name of display: :0.0 Error: couldn't find RGB GLX visual or fbconfig $ LIBGL_ALWAYS_INDIRECT=1 glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: No (LIBGL_ALWAYS_INDIRECT set) server glx vendor string: NVIDIA Corporation server glx version string: 1.4 [...] Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-26dri: Remove all DRI1 driversIan Romanick1-2/+2
Acked-by: Kristian Høgsberg <krh@bitplanet.net> Acked-by: Marek Olšák <maraeo@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Jakob Bornecrantz <jakob@vmware.com> Acked-by: Dave Airlie <airlied@redhat.com> Build-Tested-by: Jakob Bornecrantz <jakob@vmware.com> Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-06-20glx: Allow a context-specific fallback for glXGetProcAddressJeremy Huddleston1-0/+1
In applegl, GLX advertises the same extensions provided by OpenGL.framework even if such extensions are not provided by glapi. This allows a client to get access to such API. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-17glx: implement drawable refcounting.Stéphane Marchesin1-2/+4
The current dri context unbind logic will leak drawables until the process dies (they will then get released by the GEM code). There are two ways to fix this: either always call driReleaseDrawables every time we unbind a context (but that costs us round trips to the X server at getbuffers() time) or implement proper drawable refcounting. This patch implements the latter. Signed-off-by: Antoine Labour <piman@chromium.org> Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-01-31glx: Fix leaks in DRI screen creation error paths.Henri Verbeet1-19/+20
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-08glx: Drop broken drawable garbage collectionKristian Høgsberg1-2/+2
Doesn't work for pixmaps, was looking up the GLX XID and was never thread safe. Instead, just destroy the client side structures when the drawable is no long current for a context.
2010-07-28glx: Move bind and unbind to context vtableKristian Høgsberg1-31/+26
2010-07-28glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.Kristian Høgsberg1-9/+9
2010-07-28glx: Rename __GLXscreenConfigs to struct glx_screenKristian Høgsberg1-8/+8
Because double underscores in private type names is painful.
2010-07-28glx: Use _X_EXPORT instead of our own PUBLIC macroKristian Høgsberg1-2/+2
We're an X client library, so we can use Xfuncproto.h.
2010-07-28glx: Rename __GLcontextModes to struct glx_configKristian Høgsberg1-7/+7
With this rename, we use 'config' consitently to refer to GLX configurations instead of the modes/configs/visual mess before.
2010-07-26glx: Drop duplicate psc field in dri context structKristian Høgsberg1-3/+2
Same problem as fixed for drisw in 4d58b5b482d06ab8d4c4b2db33d0b48b7c82d064.
2010-07-23glx: Don't destroy context with XID 0Kristian Høgsberg1-1/+2
We use XID 0 to indicate the context has already been destroyed, but it's currently bound.
2010-07-23glx: zero out drawable structs after allocationKristian Høgsberg1-0/+1
2010-07-23glx: Refactor and simplify context creationKristian Høgsberg1-4/+8
This lets us better separate context creation between the different backends.
2010-07-23glx: Move context destroy to context vtableKristian Høgsberg1-9/+18
2010-07-22glx: Move WaitGL, WaitX, UseXFont to context vtable functionsKristian Høgsberg1-2/+3
2010-07-22glx: Allocate the __GLXcontext in the DRI driversKristian Høgsberg1-19/+24
2010-07-19glx: Move DRI CopySubBuffer extension to DRI1 codeKristian Høgsberg1-4/+13
We do this in the X server for DRI2.
2010-07-19glx: Move driver_configs to DRI screen privatesKristian Høgsberg1-1/+3
2010-07-19glx: Move __DRIdrawable pointers to DRI drawable privatesKristian Høgsberg1-27/+46
2010-07-19glx: Move __driScreen into the dri screen privatesKristian Høgsberg1-10/+11
2010-07-19glx: Move DRI1 specific extensions and code to DRI1 screen privateKristian Høgsberg1-1/+123
2010-07-19glx: Add screen privates for dri drivers and moved some fields thereKristian Høgsberg1-49/+78
GLXscreenConfigs is badly named and a dumping ground for a lot of stuff. This patch creates private screen structs for the dri drivers and moves some of their fields over there.
2010-07-19glx: Rename various DRI structs away from obnoxious __GLXfooRec conventionKristian Høgsberg1-14/+11
Enough is enough.
2010-05-21glx: Split tfp functions out to context vtableKristian Høgsberg1-0/+7
This introduces a new per-context vtable, which lets us clean up all the #ifdef's a bit and move the DRI2 specific implementation into dri2_glx.c.
2010-04-27apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01Revert accidental commits from the xquartz treeJeremy Huddleston1-1/+1
This reverts commit 9aadc793f3db64cefa0b08f18abad424a659dacc. This reverts commit 69ea4e7718efb60b6b0d795a355cebd6712ceac1. This reverts commit dbe8b013936d977ec63d6607bfd2fc6772d29787. This reverts commit 23215ef4d60a86d9f3b3fdc08e3fdadc59e98890. This reverts commit 9495e3703062d1ddaf3161f4efc23f0b51284d9b. This reverts commit 0594cf70883b64692ba617d85f4f9b4e636e5c2b. This reverts commit 86a7978d37393ee34f876569ac06ffdb8d7289ae. This reverts commit 437902ce978cde9a0e1aa260f12dc232a8501c42.
2010-04-01apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-05glx: Move initialization of ext_list_first_time to where it's storage is ↵Brian Paul1-3/+0
allocated Move the initialization of ext_list_first_time from all of the DRI loader's CreateScreen routines, to where the storage for the screen config is allocated. It needs to get set in the screen-config even if DRI is forced off using LIBGL_ALWAYS_INDIRECT, so that psc->direct_support is initialized correctly, otherwise __glXExtensionBitIsEnabled() always returns FALSE Specifically, this causes a problem with an X server which advertises GLX<=1.2, and the GLX_SGIX_fbconfig extension. glXGetFBConfigFromVisualSGIX() uses __glXExtensionBitIsEnabled() to check if the GLX_SGIX_fbconfig extension is available, but that function won't return correct information because that data has never been initialized, because ext_list_first_time was never set... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 96ab4d2b84178209ee59017458d9964b32b7e183)
2010-02-14glx: Silence uninitialized variable warning.Vinson Lee1-0/+1
2010-02-09Retire miniglx and move the actual glx code up to src/glxKristian Høgsberg1-0/+751