Commit Graph

25 Commits

Author SHA1 Message Date
Kristian Høgsberg
180b41594c DRI2: Drop DriverAPI.UpdateBuffer.
__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.
2008-03-09 21:22:49 -04:00
Eric Anholt
fe91c05b54 [intel] Add a driconf option to cache freed buffer objects for reuse.
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.
2008-03-05 16:29:14 -08:00
Kristian Høgsberg
6cb3f5c4d8 Use __DRIextension mechanism providing loader functionality to the driver.
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-29 15:05:39 -05:00
Kristian Høgsberg
16242a8007 Reduce the versioning madness required to create a DRI2 screen.
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-29 15:05:39 -05:00
Kristian Høgsberg
60c0f09abb intel: Always use intelInitExtensions() for initializing extensions. 2008-02-27 11:24:29 -05:00
Kristian Høgsberg
6e8d21d72f Remove GetMSC DriverAPI function.
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-25 19:02:06 -05:00
Kristian Høgsberg
b49a8f805a Remove now unused setTexOffset from __DriverAPIRec. 2008-02-25 19:02:06 -05:00
Alan Hourihane
1c718c0d78 Use drm_i915_sarea instead of drmI830Sarea and remove i830_common.h 2008-02-22 00:20:27 +00:00
Eric Anholt
19420e6c25 [915] Revert broken context creation change from IS_915 commit.
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.
2008-02-15 13:18:09 -08:00
Adam Jackson
cf0d91ae1d Add IS_915(), simplify IS_9XX() a bit. 2008-02-15 14:52:58 -05:00
Kristian Høgsberg
6d48779c7e Add TTM buffer object based texture from pixmap implementation.
Currently only implemented for intel hw.
2008-02-14 22:12:51 -05:00
Kristian Høgsberg
c5c73c1b60 Hook up i915 driver to new DRI2 infrastructure. 2008-02-14 17:56:44 -05:00
Eric Anholt
85063f14ea [965] Fix ARB_occlusion_query from intel_screen.c merge.
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.
2008-02-13 16:08:35 -08:00
Kristian Høgsberg
46eb02b609 [intel] Clean up references to screen buffer metrics.
The screen wide info such as pitch and cpp are obsoleted by the FBO
changes, so clean up the last few references to those, except for
setting up the legacy screen regions.
2008-01-22 12:14:59 -05:00
Eric Anholt
a0e453a5ec [intel] Make the no_rast option be standard driconf instead of INTEL_NO_RAST. 2008-01-17 14:23:04 -08:00
Kristian Høgsberg
e131c46b20 [intel] Simplify intelCreateBuffer() a bit.
Drop a bunch of unused arguments from intel_create_renderbuffer() and
introduce intel_renderbuffer_set_region() to set the region for
a renderbuffer.
2008-01-09 20:43:18 -05:00
Kristian Høgsberg
24e7e45768 Factor out code to do the DRM_I830_GETPARAM ioctl. 2008-01-09 19:08:55 -05:00
Eric Anholt
bea6b5fe5a [965] Enable EXT_framebuffer_object.
To do so, merge the remainnig necessary code from the buffers, blit, span, and
screen code to shared, and replace it with those.
2007-12-20 11:32:55 -08:00
Eric Anholt
fcd1e9dad6 [i915] Move meta_draw_quad into the vtbl with other meta operations. 2007-12-20 08:19:42 -08:00
Eric Anholt
7c71ef3a3d [intel] Move bufmgr back to context instead of screen, fixing glthreads.
Putting the bufmgr in the screen is not thread-safe since the emit_reloc
changes.  It also led to a significant performance hit from pthread usage
for the attempted thread-safety (up to 12% of a cpu spent on refcounting
protection in single-threaded 965).  The motivation had been to allow
multi-context bufmgr sharing in classic mode, but it wasn't worth the cost.
2007-12-12 11:52:10 -08:00
Eric Anholt
f00a64999c [intel] Add 965 support to shared intel_blit.c
This requires that regions grow a marker of whether they are tiled or not,
because fence (surface) registers are ignored by the 965 2D engine.
2007-11-16 17:29:30 -08:00
Eric Anholt
9b461d4d02 [i915] Pass static region names in so debugging says more than "static region". 2007-11-16 16:18:30 -08:00
Eric Anholt
9724dc1ac7 [i915] Remove old frontbuffer rotation hack.
This was replaced in previous releases of xserver/dri/libGL by reporting the
damage to the frontbuffer so that the server and driver could handle it
appropriately.
2007-11-09 15:05:56 -08:00
Eric Anholt
38c616260a [intel] Initialize a depth buffer if the visual has depth 24 but no stencil. 2007-11-09 14:27:33 -08:00
Eric Anholt
77a5bcaff4 [intel] Move over files that will be shared with 965-fbo work. 2007-11-09 14:27:33 -08:00