summaryrefslogtreecommitdiff
path: root/src/glx/x11/glxext.c
AgeCommit message (Collapse)Author
2009-02-26mesa: Resurrect SPARC asm code.David S. Miller
This rewrites the sparc GLAPI code so that it's PIC friendly and works with all of the TLS/PTHREADS/64-bit/32-bit combinations properly. As a result we can turn SPARC asm back on. Currently it's only enabled on Linux, as that's the only place where I can test this stuff out. For the moment the cliptest SPARC asm routines are disabled as they are non-working. The problem is that they use register %g7 as a temporary which is where the threading libraries store the thread pointer on SPARC. I will fix that code up in a future change as it's a pretty important routine to optimize. Like x86 we do the runtime patch as a pthread once-invoked initializer in init_glapi_relocs(). Unlike x86, however, our GLAPI stubs on SPARC are just two instruction sequences that branch to a trampoline and put the GLAPI offset into a register. The trampoline is what we run-time patch. The stubs thus all look like: glFoo: ba __glapi_sparc_foo_stub sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3 This actually makes generate_entrypoint() a lot simpler on SPARC. For this case in generate_entrypoint() we generate stubs using a 'call' instead of the 'ba' above to make sure it can reach. In order to get a proper tail call going here, in the unpatched case, we do several tricks. To get the current PC, for example, we save the return address register into a temporary, do a call, save the return address register written by the call to another temporary, then restore the original return address register value. This is to avoid having to allocate a stack frame. This is necessary for PIC address formation. This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in __glXInitialize() and one_time_init(). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27Revert "glx: xcbified visual and FBConfig choosing"RALOVICH, Kristóf
This reverts commit 62688f11355cfa865d420755aa159875b425cc9b.
2008-11-27Revert "glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX"RALOVICH, Kristóf
This reverts commit 53698765019e50172be25a4ff48c83d54f0e7981.
2008-11-26glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIXRALOVICH, Kristóf
This uses a GLX VendorPrivate request. VendorPrivates are real GLX API calls but use the same protocol request. XCB does not currently support specific VendorPrivetes directly. See eg.: http://lists.freedesktop.org/archives/xcb/2008-November/004036.html for more information.
2008-11-26glx: xcbified visual and FBConfig choosingRALOVICH, Kristóf
2008-11-26glx: no graphics context during initializationRALOVICH, Kristóf
2008-11-26glx: use __glXQueryServerStringRALOVICH, Kristóf
2008-11-26glx: implement QueryVersion using XCBRALOVICH, Kristóf
2008-11-11Don't mess with emacs tab width.Kristian Høgsberg
2008-10-13glx: indent -br -i3 -npcs --no-tabs glxext.cRALOVICH, Kristóf
2008-10-13glx: add a line of Emacs helping variablesRALOVICH, Kristóf
2008-10-13glx: make INIT_MESA_SPARC more robustRALOVICH, Kristóf
Embed the macro body into do { ... } while(0) .
2008-09-19Update to SGI FreeB 2.0.Adam Jackson
Under the terms of version 1.1, "once Covered Code has been published under a particular version of the License, Recipient may, for the duration of the License, continue to use it under the terms of that version, or choose to use such Covered Code under the terms of any subsequent version published by SGI." FreeB 2.0 license refers to "dates of first publication". They are here taken to be 1991-2000, as noted in the original license text: ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. Official FreeB 2.0 text: http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf As always, this code has not been tested for conformance with the OpenGL specification. OpenGL conformance testing is available from http://khronos.org/ and is required for use of the OpenGL logo in product advertising and promotion.
2008-09-18glx: remove #include "glheader.h" linesBrian Paul
Was only used to get the PUBLIC/USED macros. Also, replace "GL_FALSE" with "False" in a couple places.
2008-08-20glx: free driScreen in FreeScreenConfigs()Kristof Ralovich
2008-08-20fix mem leak (free psc->visuals)Kristof Ralovich
2008-08-08glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protectionJeremy Huddleston
2008-07-07glx: add LIBGL_ALWAYS_SOFTWAREGeorge Sapountzis
this disables accelerated DRI and fallbacks to client-side software rendering. compile-tested only.
2008-06-13glx: load swrast_dri.soGeorge Sapountzis
caveats: - does not work with old (i.e. libGLcore) xserver: - made unbindContext a noop - extensions: GLX_SGI_make_current_read GLX_EXT_texture_from_pixmap GLX_MESA_copy_sub_buffer
2008-04-23glx: split out current context codeGeorge Sapountzis
also clean header inclusion after code movement
2008-03-31DRI interface changes and DRI2 direct rendering support.Kristian Høgsberg
Add DRI2 direct rendering support to libGL and add DRI2 client side protocol code. Extend the GLX 1.3 create drawable functions in glx_pbuffer.c to call into the DRI driver when possible. Introduce __DRIconfig, opaque struct that represents a DRI driver configuration. Get's rid of the open coded __GLcontextModes in the DRI driver interface and the context modes create and destroy functions that the loader was requires to provide. glcore.h is no longer part of the DRI driver interface. The DRI config is GL binding agnostic, that is, not specific to GLX, EGL or other bindings. The core API is now also an extension, and the driver exports a list of extensions as the symbol __driDriverExtensions, which the loader must dlsym() for. The list of extension will always include the DRI core extension, which allows creating and manipulating DRI screens, drawables and contexts. The DRI legacy extension, when available, provides alternative entry points for creating the DRI objects that work with the XF86DRI infrastructure. Change DRI2 client code to not use drm drawables or contexts. We never used drm_drawable_t's and the only use for drm_context_t was as a unique identifier when taking the lock. We now just allocate a unique lock ID out of the DRILock sarea block. Once we get rid of the lock entirely, we can drop this hack. Change the interface between dri_util.c and the drivers, so that the drivers now export the DriverAPI struct as driDriverAPI instead of the InitScreen entry point. This lets us avoid dlsym()'ing for the DRI2 init screen function to see if DRI2 is supported by the driver.
2008-03-18glx: Add isDirect back to __GLXcontextRec. It is neededXiang, Haihao
to check whether oldGC is used for direct rendering in function MakeContextCurrent. However it is possible oldGC->driContext is already freed. fix bug #14926.
2008-03-12libGL: Pull the drawable hash back out in the generic code.Kristian Høgsberg
This will be shared between dri and dri2 code.
2008-03-12Add another missing check for uninitialized DRI.Kristian Høgsberg
Spotted by Chris Taylor.
2008-03-10Only try to call DRI function if DRI got initialized properly.Kristian Høgsberg
2008-03-10remove extra #include of assert.h (bug 14932)Brian
2008-03-08Use _X_HIDDEN to hide a bunch of leaked symbols.Kristian Høgsberg
2008-03-08Move DRI context functions into dri_glx.c.Kristian Høgsberg
Also drop isDirect flag; if gc->driContext is non-NULL, it's direct.
2008-03-08Move DRI drawable creation into dri_glx.c.Kristian Høgsberg
2008-03-08Introduce __GLXDRIscreen so we can start moving function pointers in there.Kristian Høgsberg
Temporarily rename the __DRIscreen member to __driScreen. Eventually, we'll move that into __GLXDRIscreen and only access it in dri_glx.c.
2008-03-08Convert driCreateScreen and driDestroyScreen to function pointers.Kristian Høgsberg
We avoid leaking the symbols and will be able to replace them with DRI2 implementation later on.
2008-03-08Abstract __DRIdisplayPrivateRec away in dri_glx.c.Kristian Høgsberg
This patch moves __DRIdisplayPrivateRec definition into dri_glx.c and let's dri_glx.c allocate the __DRIdisplay struct pointer to from __GLXdisplayPrivate. A small step towards moving more of the dri functionality into dri_glx.c.
2008-03-08Make __glXCloseDisplay static instead of prototyping it to avoid warning.Kristian Høgsberg
2008-03-08Simplify dri loading code by eliminating dlopen "cache".Kristian Høgsberg
No need to jump through hoops to track __DRIdrivers and avoid dlopening the same .so more than twice, dlopen() does this internally. Besides, we were already bypassing this and dlopening drivers for each screen, whether or not they were already dlopened.
2008-03-08libGL: Consolidate DRI initialization in dri_glx.cKristian Høgsberg
Move a lot of code over from glx_ext.c.
2008-02-29Update libGL DRI loader to latest DRI interface changes.Kristian Høgsberg
2007-11-06Fix compilation for !GLX_DIRECT_RENDERING.Kristian Høgsberg
2007-11-06Don't return 0 in a void function.Kristian Høgsberg
2007-11-05Filter both visuals and fbconfigs against driver supported configs.Kristian Høgsberg
2007-10-30Fix some build warnings, mostly with XCB.Michel Dänzer
2007-10-17Pull workaround for unset GLX_DRAWABLE_TYPE back in.Kristian Høgsberg
The old version just set GLX_DRAWABLE_TYPE to GLX_WINDOW_BIT for configs received through glXGetVisualConfigs and to GLX_WINDOW_BIT | GLX_PIXMAP_BIT for configs received as FBConfigs. The X server needs to send this info, but keep the workaround for now. Fixes #12835.
2007-10-16Handle fbconfigs and glx visuals separately.Kristian Høgsberg
The old implementation fetches fbconfigs or glx visuals once and assumes the list describes both fbconfigs and glx visuals. This patch splits it up and fetches visuals and fbconfigs in two steps and keep the two lists separate. A server could have no glx visuals or no glx fbconfigs and the old code wouldn't know the difference.
2007-10-11Move enabling of DRI extensions into glxextensions.cKristian Høgsberg
2007-10-11Remove now unused getProcAddress from DRIinterfaceMethods.Kristian Høgsberg
2007-10-11Add a DRI_ReadDrawable marker extension to signal read drawable capability.Kristian Høgsberg
2007-10-11Move media stream counter entry points to new extension.Kristian Høgsberg
2007-10-11Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.Kristian Høgsberg
2007-10-11Move GLX_MESA_allocate_memory related functions to new extension mechanism.Kristian Høgsberg
2007-10-10Move swap_interval to new extension mechanism.Kristian Høgsberg
2007-10-10Move the copySubBuffer extension over to the new mechanism.Kristian Høgsberg