History log of /external/mesa3d/src/mesa/drivers/dri/radeon/radeon_context.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e532b6288f01b63d8d8ba8c8dc08292967e65490 01-Dec-2011 Ian Romanick <ian.d.romanick@intel.com> dri2: Add plumbing to get context version requirements and flags to drivers

This adds support for DRI_DRI2 version 3 to all of the DRI2 drivers.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2e53f3018f69d07b885c5885a1f865339700a189 28-Oct-2011 Kristian Høgsberg <krh@bitplanet.net> dri: Remove unused dri texmem.c
53b382637ca5462b15a430abbfc070e799d70b97 14-Oct-2011 Eric Anholt <eric@anholt.net> radeon: Drop dri2 checks now that it's always true.

This makes LOCK_HARDWARE empty, so it goes away.
d3491e775fb07f891463b2185d74bbad62f3ed24 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Rename GLvisual and __GLcontextModes to struct gl_config
a7a9a91d7b28e5b5faed509d00f0f951e3136b1b 27-Apr-2010 Kristian Høgsberg <krh@bitplanet.net> dri: Add DRI entrypoints to create a context for a given API
5170d2452beafc4a6f5859792d6c6b267c549e46 19-Jan-2010 Maciej Cencora <m.cencora@gmail.com> r100: use common glCopyTex(Sub)Image code
daccc962a15f333a4759849d7088b0c985189175 19-Jan-2010 Alex Deucher <alexdeucher@gmail.com> r100: add blit support

Only enabled with KMS.
d61f07318c8678901b948fdaa8ccdf37aa3203e9 01-Jan-2010 Kristian Høgsberg <krh@bitplanet.net> Remove leftover __DRI{screen,drawable,context}Private references

As part of the DRI driver interface rewrite I merged __DRIscreenPrivate
and __DRIscreen, and likewise for __DRIdrawablePrivate and
__DRIcontextPrivate. I left typedefs in place though, to avoid renaming
all the *Private use internal to the driver. That was probably a
mistake, and it turns out a one-line find+sed combo can do the mass
rename. Better late than never.
8d8fd9776e23a34e0d22e489ce1f85eb5e383121 04-Dec-2009 Alex Deucher <alexdeucher@gmail.com> radeon: fix polygon stipple

fixes fdo bug 25354

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
7d361537661b93a501c9533271458a41b965ea79 01-Sep-2009 Dave Airlie <airlied@redhat.com> radeon: fix r100/r200 polygon stipple under kms

There really need to use state emits under kms, otherwise
we end up with some dwords in the command buffer before we've
ever emitted any useful state.

Signed-off-by: Dave Airlie <airlied@redhat.com>
4322181e6a07ecb8891c2d1ada74fd48c996a8fc 28-Aug-2009 Pauli Nieminen <suokkos@gmail.com> r100/r200: Bring back old PolygonStripple for DRI1.

DRI1 didn't have support for command buffer emit for stripple.
5484428d7267388fde868e64531dcdf98b55fafc 26-Aug-2009 Dave Airlie <airlied@linux.ie> radeon: add r100 OQ support with kms.

This adds OQ support for the r100 chipsets, it requires
KMS unless someone wants to make a kernel patch to add support
for OQ regs.
e00ef43d796f0ae0247b1072bf0aa8cdd8e3034d 02-Apr-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: collapse context destruction down to a common path.

Context destruction was nearly the same over all the drivers,
so collapse it down.
8c7e30fb950c83f5e9e29e60735e999ac608145a 23-Mar-2009 Dave Airlie <airlied@redhat.com> raedon/r200/r300: mega-FBO commits.

Re work depth issues.
Do a lot more FBO abstactions
fixup depth/stencil buffer interactions
c6ac53bc40508ab2f0b9e023eee7ec3793fdf917 06-Mar-2009 Dave Airlie <airlied@redhat.com> radeon: implement userspace clears

This is pretty much Eric Anholts implementation of clear using the GL state machine
from the Intel drivers.

It works quite well for now for us, probably could do with trying to use Z engine for
23d3559bd4ece1fcab5513ebdaa38600d6654374 12-Feb-2009 Dave Airlie <airlied@redhat.com> radeon: renaming and headers cleanup
1090d206de011a67d236d8c4ae32d2d42b2f6337 12-Feb-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: another big merge upheavel.

This merges lots of the hw state atom emission and firevertices code.

it also removes a lot of the extra radeon crap from r300

and merge scissor
3fafaf8959681cc41c988607bb6e387bab4fe1b5 08-Feb-2009 Dave Airlie <airlied@redhat.com> radeon: make more r100 work
b584b0728d3a001a142f76dde22f9e8ed7d2dd16 04-Feb-2009 Dave Airlie <airlied@redhat.com> radeon: make compile again.

