summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_context.c
AgeCommit message (Collapse)Author
2008-04-24enable GL_EXT_multi_draw_arrays (see bug 15670)Pierre Beyssac
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.
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-10Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg
2007-05-17remove CVS/XFree86 keywordsChristoff Brill
2007-05-12bring over recent radeonMakeCurrent fixes for r300 to radeon/r200Roland Scheidegger
2007-04-16remove _tnl_arb_vertex_program_stageBrian
2007-03-12r200: Simplify r200SetCliprects like radeonSetCliprects in radeon and r300.Alan Swanson
2007-03-12r200: Adapt cliprect fixes from r300.Alan Swanson
2007-01-16Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa ↵Keith Whitwell
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
2006-11-15Remove use of GetBufferSize (depreciated).Jerome Glisse
2006-11-03remove remaining traces of r200FlushVertices...Roland Scheidegger
2006-11-03remove setting some driver funcs explicitly to NULL, as they are no longer ↵Roland Scheidegger
set up later. Thix fixes a segfault in _mesa_Bitmap().
2006-10-31remove vtxfmt code, switch over to vboKeith Whitwell
2006-10-15Remove Driver.ResizeBuffers = _mesa_resize_framebuffer lines.Brian Paul
This is already done by the preceeding call to _mesa_init_driver_functions() which plugs in default functions like that.
2006-10-13implement ARB_point_parameters and ARB_point_sprite on r200. The code is ↵Roland Scheidegger
nearly the same as outlined in bug #4707, except it disables perspective correction for point sprites to make them actually work. And, separate the state atom into two as the tcl parameters would overwrite vertex program parameters when active. Also implement the GL_VERTEX_PROGRAM_POINT_SIZE_ARB option to make vertex programs outputting a point size work correctly (untested). Smooth points will still always be size 1. While here, enable gouraud shading for fog when using fog coord.
2006-09-28Make driDrawableInitVBlank() initialize the sequence number.Michel Dänzer
This prevents the first wait for vertical blank from timing out when the X server has been running for a long time.
2006-08-19remove the now confusing option to manually enable software ARB_vp if drm is ↵Roland Scheidegger
not new enough on r200
2006-06-10enable arb_vertex_program by default if drm is new enough. Do a fallback ↵Roland Scheidegger
when it's a nv_vp as there could be issues.
2006-06-02implement arb_vertex_program in hw for r200. Code contains still some hacks, ↵Roland Scheidegger
generic attribs cause a fallback, but otherwise it seems to work quite well. Passes all glean vertProg1 tests with the exception of the degnerated LIT case (which is a hw limitation), as well as runs the r200 render path of doom3/quake4 (1.1 patch needed for quake4). The code is heavily borrowed from the r300 driver as vertex programs encoding is almost identical. arb_vertex_program is not yet announced by default and still needs to be enabled via driconf.
2006-06-02remove code dealing with drmMinor version < 6 since all radeon drivers ↵Roland Scheidegger
request at least drmMinor 6 anyway.
2006-04-09Destroy the GL context after driDestroyTextureHeap, because the driver'sEric Anholt
DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
2006-04-04switch to card_type rather than IsPCI, doesn't change any functionality yetDave Airlie
2006-03-31Dave Reveman's patch for GLX_MESA_copy_sub_buffer supportBrian Paul
2006-03-27make allow_large_textures 1 by default for radeon and r200, and consequently ↵Roland Scheidegger
enable all texture units by default on those cards (3 for radeon, 6 for r200). Fix the usually forgotten DRIVER_DATE accordingly.
2006-02-03replace the texture level hack used in radeon/r200 to allow larger textures ↵Roland Scheidegger
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.
2006-01-07cube maps on r100 require newer drm than the same feature on r200 ↵Roland Scheidegger
(regression from introducing unfied initialization). Fix wrong (so far unused) family assignment for r100 cards.
2005-11-02First step of Radeon DRI unification:Eric Anholt
- 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.
2005-10-05enable point sizes larger than 1 (for aliased points only) by using the hw ↵Roland Scheidegger
point sprite primitive.
2005-09-12add complete support for ATI_fragment_shader for the r200. Most of the new ↵Roland Scheidegger
code is in the new file r200_fragshader.c. Reverse engeneered by Dave Airlie and me
2005-09-09add _tnl_arb_vertex_program_stage to all drivers which already have ↵Roland Scheidegger
_tnl_vertex_program_stage. Fixes crashes when using vertex programs. Tested on r200 only (fix by Keith Whitwell)
2005-09-01Finish up some of the gl_renderbuffer work.Brian Paul
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. Old code is surrounded by #if 000 / #endif, temporarily.
2005-08-31enable GL_ARB_texture_env_crossbar on r200, separate the enable bits for ↵Roland Scheidegger
texture sampling and texture environment, optimize away texture sampling for units if the result is not used, always emit the env instructions in-order and try to eliminate GL_REPLACE env instructions.
2005-08-11Remove support for the R200_NO_VTXFMT environment variable. Instead useIan Romanick
'tcl_mode=1'. This fixes bugzilla #3972.
2005-07-28Major rip-up of internal function insertion interface. The oldIan Romanick
_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)
2005-07-26Fixes the glXGetProcAddress portion of the interface. Most of the functionsIan Romanick
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...
2005-07-06Re-enable r200InitSpanFuncs, which was ifdefed out (probably by mistake?),Roland Scheidegger
so r200SetBuffer, r200SpanRenderStart and r200SpanRenderFinish get called again. Bugzilla #3705, #3706.
2005-06-30Replace add_newer_entrypoints (src/mesa/main/context.c) withIan Romanick
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
2005-05-04Major check-in of changes for GL_EXT_framebuffer_object extension.Brian Paul
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
2005-02-27precedence precedence precedence.. add some bracketsDave Airlie
2005-02-26Add a dri config option to enable the max texture level hackDave Airlie
make ycbcr depend on a CHIPSET define .. needs to be filled in though
2005-02-17s/0/NULL/ (Jeff Muizelaar)Brian Paul
2005-02-10add texture micro and macro tiling to radeon/r200 driver. This can improve ↵Roland Scheidegger
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.
2004-12-08(Stephane Marchesin, me) add hyperz support to radeon and r200 drivers. Only ↵Roland Scheidegger
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.
2004-12-03only enable GL_MESA_ycbcr_texture for real r200 chips, not the derivatives, ↵Roland Scheidegger
since yuv textures do not work for some reason on the other chips.
2004-11-27Remove _mesa_ResizeBuffersMESA() call from _mesa_set_viewport().Brian Paul
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.
2004-11-03enable GL_EXT_fog_coord. Calculate fog factors and submit them instead of ↵Roland Scheidegger
fog coords (it seems the chip cannot do fog factor computation when not using fragment depth as fog coord source). vtxfmt uses fallback for now (most code present but some magic would be needed if replaying vertices is necessary later on).
2004-10-07Add Roland Scheidegger's S3TC patch. This patch does not implement theEric Anholt
(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.
2004-09-30OK, one more time. Simplify the state-backup system by just storing the fullEric Anholt
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