summaryrefslogtreecommitdiffstats
path: root/src/glx
Commit message (Collapse)AuthorAgeFilesLines
* mesa: regenerate glapi filesMarek Olšák2011-03-151-2/+2
| | | | | Be sure to type "make clean" after this commit, otherwise your binaries will segfault.
* glx: fix null pointer deref in __glXGenerateError()Brian Paul2011-03-101-5/+5
| | | | | | | | | | The gc var would be NULL if called from line 238. Instead, get the opcode from __glXSetupForCommand(dpy) as done in other places. And remove the unused gc parameter. Fixes a bug reported by "John Doe" on 3/9/2011. NOTE: This is a candidate for the 7.10 branch.
* glx: Take GLPROTO_CFLAGS into account.Henri Verbeet2011-03-071-0/+1
|
* glx/dri: add initial dri interface for GLX_EXT_framebuffer_sRGB.Dave Airlie2011-03-064-5/+7
| | | | This realigns the name of the glx bit to align with the core mesa names.
* glx: add initial GLX_EXT_framebuffer_sRGB support.Dave Airlie2011-03-065-0/+16
| | | | | | | | | | 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 <[email protected]>
* dri2: Don't call the dri2 flush hook for swapbuffers unless we have a context.Eric Anholt2011-02-261-2/+7
| | | | | | The driver only has one reasonable place to look for its context to flush anything, which is the current context. Don't bother it with having to check.
* glx: Don't do the implicit glFlush in SwapBuffers if it's the wrong drawable.Eric Anholt2011-02-261-2/+6
| | | | | The GLX Spec says you only implicitly glFlush if the drawable being swapped is the current context's drawable.
* mesa: Add new MESA_multithread_makecurrent extension.Eric Anholt2011-02-264-24/+37
| | | | | | | This extension allows a client to bind one context in multiple threads simultaneously. It is then up to the client to manage synchronization of access to the GL, just as normal multithreaded GL from multiple contexts requires synchronization management to shared objects.
* glx: Put null check before usenobled2011-02-111-2/+6
| | | | | | 'dpy' was being checked for null *after* it was already used once. Also add a null check for psc, and drop gc's redundant initialization.
* glx: Properly check for a valid fd in dri2CreateScreen().Henri Verbeet2011-01-311-1/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* glx: Fix leaks in DRISW screen creation error paths.Henri Verbeet2011-01-311-2/+5
| | | | Signed-off-by: Brian Paul <[email protected]>
* glx: Fix leaks in DRI screen creation error paths.Henri Verbeet2011-01-311-19/+20
| | | | Signed-off-by: Brian Paul <[email protected]>
* glx: Fix leaks in DRI2 screen creation error paths.Henri Verbeet2011-01-313-15/+29
| | | | Signed-off-by: Brian Paul <[email protected]>
* glx: fix length of GLXGetFBConfigsSGIXJulien Cristau2011-01-311-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 <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* glx: fix GLXChangeDrawableAttributesSGIX requestJulien Cristau2011-01-311-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 <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* glx: fix request lengthsJulien Cristau2011-01-241-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 <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* glapi: Fix OpenGL and OpenGL ES interop.Chia-I Wu2011-01-204-3/+78
| | | | | | | | | | | | | | | | | | | | | | | | When --enable-shared-glapi is specified, libGL will share libglapi with OpenGL ES instead of defining its own copy of glapi. This makes sure an app will get only one copy of glapi in its address space. The new option is disabled by default. When enabled, libGL and libglapi must be built from the same source tree and distributed together. This requirement comes from the fact that the dispatch offsets used by these libraries are re-assigned whenever GLAPI XMLs are changed. For GLX, indirect rendering for has_different_protocol() functions is tricky. A has_different_protocol() function is assigned only one dispatch offset, yet each entry point needs a different protocol opcode. It cannot be supported by the shared glapi. The fix to this is to make glXGetProcAddress handle such functions specially before calling _glapi_get_proc_address. Note that these files are automatically generated/re-generated src/glx/indirect.c src/glx/indirect.h src/mapi/glapi/glapi_mapi_tmp.h
* glapi: regenerated filesBrian Paul2011-01-153-54/+54
|
* glapi: Regenerate for GL_ARB_ES2_compatibility.Eric Anholt2011-01-143-54/+54
|
* dri2: release texture image.Juan Zhao2011-01-091-0/+21
| | | | | | Add release function for texture_from_pixmap extension. Some platform need to release texture image for texture_from_pixmap extension, add this interface for those platforms.
* mesa: upgrade to glext.h version 66Brian Paul2010-11-172-17/+17
| | | | | The type of the num/count parameter to glProgramParameters4[df]vNV() changed so some API dispatch code needed updates too.
* glapi: Do not use glapioffsets.h.Chia-I Wu2010-10-272-7/+5
| | | | | | | glapioffsets.h exists for the same reason as glapidispatch.h does. It is of no use to glapi. This commit also drops the use of glapioffsets.h in glx as glx is considered an extension to glapi when it comes to defining public GL entries.
* glapi: Do not use glapidispatch.h.Chia-I Wu2010-10-273-41/+31
| | | | | | | | | glapidispatch.h exists so that core mesa (libmesa.a) can be built for DRI drivers or for non-DRI drivers as a compile time decision (whether IN_DRI_DRIVER is defined). It is of no use to glapi. This commit also drops the use of glapidispatch.h in glx and libgl-xlib as they are considered extensions to glapi when it comes to defining public GL entries.
* ARB_texture_rg: Add GLX protocol supportIan Romanick2010-10-013-0/+3
|
* glx: remove duplicated includeNicolas Kaiser2010-09-301-2/+0
| | | | | | Remove duplicated include. Signed-off-by: Brian Paul <[email protected]>
* glx: Only remove drawables from the hash when we actually delete themKristian Høgsberg2010-09-291-4/+6
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=30457
* Remove GL_MESA_packed_depth_stencilIan Romanick2010-09-271-8/+0
| | | | This extension was never enabled in any driver.
* glx: Invalidate buffers after binding a drawableKristian Høgsberg2010-09-221-4/+15
| | | | | | | | | If the server doesn't send invalidate events, we may miss a resize before the rendering starts. Invalidate the buffers now so the driver will recheck before rendering starts. https://bugs.freedesktop.org/show_bug.cgi?id=29984 https://bugs.freedesktop.org/show_bug.cgi?id=30155
* glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x buildLuca Barbieri2010-09-223-6/+14
| | | | | | | | | | | | | | | The Gallium EGL state tracker reuses dri2.c but not the GLX code. Currently there is a bit of code in dri2.c that is incorrectly tied to GLX: instead, make it call an helper that both GLX and Gallium EGL implement, like dri2InvalidateBuffers. This avoids a link error complaining that dri2GetGlxDrawableFromXDrawableId is undefined. Note that we might want to move the whole event translation elsewhere, and probably stop using non-XCB DRI2 altogether, but this seems to be the minimal fix.
* glx: Hold on to drawables if we're just switching to another contextKristian Høgsberg2010-09-211-1/+4
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=30234
* glx: add const qualifiers to __indirect_glMultiDrawArraysEXT()Brian Paul2010-09-141-2/+2
|
* mesa: update to version 64 of GL/glext.hBrian Paul2010-09-143-5/+5
| | | | | | A number of other files had to be updated as well because const qualifiers were added to the glMultiDrawArrays() function. Also, GL_FIXED is now defined in glext.h.
* glx: Don't destroy DRI2 drawables for legacy glx drawablesKristian Høgsberg2010-09-131-1/+11
| | | | | | | | | | | For GLX 1.3 drawables, we can destroy the DRI2 drawable when the GLX drawable is destroyed. However, for legacy drawables, there os no good way of knowing when the application is done with it, so we just let the DRI2 drawable linger on the server. The server will destroy the DRI2 drawable when it destroys the X drawable or the client exits anyway. https://bugs.freedesktop.org/show_bug.cgi?id=30109
* glx: Optimize out no-op make current callsKristian Høgsberg2010-09-091-0/+4
| | | | | This make a lot more sense now that we might have to recreate the glx drawables for legacy code paths.
* glx: Fix another use-after-free problemKristian Høgsberg2010-09-091-1/+3
|
* glx: Destroy pixmap after destroying glx and dri drawablesKristian Høgsberg2010-09-081-2/+2
| | | | | Now that we suppress BadDrawable from DRI2DestroyDrawable, this doesn't matter, but we would get that error before when destroying pbuffers.
* glx: Ignore DRI2 event for drawables we've destroyedKristian Høgsberg2010-09-081-1/+1
| | | | | | Since we now actually destroy GLX drawables, we get into situations where we get events for drawables that no longer exist. Just ignore the event in that case.
* glx: Fix use after free problemKristian Høgsberg2010-09-081-6/+7
|
* glx: Drop broken drawable garbage collectionKristian Høgsberg2010-09-089-59/+48
| | | | | | 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.
* glx: Set an all NULL vtable for dummyContextKristian Høgsberg2010-09-073-8/+9
| | | | | | This reverts 6a6e6d7b0a84e20f9754af02a575ae34081d310c and initializes dummyContext with an all NULL vtable. The context vtable pointer is supposed to always be non-NULL, but the vtable entries can be NULL.
* glx: Fix compilation with out xf86vidmodeKristian Høgsberg2010-09-071-7/+1
|
* glx: Use GLX_BufferSwapComplete unconditionally, we require glproto 1.4.11Kristian Høgsberg2010-09-071-11/+0
|
* Fix crashes when some GLX API entrypoints are called with no current context.Michel Dänzer2010-09-071-5/+5
| | | | | | | | | I was hitting this with gliv. The GLX spec explicitly mentions that glXWaitX, glXWaitGL and glXUseXFont calls are ignored when there's no current context. Not sure what if anything the GLX_EXT_texture_from_pixmap spec says about this, but I think ignoring the calls makes more sense than crashing there as well. :)
* Make XF86VIDMODE extension optionalJon TURNEY2010-09-072-1/+7
| | | | | | | | | | | | | | Code in glx/glxcmds.c which uses the XF86VIDMODE extension is already guarded. Also use that guard to control inclusion of the xf86vmode.h header, and only enable that guard if the XF86VIDMODE extension is found by pkgconfig. This changes the behaviour on platforms which XF86VIDMODE exists, in that XF86VIDMODE used to be mandatory, but is now optional. Presumably other build systems are already arranging for -DXF86VIDMODE to be supplied to the complier when glxcmds.c is compiled, so are not affected by this change Signed-off-by: Jon TURNEY <[email protected]>
* glx: Drop unused dri2proto.h includeKristian Høgsberg2010-09-071-1/+0
|
* glx: Move dpy and scr fields out of direct rendering conditionalKristian Høgsberg2010-09-071-3/+3
| | | | | | | Nothing direct rendering specific about these fields. Moving them out makes no-direct-rendering compilation work again. Signed-off-by: Kristian Høgsberg <[email protected]>
* Some fixes for GLX_INDIRECT_RENDERING only buildJon TURNEY2010-09-073-5/+9
| | | | | | | This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes. Signed-off-by: Jon TURNEY <[email protected]> Signed-off-by: Kristian Høgsberg <[email protected]>
* glx: Only clear the stored context tag when the context has been unboundJon TURNEY2010-09-071-5/+8
| | | | | | | | | | | | | | The calling order of ->bind and ->unbind changed and then ->unbind would clear the currentContextTag of the old context before ->bind could reuse it in the make current request, in the indirect case. Instead, clear the old currentContextTag if and only if we send a request to the server to actually unbind it or reassign it to another context. https://bugs.freedesktop.org/show_bug.cgi?id=29977 Signed-off-by: Jon TURNEY <[email protected]> Signed-off-by: Kristian Høgsberg <[email protected]>
* make: Use C++ compiler to link stdc++ library.Brian Paul2010-08-241-2/+3
| | | | | glxinfo and glxgears run on swrast and softpipe without undefined symbol errors.
* glx: Move deref after NULL checkKristian Høgsberg2010-08-041-1/+2
|