aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga/mgacontext.h
Commit message (Collapse)AuthorAgeFilesLines
* Refactor and fix core vblank supportJesse Barnes2007-10-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Get DRI drawable from framebuffer object.Ian Romanick2006-10-301-7/+0
| | | | | | | | | | In the software rasterization fallbacks, get the __DRIdrawablePrivate pointer from the driRenderbuffer that is passed in. This eliminates the need for the mesa_drawable pointer in MGA context structure. This partially fixes bug #8799. wincopy no longer produces a black window for the destination window, but it does produce incorrect results if the destination window is resized.
* Fixes the glXGetProcAddress portion of the interface. Most of the functionsIan Romanick2005-07-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that are currently obtained via glXGetProcAddress and all of the XF86DRI functions are replaced with a funciton table. This table will be passed to __driCreateNewScreen. One of the functions in the table is getProcAddress. This allows some loaders to expose functionality not in all loaders. This will be immediatly used for glxEnableExtension (formerly known to drivers as __glXScrEnableExtension). libGL (and in the future libglx) expose this function so that drivers can enable GLX extensions. libEGL should exposed eglEnableExtension to enable EGL extensions. The same function cannot be used for both because the extensions have different names and (possibly) different semantics. Drivers can optionally use one, both, or neither. The key parts are in the __DRIinterfaceMethodsRec structure in dri_interface.h. A pointer to one of these structures is passed into __driCreateNewScreen. Because of this, the version of the API is bumped to 20050725. Since the previous version(s) were never in a release, their existance is erased. I was actually a little surprised by how much code this cuts from the drivers. A lot of glXGetProcAddress calls disappear, and a lot of version checks go with them. Nice. The one thing I'm not sure of is removing __glXInitialize. For some reason that function was in the glXGetProcAddress table, but *nothing* in the Mesa tree used it. Did something with DRI conf. use this function? It seems odd...
* Adds support for MGA DRM version 3.2.Ian Romanick2005-06-141-0/+3
| | | | | | | | | | | | | | | This patch makes use of two of the new ioctls added in MGA DRM version 3.2. Specifically, the DRM_MGA_SET_FENCE and DRM_MGA_WAIT_FENCE ioctls are used in mgaWaitForFrameCompletion. As a result the MMIO register region and the primary DMA region are *not* mapped (if DRM 3.2 is available). This patch does *not* make use of the new get_param query was added to differentiate between G4x0 cards and G550 cards. That is left to a future update. Xorg bug: 3259 Reviewed by: Eric Anholt
* Add the no_rast debug option, which I used in some testing.Eric Anholt2005-05-301-0/+1
|
* Replace drmHandle, drmContext, drmDrawable, drmMagic and related types withIan Romanick2004-06-021-1/+1
| | | | drm_handle_t, drm_context_t, drm_drawable_t, drm_magic_t.
* bring over build fixes from stable branchAlan Hourihane2004-04-261-1/+0
|
* Adjust includes to help DRI buildJon Smirl2004-03-121-1/+2
|
* Adjust mga drivers to remove redundant h file for sarea and IOCTLsJon Smirl2004-03-121-4/+4
|
* Adjustments to make everything use IOCTL/sarea defines in DRM insteadJon Smirl2004-03-111-5/+5
| | | | of glx/mini. removes glx/mini/drm.h glx/mini/sarea.h
* Silence some compiler warnings.Ian Romanick2004-01-211-2/+2
|
* Updates to tnl_dd_dmatmp.hKeith Whitwell2003-12-111-6/+0
| | | | | | | | | | | | | | - Allocate vertices explicitly, rather than trying to talk about dma buffers. - Clean up the various Flush() operations. - Don't allow fallbacks any longer. Provide a support function to detect them ahead o ftime Updates to tnl_dd_vbtmp.h - Get rid of power-of-two vertex strides. Pack all vertices tightly. - Get texunit 2,3 emit working coorrectly. Other stuff: - Get rid of lingering Ubyte color support. - Fix a few compiler warnings.
* bring over latest mga DRI driver from DRI trunkAlan Hourihane2003-12-051-13/+23
|
* Update DRI drivers to current DRI CVS and make them work.Jon Smirl2003-10-211-4/+16
|
* patch to import Jon Smirl's work from BitkeeperBrian Paul2003-08-221-74/+119
|
* mga driver, brought over by Jon SmirlKeith Whitwell2003-08-061-0/+309