Not tested but ripped out lots of stuff unneeded anymore time to test later
5ba92a5b0543b4ff2c7db6101029ba36cb9843fa 29-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: bring back old style DMA buffer on top of BOs.

this gets back a lot of the lots speed in gears on r500 at least

I also fixed the legacy bufmgr to deal when the dma space fills up
23295cf8e84495af86f62395d32b3116261927e8 14-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: consolidate swap buffers
d29e96bf33e91d071770b86d87ffc4ef4dfc2f70 13-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: attempt to move lock to common code
4637235183b80963536f2364e4d50fcb894886dd 14-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200/r300: initial attempt to convert to common context code
0217ed2cf9b0a538ca03d26b302a7cd57af7dd21 13-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200: move more stuff closer together in context
b6e486906968d82c7b8a869d7ab51697a7cce80c 13-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200: move state atom to common header
692ca82116485a9c6191e5265c5b369d5b4f82f3 13-Jan-2009 Dave Airlie <airlied@redhat.com> radeon/r200: start splitting out commonalities into separate headers
ecadb51bbcb972a79f3ed79e65a7986b9396e757 18-Sep-2008 Brian Paul <brian.paul@tungstengraphics.com> mesa: added "main/" prefix to includes, remove some -I paths from Makefile.template
5e600209f4908ece2ba8b7f880e1d7e950d2cfb4 14-Jul-2008 Chris Rankin <rankincj@yahoo.com> radeon: SetTexOffset support

This patch is a straightforward duplication of the R200 SetTexOffset code,
except that there is no big-endian tx_table[] array.
5ee7b7912c1fe7b09d13ae385088e4281b62eba6 21-Jun-2008 Brian Paul <brian.paul@tungstengraphics.com> replace __inline and __inline__ with INLINE macro
3177b4e2cf7d2fff7428cb6057bebbe60ff5cc6c 30-Oct-2007 Michel Dänzer <michel@tungstengraphics.com> More vblank cleanups.

* 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.
4d5d4e1f97bf8d5c55ef817f7a28f920accc151b 09-May-2007 Oliver McFadden <z3ro.geek@gmail.com> r300: Cleaned up radeon_context.h slightly; mostly Indent.
f697308ae583dbcdf0268e98232c32be7f25fac6 03-Feb-2007 Roland Scheidegger <sroland@tungstengraphics.com> remove now unused vtxfmt stuff from radeon/r200 header files
3beaff1e3cf227c493badfc55a69381c778b2ff7 18-Oct-2006 Ian Romanick <idr@us.ibm.com> Enable GLX_SGI_make_current_read for radeon.

Added code to track the drawable bound to the context for reading. In
addition, when a drawable is initially bound (for reading or drawing)
or when the size of the drawable changes, update the size of the
framebuffer object that back the drawable (for software fallbacks).

Deprecate the old GetBufferSize interface.

Bump the driver date.

