summaryrefslogtreecommitdiff
path: root/src/glx/x11/glxcmds.c
AgeCommit message (Collapse)Author
2008-11-11Don't mess with emacs tab width.Kristian Høgsberg
2008-10-14Update DRI2 implementation according to new specification.Kristian Høgsberg
2008-10-14Revert pointless reindents to avoid merge conflicts.Kristian Høgsberg
Why are we reindenting code that's work in progress...
2008-10-13glx: indent -br -i3 -npcs --no-tabs glxcmds.cRALOVICH, Kristóf
2008-10-13glx: add a line of Emacs helping variablesRALOVICH, Kristóf
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-29DRI2: Drop sarea, implement swap buffers in the X server.Kristian Høgsberg
2008-08-20glx: free vertex array state when context is destroyedKristof Ralovich
2008-08-08glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protectionJeremy Huddleston
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-10Only try to call DRI function if DRI got initialized properly.Kristian Høgsberg
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-08Move DRI specific parts of CreateContext into dri_glx.c.Kristian Høgsberg
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-02-29Update libGL DRI loader to latest DRI interface changes.Kristian Høgsberg
2008-02-25Remove GetMSC DriverAPI function.Kristian Høgsberg
The DriverAPI is internal to the DRI drivers and GetDrawableMSC obsoletes GetMSC. Also, since the DRI driver interface has not yet been released, just drop the getMSC function from the DRI interface instead using the ABI preserving version mechanism. Finally, using void pointer privates in the DRI interface is not allowed, always pass the actual types around (__DRIdrawable in this case) to enhance type safety and readability of the code.
2007-11-27remove drawable from hash table when window is deleted (see bug 13091)WuNian
2007-11-06Fix compilation for !GLX_DIRECT_RENDERING.Kristian Høgsberg
2007-11-06Remove a couple of "deprecated" fields from __GLXcontextRec.Kristian Høgsberg
The __GLXcontextRec struct is internal to the libGL implementation. No point in "deprecating", just get rid of it.
2007-11-06Pass the visual id to XF86DRICreateContextWithConfig(), not fbconfig id.Kristian Høgsberg
2007-11-05Lookup visual in visual list, not fbconfig list.Kristian Høgsberg
Also, handle visual not found error case by throwing X error.
2007-10-29Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesaJesse Barnes
2007-10-29Refactor and fix core vblank supportJesse Barnes
Consolidate support for synchronizing to and retrieving vblank counters. Also fix the core vblank code to return monotonic MSC counters, which are required by some GLX extensions. Adding support for multiple pipes to a low level driver is fairly easy, the Intel 965 driver provides simple example code (see intel_buffers.c:intelWindowMoved()). The new code bumps the media stream counter extension version to 2 and adds a new getDrawableMSC callback. This callback takes a drawablePrivate pointer, which is used to calculate the MSC value seen by clients based on the actual vblank counter(s) returned from the kernel. The new drawable private fields are as follows: - vblSeq - used for tracking vblank counts for buffer swapping - vblFlags - flags (e.g. current pipe), updated by low level driver - msc_base - MSC counter from the last time the current pipe changed - vblank_base - kernel DRM vblank counter from the last time the pipe changed Using the above variables, the core vblank code (in vblank.c) can calculate a monotonic MSC value. The low level DRI drivers are responsible for updating the current pipe (by setting VBLANK_FLAG_SECONDARY for example in vblFlags) along with msc_base and vblank_base whenever the pipe associated with a given drawable changes (again, see intelWindowMoved for an example of this). Drivers should fill in the GetDrawableMSC DriverAPIRec field to point to driDrawableGetMSC32 and add code for pipe switching as outlined above to fully support the new scheme.
2007-10-29Remember to call XSync() before resetting X error handler.Chris Rankin
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-15Dont add fbconfigs to array that we didn't allocate for.Kristian Høgsberg
2007-10-11Convert a left-over private void * to __DRIcontext *.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
2007-10-10Convert all DRI entrypoints to take pointers to __DRI* types.Kristian Høgsberg
The entrypoints take a mix of __DRIscreen * and void * (screen private) arguments (similarly for contexts and drawables). This patch does away with passing the private void pointer and always only passes the fully typed __DRIscreen pointer and always as the first argument. This makes the interface more consistent and increases type safety, and catches a bug where we would pass a screen private to DRIdrawable::getSBC.
2007-10-10Drop mostly unused __DRIid typedef.Kristian Høgsberg
2007-10-10Avoid deadlock in GarbageCollectDRIDrawables.Kristian Høgsberg
__glXinitialize() can't be called with the GLX lock held. Just pass in the __GLXscreenConfigs pointer so we don't have to look it up in __GLXdisplayPrivate.
2007-10-10Drop createContext and destroyContext from DRIinterfaceMethods.Kristian Høgsberg
As for createDrawable and destroyDrawable, these functions immediately upon entry to driCreateNewContext and immediately before exit from driDestroyContext. Instead of passing function pointers back and forth just obtain the drm_context_t prior to calling DRIscreen::createNewContext and pass it as a parameter. This change also lets us keep the DRI context XID in the libGL loader only.
2007-10-10Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.Kristian Høgsberg
All the DRI driver did was call the createDrawable callback immediately upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t. We can just call that before calling into the DRI driver and pass the returned drm_drawable_t as an argument to the DRI entry point. Likewise for destroyDrawable. Also, DRIdrawablePrivate::draw isn't used anywhere, and since the driver no longer needs the XID of the drawable we can now drop that.
2007-10-10Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.Kristian Høgsberg
Many DRI entry points took a __DRInativeDisplay pointer and a screen index as arguments. The only use for the native display pointer was to pass it back to the loader when looking up the __DRIscreen for the given screen index. Instead, let's just pass in the __DRIscreen pointer directly, which let's drop the __DRInativeDisplay type and the getScreen function. The assumption is now that the loader will be able to retrieve context from the __DRIscreen pointer when necessary.
2007-10-05Remove XIDs from DRI interface (see #5714).Kristian Høgsberg
2007-01-05Add reporting of damage by DRI drivers when the extension support is available.Eric Anholt
With this, tools like ximagesrc in gstreamer correctly see updates from GL rendering. Support requires that the Xdamage library be current (but will be disabled if not present) plus a new X Server with support for the new XDamagePost request. libGL now has a new interface version, and also links against libXdamage and libXfixes to support it, but backwards compatibility is retained. Currently, all drivers report damage at SwapBuffers time through common code -- front buffer rendering doesn't result in damage being reported. Also, the damage is against the root window, as our drivers don't yet render to backing store when they should (composited environments).
2006-08-30Add missing parenthesis so that glXSwapIntervalSGI protocol isIan Romanick
correctly generated.
2006-08-29Clean up GLX function exports.Ian Romanick
Make functions for the following extensions only accessable via glXGetProcAddress: - GLX_EXT_texture_from_pixmap - GLX_MESA_copy_sub_buffer - GLX_MESA_release_buffers - GLX_MESA_swap_control - GLX_MESA_swap_frame_usage - GLX_OML_sync_control - GLX_SGI_make_current_read - GLX_SGI_swap_control - GLX_SGI_video_sync - GLX_SGIX_swap_barrier - GLX_SGIX_swap_group Removed all remnants of the following extensions: - GLX_MESA_set_3dfx_mode - GLX_SGI_cushion - GLX_SGIX_dmbuffer - GLX_SGIX_video_resize - GLX_SGIX_video_source - GLX_SUN_get_transparent_index -
2006-05-01Update function signatures for EXT_tfp entrypoints.Adam Jackson