aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
Commit message (Collapse)AuthorAgeFilesLines
* i965: initial attempt at fixing the aperture overflowDave Airlie2008-04-181-0/+8
| | | | | | | | | Makes state emission into a 2 phase, prepare sets things up and accounts the size of all referenced buffer objects. The emit stage then actually does the batchbuffer touching for emitting the objects. There is an assert in dri_emit_reloc if a reloc occurs for a buffer that hasn't been accounted yet.
* intel/fake_bufmgr: Attempt to restrict references to objects in a ↵Dave Airlie2008-04-163-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | batchbuffer > aperture size. So with compiz on Intel hw with fake bufmgr, opening 4 firefox windows at 1680x1050 and hitting alt-tab, could cause the batchbuffer to try and reference more than the 32MB of RAM allocated. Fix 1: Fix 1 is to pre-verify the list of buffers against the current batchbuffer and if it can't possibly fit in the aperture to flush the batchbuffer to the hardware and try again. If the buffers still can't fit well then you are hosed as I'm not sure there is a nice way to tell anyone. Fix 2: Next problem was that even with a simple check for total < aperture, we ran into fragmentation issues, this meant that half way down a set of buffers, we would fail as no blocks were available. Fix this by nuking the memory manager from orbit and letting it start again and relayout the blocks in a manner that fits. Fix 3: Finally the initial problem we were seeing was a memcpy to a NULL backing store. We seem to end up with a texture at some point that never gets mapped but ends up with data in it. compiz al-tab icons have this property. So I created a card dirty bit that memcpy's any buffer that is !static and is written to back to memory. This probably is wrong but it makes compiz work for now. Caveats: 965 support is still fail.
* DRI interface changes and DRI2 direct rendering support.Kristian Høgsberg2008-03-313-115/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [intel] Use mesa texmemory functions to allocate teximage Data.Michal Wajdeczko2008-03-262-3/+5
| | | | | Failure to consistently do so resulted in mismatched aligned versus unaligned alloc/free.
* intel: fix the issue "VBO: Cannot allocate memory for a BO" onXiang, Haihao2008-03-251-0/+1
| | | | 965 after merging intel_context.c from i915 and i965. fix bug# 15152.
* [intel] Fix an uninitialized variable access in PRESUMED_OFFSET clearing.Eric Anholt2008-03-191-2/+2
| | | | | It was harmless, as the only time we need to clear PRESUMED_OFFSET, the variable had been initialized already.
* [i915] arb point sprite only support in i965Zou Nan hai2008-03-191-1/+1
|
* [intel] Clarify miptree layout by using byte offsets to images.Eric Anholt2008-03-182-12/+29
|
* intel: fix the error in commit 7ed1fd5d8438e55fe24091844cdfccb0881306bcXiang, Haihao2008-03-171-1/+1
|
* intel: It is needed to allocating texture memory to accommodateXiang, Haihao2008-03-172-25/+35
| | | | a texture when calling TexImage with pixels set to NULL pointer.
* intel: Remove an assertion from intel_miptree_create. TexImageXiang, Haihao2008-03-171-2/+4
| | | | call with zero width/height/depth matches GL spec.
* intel: fix abort issue with shadowtex demo when useXiang, Haihao2008-03-141-23/+41
| | | | DEPTH_STENCIL texture. (bug#14952).
* [i965] multiple rendering target supportZou Nan hai2008-03-132-12/+25
|
* DRI2: Make setTexBuffer take a __DRIdrawable instead of a BO handle.Kristian Høgsberg2008-03-092-18/+16
| | | | | | | | | | | | | | | | | This fixes a problem where texturing from the same Pixmap more than once per batchbuffer would hang the DRI driver. We just use the region associated with the front left renderbuffer of the __DRIdrawable for texturing, which avoids creating different regions for the same BO. This change also make GLX_EXT_texture_from_pixmap work for direct rendering, since tracking the __DRIdrawable -> BO handle now uses the standard DRI2 event buffer. Of course, DRI2 direct rendering doesn't exist yet. Finally, this commit bumps the DRI interface version again, accounting for the change in the DRI_TEX_BUFFER extension and the change in commit 0bba0e5be7a4a7275dad1edc34bdcc134ea1f424 to pass in the event buffer head index on drawable creation.
* DRI2: Drop DriverAPI.UpdateBuffer.Kristian Høgsberg2008-03-091-21/+11
| | | | | | | __dri2ParseEvents() would determine the kind of event, but then call UpdateBuffer() in either case, and UpdateBuffer() would then have to figure that out again to dispatch to HandleBufferAttach() or HandleDrawableConfig(). Pretty pointless.
* DRI2: Pass the context instead of the screen to __dri2ParseEvents().Kristian Høgsberg2008-03-091-1/+1
| | | | | | Makes a lot more sense, since the screen is always implicit in the DRI drawable, but it may not be possible to track down a context from just a drawable.
* [intel] Only enable GL_EXT_texture_sRGB on i965.Kristian Høgsberg2008-03-071-1/+1
| | | | Fixes #14799.
* i965: use RGB565 to render a bitmap if Depth is 16Xiang, Haihao2008-03-071-10/+10
|
* [intel] Add a driconf option to cache freed buffer objects for reuse.Eric Anholt2008-03-055-15/+209
| | | | | | | | | This is defaulted off as it has potentially large memory costs for a modest performance gain. Ideally we will improve DRM performance to the point where this optimization is not worth the memory cost in any case, or find some middle ground in caching only limited numbers of certain buffers. For now, this provides a modest 4% improvement in openarena on GM965 and 10% in openarena on GM945.
* [intel] Silence unused variable warning when compiling for i965.Kristian Høgsberg2008-03-031-0/+3
|
* Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg2008-02-293-8/+12
| | | | | | | 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.
* Reduce the versioning madness required to create a DRI2 screen.Kristian Høgsberg2008-02-292-16/+11
| | | | | | | | | | | | | | | | | | 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.
* intel: Set the lock flag early to avoid deadlock.Kristian Høgsberg2008-02-291-0/+1
| | | | Another regression from the intel_context.c merge.
* [intel] Bug #14575: Unmap buffers when deleting/dataing as required.Eric Anholt2008-02-281-0/+16
| | | | | Otherwise, we would assertion error when doing the final unreference of the buffer with an outstanding map (catching the memory leak).
* [intel] fix compressed image heightZou Nan hai2008-02-281-1/+1
|
* intel: Always use intelInitExtensions() for initializing extensions.Kristian Høgsberg2008-02-273-20/+17
|
* [i915] fix texture size exceed limit case when running celestiaZou Nan hai2008-02-261-1/+3
|
* [intel] Handle -EAGAINs correctly in execbuffer.Thomas Hellstrom2008-02-261-2/+17
| | | | Dont stop on fence creation errors.
* Change GetCompressedTexImage in dd_function_table to not take const pointers.Kristian Høgsberg2008-02-252-5/+4
| | | | | They're changed by the intel driver implementation and thus not const. Fixes compilation warning.
* Remove GetMSC DriverAPI function.Kristian Høgsberg2008-02-251-1/+0
| | | | | | | | | | | 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.
* Remove now unused setTexOffset from __DriverAPIRec.Kristian Høgsberg2008-02-251-3/+0
|
* intel: Only enable GL_ARB_occlusion_query on i965.Kristian Høgsberg2008-02-251-1/+3
|
* [intel] fix random ut2004 crash on some machine, for cubemap textures,Zou Nan hai2008-02-251-3/+7
| | | | | image offset is already considered when map, add it again in StoreImage may lead to wrong result and crash.
* intel: Merge intel_context.c from i915 and i965.Kristian Høgsberg2008-02-221-92/+215
|
* Merge {i915,i965}/intel_context.h as intel/intel_context.hKristian Høgsberg2008-02-224-0/+1365
|
* Use drm_i915_sarea instead of drmI830Sarea and remove i830_common.hAlan Hourihane2008-02-226-287/+30
|
* [intel] Allow attIndex to be negative to avoid defeating the >= 0 check.Eric Anholt2008-02-152-2/+2
| | | | | Otherwise, we would go wildly out of bounds if passed -1 (no renderbuffer), such as while doing LOCK_HARDWARE with glDrawBuffer(GL_NONE).
* [915] Don't attempt our accelerated drawpixels if no color buffer is attached.Eric Anholt2008-02-151-2/+3
| | | | | Otherwise, glDrawBuffer(GL_NONE); glDrawPixels() results in a segfault when we try to emit the color buffer state during setup.
* [915] Revert broken context creation change from IS_915 commit.Eric Anholt2008-02-151-2/+4
| | | | | The IS_945 case was left to fall through to the 830 case, along with the not-recognized-at-all case, making that dead code.
* Fix build on ia64.Adam Jackson2008-02-151-2/+2
|
* Add IS_915(), simplify IS_9XX() a bit.Adam Jackson2008-02-152-20/+15
|
* [intel] Bug #13636: Allow recursive buffer mapping in bufmgr_ttm.Eric Anholt2008-02-151-2/+15
|
* Add E7221 variant to i915.Adam Jackson2008-02-151-0/+2
|
* Add TTM buffer object based texture from pixmap implementation.Kristian Høgsberg2008-02-145-17/+162
| | | | Currently only implemented for intel hw.
* Hook up i915 driver to new DRI2 infrastructure.Kristian Høgsberg2008-02-145-13/+234
|
* [965] Fix ARB_occlusion_query from intel_screen.c merge.Eric Anholt2008-02-131-3/+9
| | | | | It wasn't being initialized at screen setup, so we were getting stub entrypoints even though it was exposed as enabled. Fixes arbocclude mesa demo.
* [intel] Fix 965 rendering with non-TTM by merging intel_ioctl between 915/965.Eric Anholt2008-02-131-0/+198
| | | | | | The 965 path wasn't setting pClipRects for batch submission since it didn't want kernel cliprect handling before. The 915 path also grew the INTEL_NO_HW=1 option for testing just driver overhead.
* [intel] Remove cached reloc data buffer now that it's not a BO.Eric Anholt2008-02-121-26/+4
| | | | | | It's not worth the extra effort to avoid a free/malloc, and we'd rather auto-size the reloc data buffer at some point so we don't need to have max_relocs.
* [intel] Fix type of some more flags variables for uint64_t flags.Eric Anholt2008-02-121-2/+3
| | | | Harmless since we don't yet have any bits above 31 for flags.
* [intel] Note when BO map/unmap fail with TTM.Eric Anholt2008-02-121-6/+26
|