aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_context.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove CVS keywords.Keith Whitwell2008-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-picked from gallium-0.1 Conflicts: src/glu/sgi/libnurbs/interface/bezierEval.h src/glu/sgi/libnurbs/interface/bezierPatch.h src/glu/sgi/libnurbs/interface/bezierPatchMesh.h src/glu/sgi/libnurbs/internals/dataTransform.h src/glu/sgi/libnurbs/internals/displaymode.h src/glu/sgi/libnurbs/internals/sorter.h src/glu/sgi/libnurbs/nurbtess/definitions.h src/glu/sgi/libnurbs/nurbtess/directedLine.h src/glu/sgi/libnurbs/nurbtess/gridWrap.h src/glu/sgi/libnurbs/nurbtess/monoChain.h src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h src/glu/sgi/libnurbs/nurbtess/partitionX.h src/glu/sgi/libnurbs/nurbtess/partitionY.h src/glu/sgi/libnurbs/nurbtess/polyDBG.h src/glu/sgi/libnurbs/nurbtess/polyUtil.h src/glu/sgi/libnurbs/nurbtess/primitiveStream.h src/glu/sgi/libnurbs/nurbtess/quicksort.h src/glu/sgi/libnurbs/nurbtess/rectBlock.h src/glu/sgi/libnurbs/nurbtess/sampleComp.h src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h src/glu/sgi/libnurbs/nurbtess/sampledLine.h src/glu/sgi/libnurbs/nurbtess/searchTree.h src/glu/sgi/libnurbs/nurbtess/zlassert.h src/glu/sgi/libutil/error.c src/glu/sgi/libutil/glue.c src/glu/sgi/libutil/gluint.h src/glu/sgi/libutil/project.c src/glu/sgi/libutil/registry.c src/glx/x11/glxclient.h src/glx/x11/glxext.c src/mesa/drivers/dri/ffb/ffb_dd.h src/mesa/drivers/dri/ffb/ffb_points.h src/mesa/drivers/dri/gamma/gamma_context.h src/mesa/drivers/dri/gamma/gamma_macros.h src/mesa/drivers/dri/i810/i810context.h src/mesa/drivers/dri/r128/r128_dd.h src/mesa/drivers/dri/tdfx/tdfx_dd.h
* Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg2008-02-291-1/+1
| | | | | | | 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.
* More vblank cleanups.Michel Dänzer2007-10-301-8/+8
| | | | | | | | * 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.
* Refactor and fix core vblank supportJesse Barnes2007-10-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg2007-10-101-4/+4
|
* Fix-up #includes to remove some -I options.Brian2007-09-111-8/+9
| | | | eg: #include "shader/program.h" and remove -I$(TOP)/src/mesa/program
* bring over recent radeonMakeCurrent fixes for r300 to radeon/r200Roland Scheidegger2007-05-121-1/+1
|
* enable ARB_vertex_buffer_object for more dri driversRoland Scheidegger2007-03-131-0/+2
| | | | | | | ARB_vertex_buffer_object looks like a useful extension even for old chips. The drivers should not need any code to be able to use this extension since they just use mesa's vbo code anyway. Newly enabled for i810, mach64, mga, r128, radeon, savage, sis and unichrome.
* radeon: Adapt cliprect fixes from r300.Alan Swanson2007-03-121-4/+6
|
* Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa ↵Keith Whitwell2007-01-161-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into vbo-0.2 Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
| * Remove unnecessary setting of GetBufferSize to NULL.Ian Romanick2006-11-091-1/+0
| |
* | remove vtxfmt code, switch over to vboKeith Whitwell2006-10-311-21/+5
|/
* Enable GLX_SGI_make_current_read for radeon.Ian Romanick2006-10-181-19/+11
| | | | | | | | | | | | | | 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).
* Remove Driver.ResizeBuffers = _mesa_resize_framebuffer lines.Brian Paul2006-10-151-1/+0
| | | | | This is already done by the preceeding call to _mesa_init_driver_functions() which plugs in default functions like that.
* Make driDrawableInitVBlank() initialize the sequence number.Michel Dänzer2006-09-281-1/+2
| | | | | This prevents the first wait for vertical blank from timing out when the X server has been running for a long time.
* remove code to deal with non-normalized texture coordinates for tex rect ↵Roland Scheidegger2006-09-101-5/+0
| | | | targets (swtcl tex coord translation stage, tcl tex matrix adaption) and use the chip's native handling of such coords instead (!!!). Seems noone noticed those bits in the se_coord_fmt reg, even though it works fairly similar to r200 (except it's set per-unit and always active, so only enable it for texture rectangles).
* Destroy the GL context after driDestroyTextureHeap, because the driver'sEric Anholt2006-04-091-4/+4
| | | | DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
* switch to card_type rather than IsPCI, doesn't change any functionality yetDave Airlie2006-04-041-1/+1
|
* Dave Reveman's patch for GLX_MESA_copy_sub_buffer supportBrian Paul2006-03-311-1/+26
|
* make allow_large_textures 1 by default for radeon and r200, and consequently ↵Roland Scheidegger2006-03-271-1/+1
| | | | enable all texture units by default on those cards (3 for radeon, 6 for r200). Fix the usually forgotten DRIVER_DATE accordingly.
* replace the texture level hack used in radeon/r200 to allow larger textures ↵Roland Scheidegger2006-02-031-10/+8
| | | | with different methods to calculate the announced maximum texture sizes. Default is still the same (that is, radeon/r200 default to not announce anything which might not fit, i830/i915 default to 1 texture must fit). Bug #5785.
* cube maps on r100 require newer drm than the same feature on r200 ↵Roland Scheidegger2006-01-071-1/+1
| | | | (regression from introducing unfied initialization). Fix wrong (so far unused) family assignment for r100 cards.
* First step of Radeon DRI unification:Eric Anholt2005-11-021-4/+4
| | | | | | | | | | | | - Makes all three drivers use the same screen structure and setup code, with a few ifdefs for the separate compilation to deal with symbols not being available to all drivers and the fact that we have no mechanism for dealing with different config options for different chip families in the same driver. These issues should be dealt with later. - Introduces IS_R[123]00_CLASS(radeonScreenPtr) macro for code for taking different paths depending on the general class of chipset. - Adds many new R300-class PCI IDs, though not all those listed in radeon_driver.c.
* add GL_EXT_fog_coord support to radeon driver. No vtxfmt code (just uses ↵Roland Scheidegger2005-10-171-0/+5
| | | | fallback) yet. May cause a tcl fallback if fog coord is used together with separate specular lighting. Fog factors are precomputed and then submitted instead of the raw coords (chip limitation, same as on r200).
* enable cube maps on radeon (#2241 on bugzilla). No vtxfmt code yet (just ↵Roland Scheidegger2005-10-151-2/+4
| | | | generates vfmt fallback). Code by Andreas Stenglein, some small adjustments by me.
* enable 3rd texture unit on radeon (default still 2 enabled units). Disable ↵Roland Scheidegger2005-10-131-12/+11
| | | | 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.)
* Remove the tcl fallback for texture rectangle (by manipulating the texture ↵Roland Scheidegger2005-10-051-2/+4
| | | | 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.
* updated commentBrian Paul2005-09-141-2/+4
|
* Finish up some of the gl_renderbuffer work.Brian Paul2005-09-011-1/+1
| | | | | | | 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.
* Major rip-up of internal function insertion interface. The oldmesa_6_3_1Ian Romanick2005-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | _glapi_add_entrypoint has been replaced by a new routine called _glapi_add_dispatch. This new routine dynamically assignes dispatch offsets to functions added. This allows IHVs to add support for extension functions that do not have assigned dispatch offsets. It also means that a driver has no idea what offset will be assigned to a function. The vast majority of the changes in this commit account for that. An additional table, driDispatchRemapTable, is added. Functions not in the Linux OpenGL ABI (i.e., anything not in GL 1.2 + ARB_multitexture) has a fixed offset in this new table. The entry in this table specifies the offset in of the function in the real dispatch table. The internal interface was also bumped from version 20050725 to 20050727. This has been tested with various programs in progs/demos on: radeon (Radeon Mobility M6) r128 (Rage 128 Pro) mga (G400)
* Fixes the glXGetProcAddress portion of the interface. Most of the functionsIan Romanick2005-07-261-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* Replace add_newer_entrypoints (src/mesa/main/context.c) withIan Romanick2005-06-301-26/+32
| | | | | | | | | | | | | | | device-specific code. A new Python script (src/mesa/glapi/extension_helper.py) generates a list of all entry-points for all known extensions. Each driver the selects only the extensions that it needs and enables the via either driInitExtensions or driInitSingleExtension. This code has been compile-tested on a drivers, but has only been run-tested on mga and i915 (on i830 hardware). These changes were discussed at length on the mesa3d-dev mailing list. http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
* Bugzilla #2195: Convert the radeon driver to the t_vertex interface. This cutsEric Anholt2005-05-311-1/+1
| | | | | | | | | 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 <[email protected]>
* Major check-in of changes for GL_EXT_framebuffer_object extension.Brian Paul2005-05-041-6/+7
| | | | | | | Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
* remove one of the two _tnl_isolate_materials function callsRoland Scheidegger2005-03-051-6/+0
|
* Add a dri config option to enable the max texture level hackDave Airlie2005-02-261-0/+7
| | | | make ycbcr depend on a CHIPSET define .. needs to be filled in though
* s/0/NULL/ (Jeff Muizelaar)Brian Paul2005-02-161-3/+3
|
* remove accidentally commited printf for tiling supportRoland Scheidegger2005-02-141-1/+0
|
* add texture micro and macro tiling to radeon/r200 driver. This can improve ↵Roland Scheidegger2005-02-101-0/+4
| | | | 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.
* add sync debugging to the radeon driverDave Airlie2005-01-231-0/+1
|
* (Stephane Marchesin, me) add hyperz support to radeon and r200 drivers. Only ↵Roland Scheidegger2004-12-081-1/+9
| | | | 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.
* enable GL_EXT_stencil_wrap (patch from idr), including some hacks for ↵Roland Scheidegger2004-12-031-0/+1
| | | | original radeons which have some broken stencil ops.
* Remove _mesa_ResizeBuffersMESA() call from _mesa_set_viewport().Brian Paul2004-11-271-5/+0
| | | | | | | | Now, the driver's Viewport routine should call _mesa_ResizeBuffersMESA() if necessary. Cleaned up code related to GLframebuffer width/height initialization. Set initial viewport/scissor params in _mesa_make_current2(), instead of in the drivers' MakeCurrent functions.
* Add Roland Scheidegger's S3TC patch. This patch does not implement theEric Anholt2004-10-071-1/+8
| | | | | | | | | | | | | | | | | (patented) S3TC/DXTC algorithms, but adds an option to dlopen a library module providing functions to do so. Because it uses dlopen, it is only enabled if USE_EXTERNAL_DXTN_LIB=1 is defined (which is only in linux-dri config, so far). It adds support for S3TC to several DRI drivers, and adds a DRI config option to force enabling S3TC even if the software compression/decompression is unavailable. This may allow people to use apps that require S3TC even though they don't have a license to implement the patented material themselves, if those apps use precompressed textures. Ideally we would get permission from the current holder of the patents to implement the algorithm in Mesa, at which point the dlopen mess could go away. Until then, this allows some to run applications they couldn't otherwise, and hopefully will provide us with more push to get the final step of getting that permission done.
* OK, one more time. Simplify the state-backup system by just storing the fullEric Anholt2004-09-301-1/+1
| | | | | | | | | 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
* The previous code would emit a full set of state during the first EmitState onEric Anholt2004-09-251-2/+2
| | | | | | | | | | | | 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
* Patch removes _SOLO definition needed for mesa-solo. mesa-soloJon Smirl2004-07-041-5/+1
| | | | | uses the NEW_INTERFACE now so _SOLO isn't necessary anymore. Tested with the hardware that I own.
* add support for GL_ARB_texture_env_crossbarRoland Scheidegger2004-06-011-0/+1
|
* Adjustments to make everything use IOCTL/sarea defines in DRM insteadJon Smirl2004-03-111-3/+3
| | | | of glx/mini. removes glx/mini/drm.h glx/mini/sarea.h
* Only print message about disabling HW TCL if the chip supports it in theMichel Dänzer2004-02-281-4/+6
| | | | | | first place, and make the message a bit clearer. + Remove some extraneous whitespace.