summaryrefslogtreecommitdiff
path: root/src/glx/glxext.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-29glx: Set sRGBCapable to a default valueIan Romanick1-0/+2
Previously, if the server didn't send a GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT tag, it would still be set to GLX_DONT_CARE (which is -1). Set it to GL_FALSE instead. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Maciej Wieczorek <maciej.t.wieczorek@intel.com>
2012-10-17glx: Add GLXBadProfileARB to the error string listAdam Jackson1-0/+1
Note: This is a candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-10-09glx: Unifdef USE_XCB.Eric Anholt1-73/+0
It's been required for building glx since b518dfb513742984f27577d25566f93afd86d4fc in january. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-6/+3
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 <brianp@vmware.com>
2012-09-05Remove Xcalloc/Xmalloc/Xfree callsMatt Turner1-16/+16
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 <brianp@vmware.com>
2012-06-12glx: Handle a null reply in QueryVersion.Stéphane Marchesin1-0/+3
Works around crashes when X connections break. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> NOTE: This is a candidate for the 8.0 branch.
2012-01-02glx: Use __glX_send_client_info with XCBIan Romanick1-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 <ian.d.romanick@intel.com>
2011-12-19glx: Explicitly reject servers that only support GLX 1.0Ian Romanick1-4/+6
__glXInitialize calls AllocAndFetchScreenConfigs. AllocAndFetchScreenConfigs unconditionally sends a glXQuerySeverString request to the server. This request is only supported with GLX 1.1 or later, so we were already implicitly incompatible with GLX 1.0 servers. How many more similar bugs lurk in the code that nobody has noticed in years? Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-07-19glx: Avoid calling __glXInitialize() in driReleaseDrawables().Henri Verbeet1-8/+3
This fixes a regression introduced by commit a26121f37530619610a78a5fbe5ef87e44047fda (fd.o bug #39219). Since the __glXInitialize() call should be unnecessary anyway, this is probably a nicer fix for the original problem too. NOTE: This is a candidate for the 7.10 and 7.11 branches. Signed-off-by: Henri Verbeet <hverbeet@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: padfoot@exemail.com.au
2011-07-08GLX/DRI2: handle swap event swap count wrappingJesse Barnes1-1/+13
Create a new GLX drawable struct to track client related info, and add a wrap counter to it drawable and track it as we receive events. This allows us to support the full 64 bits of the event structure we pass to the client even though the server only gives us a 32 bit count. Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-08DRI2/GLX: use new swap event typesJesse Barnes1-2/+2
Use the new swap event type so we get valid SBC values. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-06-05apple: Build darwin using applegl rather than indirectJeremy Huddleston1-3/+4
This reverts portions of 6849916170c0275c13510251a7b217c20f2b993e that caused the darwin config to fail to build due to missing implementations in that commit. See https://bugs.freedesktop.org/show_bug.cgi?id=29162 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-05Revert "DRI2/GLX: make swap event handling match spec"Dave Airlie1-1/+1
This reverts commit 70227e21bbd4411956ceeb5039640140e64a11a8. revert this until we sort things out, with a new glproto release with compatible struct names.
2011-05-04DRI2/GLX: make swap event handling match specJesse Barnes1-1/+1
We only handle a 32 bit swap count, so use the new structure definitions. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-04-10glx: Only remove the glx_display from the list after it's destroyed.Henri Verbeet1-3/+8
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-06glx/dri: add initial dri interface for GLX_EXT_framebuffer_sRGB.Dave Airlie1-1/+1
This realigns the name of the glx bit to align with the core mesa names.
2011-03-06glx: add initial GLX_EXT_framebuffer_sRGB support.Dave Airlie1-0/+4
this doesn't bind to drivers yet, just enough to in theory make indirect work against other servers. I'm really not sure what the rules for adding extensions to the known_gl_extensions list as it looks to be missing a few. are these GL extensions that have GLX protocol?? Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-31glx: Fix leaks in DRI2 screen creation error paths.Henri Verbeet1-11/+17
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-31glx: fix length of GLXGetFBConfigsSGIXJulien Cristau1-1/+1
The extra length is the size of the request *minus* the size of the VendorPrivate header, not the addition. NOTE: This is a candidate for the 7.9 and 7.10 branches Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-07glx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11Kristian Høgsberg1-11/+0
2010-09-07glx: Drop unused dri2proto.h includeKristian Høgsberg1-1/+0
2010-09-07Some fixes for GLX_INDIRECT_RENDERING only buildJon TURNEY1-1/+1
This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-08-02glx: Drop _Xglobal_lock while we create and initialize glx displayKristian Høgsberg1-21/+39
2010-07-29glx: Fix linked list deletion in __glXCloseDisplay()Kristian Høgsberg1-1/+1
I hate single linked lists.
2010-07-28glx: Split indirect and applegl implementations into different filesKristian Høgsberg1-1/+5
2010-07-28glx: Move bind and unbind to context vtableKristian Høgsberg1-1/+1
2010-07-28glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.Kristian Høgsberg1-19/+19
2010-07-28glx: Rename __GLXscreenConfigs to struct glx_screenKristian Høgsberg1-11/+11
Because double underscores in private type names is painful.
2010-07-28glx: Rename glcontextmodes.[ch] to glxconfig.[ch]Kristian Høgsberg1-1/+0
2010-07-28glx: Rename __GLcontextModes to struct glx_configKristian Høgsberg1-8/+23
With this rename, we use 'config' consitently to refer to GLX configurations instead of the modes/configs/visual mess before.
2010-07-28glx: Delete unused glcontextmodes.c functionsKristian Høgsberg1-7/+0
2010-07-26glx: Remove function prototypes no longer necessaryKristian Høgsberg1-7/+0
2010-07-23glx: Fix use after free case when destroying screensKristian Høgsberg1-1/+0
2010-07-23glx: Refactor and simplify context creationKristian Høgsberg1-16/+1
This lets us better separate context creation between the different backends.
2010-07-23glx: Fix indirect screen initializationKristian Høgsberg1-2/+7
https://bugs.freedesktop.org/show_bug.cgi?id=29225
2010-07-23glx: Move context destroy to context vtableKristian Høgsberg1-1/+1
2010-07-22glx: Use _Xglobal_lock for protecting extension display listKristian Høgsberg1-124/+80
Avoids double locking glXLock in the X wire to event handlers.
2010-07-19glx: Move driver_configs to DRI screen privatesKristian Høgsberg1-7/+0
2010-07-19glx: Move drawHash to display privateKristian Høgsberg1-9/+4
The XIDs are display wide so the natural location of the hash is here. This way we don't have to lookup in each of the screen hashes.
2010-07-19glx: Don't use __glXInitialize() when we might be holding __glXLock()Kristian Høgsberg1-0/+1
2010-07-19glx: Add screen privates for dri drivers and moved some fields thereKristian Høgsberg1-36/+53
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-06-02glx: fix indentation and remove extraneous breakBrian Paul1-2/+1
2010-06-02glx: reformat and silence unused expression warningBrian Paul1-1/+2
2010-05-03glx: fix regression with GLX_USE_GLDave Airlie1-0/+3
update for fbconfig_style_tags
2010-04-27apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston1-5/+5
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-27apple: Initial import of libGL for OSX from AppleSGLX svn repository.Jeremy Huddleston1-7/+75
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig ↵7.8-branchpointAaron Plattner1-0/+2
tags. __glXInitializeVisualConfigFromTags doesn't skip the payload of unrecognized tags. Instead, it treats the value as if it were the next tag, which can happen if the server's GLX extension is not Mesa's. For example, this falls down when NVIDIA sends a GLX_FLOAT_COMPONENTS_NV = 0 pair, causing __glXInitializeVisualConfigFromTags to bail out early. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-04-04Update to final names from GLX_INTEL_swap_event specIan Romanick1-1/+1
Fixes bug #27454.
2010-04-01Revert accidental commits from the xquartz treeJeremy Huddleston1-76/+10
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-5/+5
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>