summaryrefslogtreecommitdiff
path: root/src/glx/glx_pbuffer.c
AgeCommit message (Collapse)AuthorFilesLines
2013-08-13glx: Generate GLXBadDrawable when drawable is zeroIan Romanick1-2/+12
Fixes piglit glx-query-drawable-GLXBadDrawable. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Cc: "9.2" <mesa-stable@lists.freedesktop.org>
2013-02-27glx: Fix glXCreateWindow() when GLX_DIRECT_RENDERING is undefinedJon TURNEY1-1/+1
glXCreateWindow() and glXCreatePbuffer() always fail when built without GLX_DIRECT_RENDERING defined since commit 48331047. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-09-05Don't cast the return value of malloc/reallocMatt Turner1-1/+1
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) )
2012-09-05Remove Xcalloc/Xmalloc/Xfree callsMatt Turner1-4/+4
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>
2011-07-08GLX/DRI2: handle swap event swap count wrappingJesse Barnes1-0/+11
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-06-29glx: Verify that drawable creation on the client side actually workedAdam Jackson1-24/+47
... and clean up if it didn't. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-05apple: Rename __GLcontextModes to struct glx_configJeremy Huddleston1-1/+1
Fixes regression introduced by: 6ddf66e9230ee862ac341c4767cf6b3b2dd2552b Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-25glx: Don't refer to the request buffer outside of {L,Unl}ockDisplayAdam Jackson1-3/+4
... because that's not a safe thing to do. The request buffer is shared storage among all threads, and after UnlockDisplay the 'req' pointer may point into someone else's request. NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-05-24glx: Remove some misleading commentsAdam Jackson1-12/+0
These functions have already been modified for direct rendering. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-05-04GLX: don't crash when indirect clients try to set an event maskJesse Barnes1-0/+3
After sending the GLXChangeDrawableAttributes request, we also set a local set of attributes on the DRI drawable. But in the indirect case this array won't be present, so skip the setting in that case to avoid a crash. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-01-31glx: fix GLXChangeDrawableAttributesSGIX requestJulien Cristau1-2/+3
xGLXChangeDrawableAttributesSGIXReq follows the GLXVendorPrivate header with a drawable, number of attributes, and list of (type, value) attribute pairs. Don't forget to put the number of attributes in there. I don't think this can ever have worked. 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>
2011-01-24glx: fix request lengthsJulien Cristau1-3/+3
We were sending too long requests for GLXChangeDrawableAttributes, GLXGetDrawableAttributes, GLXDestroyPixmap and GLXDestroyWindow. 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-09glx: Fix another use-after-free problemKristian Høgsberg1-1/+3
2010-09-08glx: Destroy pixmap after destroying glx and dri drawablesKristian Høgsberg1-2/+2
Now that we suppress BadDrawable from DRI2DestroyDrawable, this doesn't matter, but we would get that error before when destroying pbuffers.
2010-09-07Some fixes for GLX_INDIRECT_RENDERING only buildJon TURNEY1-2/+6
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-07-28glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.Kristian Høgsberg1-7/+7
2010-07-28glx: Rename __GLXscreenConfigs to struct glx_screenKristian Høgsberg1-2/+2
Because double underscores in private type names is painful.
2010-07-28glx: Use _X_EXPORT instead of our own PUBLIC macroKristian Høgsberg1-14/+14
We're an X client library, so we can use Xfuncproto.h.
2010-07-28glx: Rename __GLcontextModes to struct glx_configKristian Høgsberg1-30/+30
With this rename, we use 'config' consitently to refer to GLX configurations instead of the modes/configs/visual mess before.
2010-07-22glx: Drop screen argument to GetGLXDRIDrawableKristian Høgsberg1-6/+4
We'll just get it from the returned drawable when we need it.
2010-07-19glx: Move drawHash to display privateKristian Høgsberg1-2/+2
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: Add screen privates for dri drivers and moved some fields thereKristian Høgsberg1-2/+2
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-15glx: Move dereference and initialization to after NULL check.Vinson Lee1-1/+3
2010-07-14dri2: Track event mask in client code.Nick Bowler1-0/+11
When direct rendering is being used, DRI2 BufferSwapComplete events are sent unconditionally to clients, even if they haven't been requested. This causes error messages to be printed by every freeglut application of the form freeglut (./gears): Unknown X event type: 104 and might confuse other clients. This is a fixed up version of the patch by Jesse Barnes, which drops BufferSwapComplete events if they are not requested by clients. Fixes fdo bug 27962. Signed-off-by: Nick Bowler <nbowler@draconx.ca> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-04-28Merge branch '7.8'Brian Paul1-12/+185
Conflicts: src/glx/dri2_glx.c src/glx/glx_pbuffer.c
2010-04-27apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston1-3/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-27apple: Initial import of libGL for OSX from AppleSGLX svn repository.Jeremy Huddleston1-12/+184
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-09glx: Support direct rendering pbuffersKristian Høgsberg1-103/+123
We've supported indirect rendering pbuffers for a while, but not direct rendering pbuffers. The way we do this is by creating a hidden pixmap and wrap that in a GLX pbuffer. This only works when we have DRI2 on the server, but if the server doesn't have DRI2, it won't expose configs with pbuffer bits enabled.
2010-04-01Revert accidental commits from the xquartz treeJeremy Huddleston1-187/+15
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-3/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01apple: Initial import of libGL for OSX from AppleSGLX svn repository.Jeremy Huddleston1-12/+184
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-02glx: replace assertion with conditionalBrian Paul1-2/+2
See fd.o bug 26832.
2010-02-27glx: Add assert to check input to memcpy.Vinson Lee1-0/+1
2010-02-16glx: Move GetGLXDRIDrawable() prototype to glxclient.hKristian Høgsberg1-4/+0
2010-02-09Retire miniglx and move the actual glx code up to src/glxKristian Høgsberg1-0/+724