These changes were tested with wincopy on both direct rendering and
accelerated indirect rendering (AIGLX).
bb38cadb1c5f2dc13096a091bdaf61dc3e3cfa4d 11-Apr-2006 Michal Krol <mjkrol@gmail.org> More GLSL code:
- use macros to access and modify render inputs bit-field;
- un-alias generic vertex attributes for ARB vertex calls;
(ARB code) in place of VERT_ATTRIB_MAX;
- define VERT_ATTRIB_GENERIC0..15 for un-aliased vertex
attributes for ARB_vertex_shader;
- fix generic attribute index range check in arbprogparse.c;
- interface GLSL varyings between vertex and fragment shader;
- use 64-bit optimised bitset (bitset.h) for render inputs;
f2ad1b60c0da11283b399008f491792790cea294 31-Mar-2006 Brian Paul <brian.paul@tungstengraphics.com> Dave Reveman's patch for GLX_MESA_copy_sub_buffer support
08e62a147618ac796f5e548bdaa3380342ec2a78 28-Mar-2006 Roland Scheidegger <rscheidegger@gmx.ch> fix missing *_STATECHANGE in *UpdateViewportOffset for radeon, r200 and r300 (reported by Jim Duchek). Fix some potential problems with strict-aliasing with r200 and radeon drivers in *UpdateViewportOffset, *PolygonOffset and *UpdateWindow functions (some compiler warnings about strict-aliasing remain in the codegen vertex code, and there may be more problems unnoticed by the compiler).
247f3b3e81fffa86c50531070fab573e26ffb452 16-Oct-2005 Roland Scheidegger <rscheidegger@gmx.ch> enable cube maps on radeon (#2241 on bugzilla). No vtxfmt code yet (just generates vfmt fallback). Code by Andreas Stenglein, some small adjustments by me.
30daa7529331057ecb470efb500152e9c4aa1ae5 13-Oct-2005 Roland Scheidegger <rscheidegger@gmx.ch> enable 3rd texture unit on radeon (default still 2 enabled units). Disable some multitexcoord codegen stuff noone understands to make it work. Replace most code testing explicitly for unit 0 and 1 with loops instead of adding test for unit 2, smaller/more readable code at the cost of maybe some slight performance hit. (Code provided by Andreas Stenglein, some adjustments by me.)
a3c8de2fa7fba22647e5b3e8cfb05c85d1a5a980 05-Oct-2005 Roland Scheidegger <rscheidegger@gmx.ch> Remove the tcl fallback for texture rectangle (by manipulating the texture matrix) (tested with texrect). Enable texgen for r/q coordinates (tested with projtex). Fix projected texcoords when an app uses TexCoord3x and the texture matrix to save on vertex size (fixes ut2k3 shadow projectors in tcl mode). From texgenmix, all cases with all texgen or no texgen work, with the exception of texgen enabled for s/t only, this one works with hw tcl, but not with vtxfmt (suspect issues with vtxfmt), the mixed cases do not work (which is expected, and should be rare in practice), with the exception of the first one which hits a tcl fallback.
982e8e4d5c95e9e9040b4b70d7322a2a8a9396d9 01-Sep-2005 Brian Paul <brian.paul@tungstengraphics.com> Finish up some of the gl_renderbuffer work.
Use driRenderbuffer's offset, pitch fields in the span routines.
Remove the SetBuffer driver function.
Consolidate the code for setting CTX_RB3D_COLOROFFSET and CTX_RB3D_COLORPITCH
state in new radeonUpdateDrawBuffer() function.
5f1ba3e21b62cee1a4f900a2e6964728f3eeea9b 26-Jul-2005 Ian Romanick <idr@us.ibm.com> Fixes the glXGetProcAddress portion of the interface. Most of the functions
that are currently obtained via glXGetProcAddress and all of the XF86DRI
functions are replaced with a funciton table. This table will be passed to

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...
8a1df968627de01d04f3d692fd81108ba6492c18 31-May-2005 Eric Anholt <anholt@FreeBSD.org> Bugzilla #2195: Convert the radeon driver to the t_vertex interface. This cuts
about 200 lines from the code and 25k from the binary, while matching other
drivers more closely. In the worst case (tcl_mode=0) it appears to have
a performance cost of 4.4% +/- 0.3% on quake3 (800x600 demofours, 1ghz p3,
rv200). Tested on ut2004, ut, q3, projtex.

Submitted by: Andreas Stenglein <a.stenglein@gmx.net>
4837ea30208d002bc36a836d2117f826d40c8bfa 10-Feb-2005 Roland Scheidegger <rscheidegger@gmx.ch> add texture micro and macro tiling to radeon/r200 driver. This can improve performance up to 15% in texture-intensive applications. Convert the driver to use the correct blit format and blit width instead of fixed blit format and blit width when uploading textures to make it work.
886280763c8dfa7202bdacdeacf84ced69609b98 01-Feb-2005 Adam Jackson <ajax@freedesktop.org> Bug #2428: #ifdef GLX_DIRECT_RENDERING in DRI drivers is pointless.
150ed2e43d5541556d282cae728cebeec692e07a 23-Jan-2005 Dave Airlie <airliedfreedesktop.org> add sync debugging to the radeon driver
b31b7836d6e7abf80dd4feacce333d4b1fe6e4ab 08-Dec-2004 Roland Scheidegger <rscheidegger@gmx.ch> (Stephane Marchesin, me) add hyperz support to radeon and r200 drivers. Only fast z clear and z buffer compression are supported for now, hierarchical-z is not. Still problems with multiple apps and z/stencil readback, which is why hyperz is disabled per default. Also add the new point sprite packet drm 1.13 accepts to the sanity code.
7a086dc05e665a78f7e9d069aa4fc70e844b8988 30-Sep-2004 Eric Anholt <anholt@FreeBSD.org> OK, one more time. Simplify the state-backup system by just storing the full
state in a ready-to-emit cmdbuf, which avoids the issue Nicolai Haehnle reported
where the check() could return differently during backup-and-emit than it should
have if it were called at the right time. Move the lit emission before most of
the TCL state emission on r200, which fixes neverball issues.

Tested with: r100/r200 with neverball, tuxracer, chromium, quake3, ipers
5562fe653cf88454bbf2c50f77a8b56b0dafe01b 25-Sep-2004 Eric Anholt <anholt@FreeBSD.org> The previous code would emit a full set of state during the first EmitState on
a new cmdbuf, to ensure that state wasn't lost across UNLOCK/LOCK pairs (in the
case of context switching). This was rather inefficient. Instead, after
flushing a cmdbuf, mark the state as needing to be saved on unlock. Then, at
the beginning of flushing a cmdbuf, if we actually have lost the context, go
back and emit a new cmdbuf with the full set of state, before continuing with
the cmdbuf flush. Provides a 10-15% improvement in ipers performance in my
tests, along with other apps.

