summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
AgeCommit message (Collapse)Author
2008-03-03[dri2] Optimize event parsing to skip obsolete events.Kristian Høgsberg
This also fixes the problem where the X server does multiple resizes before the DRI driver gets the events. The obsolete buffer attach events then reference already destroyed buffer objects.
2008-02-29Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg
Instead of passing in a fixed struct, the loader now passes in a list of __DRIextension structs, to advertise the functionality it can provide to the driver. Each extension is individually versioned and can be extended or phased out as the interface develops.
2008-02-29Reduce the versioning madness required to create a DRI2 screen.Kristian Høgsberg
Right now the DRI2 screen constructor takes 3 different versions: DRI, DDX and DRM. This is mostly useless, though: DRI: The DRI driver doesn't actually care about the DRI protocol, it only talks to the loader, which in turn speaks DRI protocol. Thus, the DRI protocol version is of not interest to the DRI driver, but it needs to know what functionality the loader provides. At this point that's reflected in the __DRIinterfaceMethods struct and the internal_version integer. DDX: The DDX version number is essentially used to track extensions to the SAREA. With DRI2 the SAREA consists of a number of versioned, self-describing blocks, so the DDX version is no longer interesting. DRM: We have the fd, lets just ask the kernel ourselves.
2008-02-25A few more fixes to the dlsym() fix.Kristian Høgsberg
Argh, seriously, I did test that, I just forgot to amend the commit before pushing.
2008-02-26dri2: dlsym requires some quotes..Dave Airlie
2008-02-25Use dlsym() to avoid referencing __dri2DriverInitScreen.Kristian Høgsberg
Sort-of a stop-gap workaround. There are a couple of nicer ways to do this that doesn't require dlfcn.h, but they're more invasive.
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.
2008-02-25Remove now unused setTexOffset from __DriverAPIRec.Kristian Høgsberg
2008-02-15[intel] Bug #13636: Allow recursive buffer mapping in bufmgr_ttm.Eric Anholt
2008-02-14Add new DRI2 infrastructure.Kristian Høgsberg
2008-02-13When mapping, wait on the buffer's fence, not hardware idle, in bufmgr_fakeEric Anholt
2008-02-13Remove O(n^2) debugging code from non-debug path of dri_bufmgr_fake.Eric Anholt
2008-01-24Bufmgr cleanup from intel-batchbuffer branch of 2d driver.Eric Anholt
2008-01-18[intel] Fix memory leak with fake bufmgr.Eric Anholt
2008-01-09Fold DoBindContext() helper function into driBindContext().Kristian Høgsberg
2008-01-03[intel] Convert relocations to not be cleared out on buffer submit.Eric Anholt
We have two consumers of relocations. One is static state buffers, which want the same relocation every time. The other is the batchbuffer, which gets thrown out immediately after submit. This lets us reduce repeated computation for static state buffers, and clean up the code by moving relocations nearer to where the state buffer is computed.
2007-12-21Silence compiler warnings from XML error macros.Kristian Høgsberg
2007-12-14[intel] Initialize debug flag for dri_bufmgrsEric Anholt
2007-12-13[intel] Remove broken mutex protection from dri_bufmgrs.Eric Anholt
Now that the dri_bufmgr is stored in the context rather than the screen, all access to one is single-threaded anyway.
2007-12-13[intel] Enable INTEL_DEBUG=bufmgr output in TTM mode as well as classic.Eric Anholt
2007-12-13[intel] assert that buffers are not mapped at last unreference.Eric Anholt
bufmgr_fake doesn't care about it, but with ttm we would end up with the buffer remaining referenced until application exit.
2007-12-12[intel] Assert against conflicting relocation emits in bufmgr_fake.cEric Anholt
2007-12-07[965] Convert the driver to dri_bufmgr interface and enable TTM.Eric Anholt
This is currently believed to work but be a significant performance loss. Performance recovery should be soon to follow. The dri_bo_fake_disable_backing_store() call was added to allow backing store disable like bufmgr_fake.c did, which is a significant performance win (though it's missing the no-fence-subdata part). This commit is a squash merge of the 965-ttm branch, which had some history I wanted to avoid pulling due to noisiness and brokenness at many points for git-bisecting.
2007-12-05Don't Swap buffer if a DRIDrawable is entirely obscuredXiang, Haihao
by another window.
2007-11-30[intel] Move batch bo_unmap from TTM code to shared, and add more asserts.Eric Anholt
2007-11-30[intel] Fix the type and naming of the flags/mask args to TTM functions.Eric Anholt
The uint64_t flags (as defined by drm.h) were being used as unsigned ints in many places.
2007-11-29[i915] Make INTEL_DEBUG=bufmgr actually do things for bufmgr_fake.Eric Anholt
2007-11-16[intel] Add some doxygen notes on what the bufmgr_fake block members mean.Eric Anholt
2007-11-16[intel] Add a simple relocation cache to the fake buffer manager.Eric Anholt
This is required for 965 performance, as it avoids a lot of repeated data uploads of the state caches due to surface offsets in them.
2007-11-16[intel] Assert against 0-sized buffers in dri_bufmgr_fake.c.Eric Anholt
They shouldn't be created, and this often helps catch stupid issues.
2007-11-16[intel] Add support for multiple levels of relocation in bufmgr_fake.Eric Anholt
This is required for 965 support, which has relocations in other places than just the batchbuffer.
2007-11-09recreate from changed gl_API.xmlRoland Scheidegger
2007-11-01i915: make i915 use the cached mappings for batch/buffer objects.Dave Airlie
This should restore gears speed on 9xx hardware
2007-10-30Alias glStencilOpSeparateATI with glStencilOpSeparate.Brian
2007-10-30Finish up ATI_separate_stencilBrian
Add entrypoints to glapi XML file and regenerate files. Implement glStencilOpSeparateATI(). Consolidate some code in stencil.c
2007-10-30More vblank cleanups.Michel Dänzer
* Fix crash at context creation in most drivers supporting vblank. * Don't pass vblank sequence or flags to functions that get passed the drawable private already. * Attempt to initialize vblank related drawable private fields just once per drawable. May need more work in some drivers.
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-12Merge branch 'dri2'Kristian Høgsberg
Conflicts: src/mesa/drivers/dri/i915/intel_screen.c
2007-10-12dri: remove ttm common code since superioctl is device specificDave Airlie
2007-10-11Add a version field to __DRIextension.Kristian Høgsberg
2007-10-11Move new texOffset extension to the new extension mechanism.Kristian Høgsberg
2007-10-11Convert a left-over private void * to __DRIcontext *.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-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-10Implement new screen extension API.Kristian Høgsberg
This new API lets the loader examine DRI level extensions provided by the driver in a forward compatible manner. Much of the churn in the DRI interface is adding support for new extensions or removing old, unused extensions. This new extension mechanism lets the loader query the extensions provided by the driver and implement the extensions it knows about. Deprecating extensions is done by not exporting that extension in the list, which doesn't require keeping old function pointers around to preserve ABI.
2007-10-10Stop passing in unused fbconfigs to createNewScreen.Kristian Høgsberg
2007-10-10Pull createNewScreen entry point into dri_util.c.Kristian Høgsberg
This pulls the top level createNewScreen entry point out of the drivers and rewrites __driUtilCreateNewScreen in dri_util.c to be the new entry point. The change moves more logic into the common/ layer and changes the createNewScreen entry point to only be defined in one place.