aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga
Commit message (Collapse)AuthorAgeFilesLines
* DRI interface changes and DRI2 direct rendering support.Kristian Høgsberg2008-03-311-52/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg2008-02-292-7/+9
| | | | | | | 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.
* 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.
* Replace gl_framebuffer's _ColorDrawBufferMask with _ColorDrawBufferIndexesBrian2008-01-061-7/+9
| | | | | | | Each array element is now a BUFFER_x token rather than a BUFFER_BIT_x bitmask. The number of active color buffers is specified by _NumColorDrawBuffers. This builds on the previous DrawBuffer changes and will help with drivers implementing GL_ARB_draw_buffers.
* fix GL_LINE_LOOP with drivers using own render pipeline stage (#12410, #13527)Roland Scheidegger2007-12-221-1/+1
| | | | | | primitive needs to include the begin/end flags (broken since vbo-0.2). Should fix missing first/last line segment on gamma, i810, i915, mga, r200, radeon, s3v, savage, unichrome (r300 already correct). Tested on r200, fixes #13527.
* More vblank cleanups.Michel Dänzer2007-10-303-8/+10
| | | | | | | | * 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-293-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* mga: Enable (trivial) support for GL_APPLE_vertex_array_object, bump DRIVER_DATEIan Romanick2007-10-172-1/+3
|
* mga: Enable (trivial) support for GL_EXT_gpu_program_parameters.Ian Romanick2007-10-171-3/+5
|
* Add a DRI_ReadDrawable marker extension to signal read drawable capability.Kristian Høgsberg2007-10-111-5/+1
|
* Move media stream counter entry points to new extension.Kristian Høgsberg2007-10-111-3/+2
|
* Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.Kristian Høgsberg2007-10-111-1/+1
|
* Move swap_interval to new extension mechanism.Kristian Høgsberg2007-10-101-2/+7
|
* Pull createNewScreen entry point into dri_util.c.Kristian Høgsberg2007-10-101-52/+32
| | | | | | | | This pulls the top level createNewScreen entry point out of the drivers and rewrites __driUtilCreateNewScreen in dri_util.c to be the new entry point. The change moves more logic into the common/ layer and changes the createNewScreen entry point to only be defined in one place.
* Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg2007-10-102-4/+4
|
* Remove screenConfigs from __DRIscreen.Kristian Høgsberg2007-10-101-6/+5
| | | | | | | | | | | | The screenConfigs field of __DRIscreen points back to the containing __GLXscreenConfigs struct. This is a serious abstraction violation; it assumes that the loader is libGL and that there *is* a __GLXscreenConfigs type in the loader. Using the containerOf macro, we can get from the __DRIscreen pointer to the containing __GLXscreenConfigs struct, at a place in the stack where the above is a valid assumption. Besides, the __DRI* structs shouldn't hold state other than the private pointer.
* Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.Kristian Høgsberg2007-10-101-5/+0
| | | | | | | | | | | | All the DRI driver did was call the createDrawable callback immediately upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t. We can just call that before calling into the DRI driver and pass the returned drm_drawable_t as an argument to the DRI entry point. Likewise for destroyDrawable. Also, DRIdrawablePrivate::draw isn't used anywhere, and since the driver no longer needs the XID of the drawable we can now drop that.
* Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.Kristian Høgsberg2007-10-101-11/+11
| | | | | | | | | | | | | Many DRI entry points took a __DRInativeDisplay pointer and a screen index as arguments. The only use for the native display pointer was to pass it back to the loader when looking up the __DRIscreen for the given screen index. Instead, let's just pass in the __DRIscreen pointer directly, which let's drop the __DRInativeDisplay type and the getScreen function. The assumption is now that the loader will be able to retrieve context from the __DRIscreen pointer when necessary.
* Remove ctx->Point._Size and ctx->Line._Width.Brian2007-07-211-3/+7
| | | | | | The clamping for these values depends on whether we're drawing AA or non-AA points, lines. Defer clamping until drawing time. Drivers could compute and keep clamped AA and clamped non-AA values if desired.
* remove _tnl_arb_vertex_program_stageBrian2007-04-161-1/+0
|
* call DRI_VALIDATE_DRAWABLE_INFO(), bug 10477Gustavo Pichorim Boiko2007-03-301-1/+2
|
* 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.
* Fix/improve framebuffer object reference counting.Brian2007-03-061-1/+1
| | | | | | | Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions to be sure reference counting is done correctly. Additional assertions are done too. Note _mesa_dereference_framebuffer() renamed to "unreference" as that's more accurate.
* Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa ↵Keith Whitwell2007-01-162-5/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Bug #6044: actually delete the texture object in mgaDeleteTextureTilman Sauerbeck2006-11-261-0/+3
| |
| * fix typo, silence warningsBrian Paul2006-11-021-2/+3
| |
| * Use RGBA_LOGICOP_ENABLED() instead of ctx->Color._LogicOpEnabled since we oftenBrian Paul2006-11-021-4/+5
| | | | | | | | | | need to check for this condition before the later field has been computed. Fixes logicop bug #8860.
| * Remove x/y/width/height parameters from Clear functions.Brian Paul2006-11-011-3/+2
| |
| * Fix bug #8799.Ian Romanick2006-10-302-22/+8
| | | | | | | | | | | | Properly resize bith the drawable and the readable in mgaUpdateRects. Eliminate the use of the deprecated GetBufferSize interface. Bump driver date.
| * Refactor mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects.Ian Romanick2006-10-301-33/+8
| | | | | | | | | | | | Combine mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects into a single new function called mga_set_cliprects. This enables a small refactor in mgaDDDrawBuffer.
| * Get DRI drawable from framebuffer object.Ian Romanick2006-10-303-10/+2
| | | | | | | | | | | | | | | | | | | | In the software rasterization fallbacks, get the __DRIdrawablePrivate pointer from the driRenderbuffer that is passed in. This eliminates the need for the mesa_drawable pointer in MGA context structure. This partially fixes bug #8799. wincopy no longer produces a black window for the destination window, but it does produce incorrect results if the destination window is resized.
* | merge current trunk into vbo branchAlan Hourihane2006-11-026-68/+20
| |
* | switch remaining drivers over to vboKeith Whitwell2006-10-312-5/+5
|/
* Want to stop passing x/y/width/height to Clear() function.Brian Paul2006-10-181-4/+13
| | | | | | | The coordinates need to be computed after we've got the hw lock. Code updated to: 1. Ignore all/x/y/width/height/ params passed to Clear func. 2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed.
* Remove a bunch of "ctx->Driver.function = _swrast_Function" lines sinceBrian Paul2006-10-152-15/+1
| | | | | default/fallback functions are already plugged in by the call to _mesa_init_driver_functions().
* 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.
* make mgaSetFence() and mgaWaitFence() staticBrian Paul2006-05-231-2/+2
|
* replace the texture level hack used in radeon/r200 to allow larger textures ↵Roland Scheidegger2006-02-031-1/+2
| | | | 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.
* In gl_texture_image replace IntFormat with InternalFormat and Format withBrian Paul2005-10-051-3/+3
| | | | _BaseFormat to be consistant with gl_renderbuffer.
* make some funcs staticBrian Paul2005-09-141-2/+4
|
* Instead of calling _mesa_ResizeBuffersMESA() in the Viewport function,Brian Paul2005-09-142-3/+2
| | | | call driUpdateFramebufferSize() when window size/position changes.
* Replace ctx->Driver.StencilOp/Func/Mask() functions withBrian Paul2005-09-131-8/+11
| | | | ctx->Driver.Stencil*Separate() functions.
* add _tnl_arb_vertex_program_stage to all drivers which already have ↵Roland Scheidegger2005-09-091-0/+1
| | | | _tnl_vertex_program_stage. Fixes crashes when using vertex programs. Tested on r200 only (fix by Keith Whitwell)
* Add new void *addr and __DRIdrawablePrivate parameters toBrian Paul2005-09-041-14/+35
| | | | driNewRenderbuffer().
* minor clean-upsBrian Paul2005-09-041-2/+1
|
* SetBuffer, renderbuffer changesBrian Paul2005-09-032-113/+18
|
* remove stray references to ctx->Depth.OcclusionTestBrian Paul2005-08-251-2/+1
|
* Add Egberts fixes for 64bit architecturesAlan Hourihane2005-08-153-10/+24
| | | | | | Add additional checks for the *DRIRec info structure passed in from the device driver. This ensures that things fallback to indirect rendering if the DDX driver has had modifications (i.e. removal of the drmAddress field).
* Fix a == vs !- typo for glx_enable_extensionJon Smirl2005-07-291-1/+1
|