Tested with: ipers, glxgears, quake3
6f3cc6a5226fd4b5d44cca91e2f76216ecaff831 17-Aug-2004 Eric Anholt <anholt@FreeBSD.org> Close some races with locking on R100 and R200 which could manifest as rendering
errors on r100 and rendering errors and hangs on r200 (same for R100 without

If a command buffer filled after some state (EmitState or a VBPNTR write) was
emitted, the lock was grabbed, the buffer flushed, a new buffer prepared, and
the lock dropped. Another client could come in, set its own state as part of
rendering, and when the first client flushed the rendering commands depending
on the previous state, it got the 2nd client's state. This is fixed by checking
for enough space before beginning a set of state emits and rendering, and
flushing the buffer first if so. This guarantees that the buffer won't wrap.

Also, move the "lost_context = 1" from the end of cmdbuf flushing to
UNLOCK_HARDWARE for clarity (at a minimum) that any time the lock is dropped,
state may get overwritten. We don't have enough information at the point of the
LOCK_HARDWARE to reset our state to the last UNLOCK_HARDWARE point in the case
that we did lose our context, but saving the information to rebuild that state
may be a useful optimization (ipers data suggests up to 5%).
c06b25594e5effe34a90c067e1a3da0f61cf2b13 02-Jun-2004 Ian Romanick <idr@us.ibm.com> Replace drmHandle, drmContext, drmDrawable, drmMagic and related types with
drm_handle_t, drm_context_t, drm_drawable_t, drm_magic_t.
462183fe4cb6df6d90632d9e2cee881c8d26b1cb 26-Apr-2004 Alan Hourihane <alanh@tungstengraphics.com> bring over build fixes from stable branch
6ddfdff659196cf4eeb0e5fed70ddd1ced0d16fc 12-Mar-2004 Jon Smirl <jonsmirl@gmail.com> Adjust includes to help DRI build
ae4a1cc0666860bf5cc37a5cb549afc9aa5448b0 11-Mar-2004 Jon Smirl <jonsmirl@gmail.com> Adjustments to make everything use IOCTL/sarea defines in DRM instead
of glx/mini. removes glx/mini/drm.h glx/mini/sarea.h
5d00e131d8a264498b8d050c3eded093ee5c42f2 23-Jan-2004 Michel Dänzer <michel@daenzer.net> Fix attenuation hardware state handling, inspired by the R200 DDK reference
driver (our r200 driver basically didn't do this at all, maybe got lost
along the way?)
afa446db83ecf5dcb38ce46648fb12911628de32 21-Jan-2004 Ian Romanick <idr@us.ibm.com> Silence some compiler warnings.
d3fd7ba8af15bead2f770d68a893449adeb11397 20-Jan-2004 Brian Paul <brian.paul@tungstengraphics.com> Before calling _mesa_create_context(), initialize a dd_function_table struct
by calling _mesa_init_driver_functions() and then plugging in the driver-
specific functions.
In particular, make sure ctx->Driver.NewTextureObject points to the
appropriate driver function so that _all_ texture objects are augmented
with the driver-specific data.
Put in a bunch of assertions in the texture-related driver functions that
texObj->DriverData is valid. Remove old dead code in near future.
22d1acf2ee25280c3294c2cfded232e612ffac2e 04-Jan-2004 Felix Kuehling <fxkuehl@gmx.de> New, less expensive workaround for state-change lockups.
99ef0a03292e7dc6aa2465aaaa620f394d2c286b 08-Dec-2003 Alan Hourihane <alanh@tungstengraphics.com> merge some more of the radeon DRI driver from the DRI trunk
d907a75498360fb96ec2314bb0abb105be74d500 05-Dec-2003 Alan Hourihane <alanh@tungstengraphics.com> xmlconfig fixes
57c9814b9e87924696df4c741861c29d4236d1eb 24-Nov-2003 Keith Whitwell <keith@tungstengraphics.com> Import vtx-0-2-branch
bcc6eddd335e97d49ed2ef3a1440f94d58dce12d 21-Oct-2003 Jon Smirl <jonsmirl@gmail.com> Update DRI drivers to current DRI CVS and make them work.
5df82c82bd53db90eb72c5aad4dd20cf6f1116b1 22-Aug-2003 Brian Paul <brian.paul@tungstengraphics.com> patch to import Jon Smirl's work from Bitkeeper