exa.h revision 6747b715
105b261ecSmrg/* 205b261ecSmrg * 305b261ecSmrg * Copyright (C) 2000 Keith Packard 405b261ecSmrg * 2004 Eric Anholt 505b261ecSmrg * 2005 Zack Rusin 605b261ecSmrg * 705b261ecSmrg * Permission to use, copy, modify, distribute, and sell this software and its 805b261ecSmrg * documentation for any purpose is hereby granted without fee, provided that 905b261ecSmrg * the above copyright notice appear in all copies and that both that 1005b261ecSmrg * copyright notice and this permission notice appear in supporting 1105b261ecSmrg * documentation, and that the name of copyright holders not be used in 1205b261ecSmrg * advertising or publicity pertaining to distribution of the software without 1305b261ecSmrg * specific, written prior permission. Copyright holders make no 1405b261ecSmrg * representations about the suitability of this software for any purpose. It 1505b261ecSmrg * is provided "as is" without express or implied warranty. 1605b261ecSmrg * 1705b261ecSmrg * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS 1805b261ecSmrg * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 1905b261ecSmrg * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY 2005b261ecSmrg * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 2105b261ecSmrg * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 2205b261ecSmrg * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 2305b261ecSmrg * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 2405b261ecSmrg * SOFTWARE. 2505b261ecSmrg */ 2605b261ecSmrg 2705b261ecSmrg/** @file 2805b261ecSmrg * This is the header containing the public API of EXA for exa drivers. 2905b261ecSmrg */ 3005b261ecSmrg 3105b261ecSmrg#ifndef EXA_H 3205b261ecSmrg#define EXA_H 3305b261ecSmrg 3405b261ecSmrg#include "scrnintstr.h" 3505b261ecSmrg#include "pixmapstr.h" 3605b261ecSmrg#include "windowstr.h" 3705b261ecSmrg#include "gcstruct.h" 3805b261ecSmrg#include "picturestr.h" 3905b261ecSmrg#include "fb.h" 4005b261ecSmrg 4105b261ecSmrg#define EXA_VERSION_MAJOR 2 426747b715Smrg#define EXA_VERSION_MINOR 5 4305b261ecSmrg#define EXA_VERSION_RELEASE 0 4405b261ecSmrg 4505b261ecSmrgtypedef struct _ExaOffscreenArea ExaOffscreenArea; 4605b261ecSmrg 4705b261ecSmrgtypedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea *area); 4805b261ecSmrg 4905b261ecSmrgtypedef enum _ExaOffscreenState { 5005b261ecSmrg ExaOffscreenAvail, 5105b261ecSmrg ExaOffscreenRemovable, 5205b261ecSmrg ExaOffscreenLocked 5305b261ecSmrg} ExaOffscreenState; 5405b261ecSmrg 5505b261ecSmrgstruct _ExaOffscreenArea { 5605b261ecSmrg int base_offset; /* allocation base */ 5705b261ecSmrg int offset; /* aligned offset */ 5805b261ecSmrg int size; /* total allocation size */ 594642e01fSmrg unsigned last_use; 6005b261ecSmrg pointer privData; 6105b261ecSmrg 6205b261ecSmrg ExaOffscreenSaveProc save; 6305b261ecSmrg 6405b261ecSmrg ExaOffscreenState state; 6505b261ecSmrg 6605b261ecSmrg ExaOffscreenArea *next; 674642e01fSmrg 684642e01fSmrg unsigned eviction_cost; 696747b715Smrg 706747b715Smrg ExaOffscreenArea *prev; /* Double-linked list for defragmentation */ 716747b715Smrg int align; /* required alignment */ 7205b261ecSmrg}; 7305b261ecSmrg 7405b261ecSmrg/** 7505b261ecSmrg * The ExaDriver structure is allocated through exaDriverAlloc(), and then 7605b261ecSmrg * fllled in by drivers. 7705b261ecSmrg */ 7805b261ecSmrgtypedef struct _ExaDriver { 7905b261ecSmrg /** 8005b261ecSmrg * exa_major and exa_minor should be set by the driver to the version of 8105b261ecSmrg * EXA which the driver was compiled for (or configures itself at runtime 8205b261ecSmrg * to support). This allows EXA to extend the structure for new features 8305b261ecSmrg * without breaking ABI for drivers compiled against older versions. 8405b261ecSmrg */ 8505b261ecSmrg int exa_major, exa_minor; 8605b261ecSmrg 8705b261ecSmrg /** 8805b261ecSmrg * memoryBase is the address of the beginning of framebuffer memory. 8905b261ecSmrg * The visible screen should be within memoryBase to memoryBase + 9005b261ecSmrg * memorySize. 9105b261ecSmrg */ 9205b261ecSmrg CARD8 *memoryBase; 9305b261ecSmrg 9405b261ecSmrg /** 9505b261ecSmrg * offScreenBase is the offset from memoryBase of the beginning of the area 9605b261ecSmrg * to be managed by EXA's linear offscreen memory manager. 9705b261ecSmrg * 9805b261ecSmrg * In XFree86 DDX drivers, this is probably: 9905b261ecSmrg * (pScrn->displayWidth * cpp * pScrn->virtualY) 10005b261ecSmrg */ 10105b261ecSmrg unsigned long offScreenBase; 10205b261ecSmrg 10305b261ecSmrg /** 10405b261ecSmrg * memorySize is the length (in bytes) of framebuffer memory beginning 10505b261ecSmrg * from memoryBase. 10605b261ecSmrg * 10705b261ecSmrg * The offscreen memory manager will manage the area beginning at 10805b261ecSmrg * (memoryBase + offScreenBase), with a length of (memorySize - 10905b261ecSmrg * offScreenBase) 11005b261ecSmrg * 11105b261ecSmrg * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024) 11205b261ecSmrg */ 11305b261ecSmrg unsigned long memorySize; 11405b261ecSmrg 11505b261ecSmrg /** 11605b261ecSmrg * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets 11705b261ecSmrg * within framebuffer. 11805b261ecSmrg * 11905b261ecSmrg * Hardware typically has a required alignment of offsets, which may or may 12005b261ecSmrg * not be a power of two. EXA will ensure that pixmaps managed by the 12105b261ecSmrg * offscreen memory manager meet this alignment requirement. 12205b261ecSmrg */ 12305b261ecSmrg int pixmapOffsetAlign; 12405b261ecSmrg 12505b261ecSmrg /** 12605b261ecSmrg * pixmapPitchAlign is the byte alignment necessary for pixmap pitches 12705b261ecSmrg * within the framebuffer. 12805b261ecSmrg * 12905b261ecSmrg * Hardware typically has a required alignment of pitches for acceleration. 13005b261ecSmrg * For 3D hardware, Composite acceleration often requires that source and 13105b261ecSmrg * mask pixmaps (textures) have a power-of-two pitch, which can be demanded 13205b261ecSmrg * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to 13305b261ecSmrg * pixmaps managed by the offscreen memory manager. Thus, it is up to the 13405b261ecSmrg * driver to ensure that the visible screen has an appropriate pitch for 13505b261ecSmrg * acceleration. 13605b261ecSmrg */ 13705b261ecSmrg int pixmapPitchAlign; 13805b261ecSmrg 13905b261ecSmrg /** 14005b261ecSmrg * The flags field is bitfield of boolean values controlling EXA's behavior. 14105b261ecSmrg * 14205b261ecSmrg * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and 14305b261ecSmrg * EXA_TWO_BITBLT_DIRECTIONS. 14405b261ecSmrg */ 14505b261ecSmrg int flags; 14605b261ecSmrg 14705b261ecSmrg /** @{ */ 14805b261ecSmrg /** 14905b261ecSmrg * maxX controls the X coordinate limitation for rendering from the card. 15005b261ecSmrg * The driver should never receive a request for rendering beyond maxX 15105b261ecSmrg * in the X direction from the origin of a pixmap. 15205b261ecSmrg */ 15305b261ecSmrg int maxX; 15405b261ecSmrg 15505b261ecSmrg /** 15605b261ecSmrg * maxY controls the Y coordinate limitation for rendering from the card. 15705b261ecSmrg * The driver should never receive a request for rendering beyond maxY 15805b261ecSmrg * in the Y direction from the origin of a pixmap. 15905b261ecSmrg */ 16005b261ecSmrg int maxY; 16105b261ecSmrg /** @} */ 16205b261ecSmrg 16305b261ecSmrg /* private */ 16405b261ecSmrg ExaOffscreenArea *offScreenAreas; 16505b261ecSmrg Bool needsSync; 16605b261ecSmrg int lastMarker; 16705b261ecSmrg 16805b261ecSmrg /** @name Solid 16905b261ecSmrg * @{ 17005b261ecSmrg */ 17105b261ecSmrg /** 17205b261ecSmrg * PrepareSolid() sets up the driver for doing a solid fill. 17305b261ecSmrg * @param pPixmap Destination pixmap 17405b261ecSmrg * @param alu raster operation 17505b261ecSmrg * @param planemask write mask for the fill 17605b261ecSmrg * @param fg "foreground" color for the fill 17705b261ecSmrg * 17805b261ecSmrg * This call should set up the driver for doing a series of solid fills 17905b261ecSmrg * through the Solid() call. The alu raster op is one of the GX* 18005b261ecSmrg * graphics functions listed in X.h, and typically maps to a similar 18105b261ecSmrg * single-byte "ROP" setting in all hardware. The planemask controls 18205b261ecSmrg * which bits of the destination should be affected, and will only represent 18305b261ecSmrg * the bits up to the depth of pPixmap. The fg is the pixel value of the 18405b261ecSmrg * foreground color referred to in ROP descriptions. 18505b261ecSmrg * 18605b261ecSmrg * Note that many drivers will need to store some of the data in the driver 18705b261ecSmrg * private record, for sending to the hardware with each drawing command. 18805b261ecSmrg * 18905b261ecSmrg * The PrepareSolid() call is required of all drivers, but it may fail for any 19005b261ecSmrg * reason. Failure results in a fallback to software rendering. 19105b261ecSmrg */ 19205b261ecSmrg Bool (*PrepareSolid) (PixmapPtr pPixmap, 19305b261ecSmrg int alu, 19405b261ecSmrg Pixel planemask, 19505b261ecSmrg Pixel fg); 19605b261ecSmrg 19705b261ecSmrg /** 19805b261ecSmrg * Solid() performs a solid fill set up in the last PrepareSolid() call. 19905b261ecSmrg * 20005b261ecSmrg * @param pPixmap destination pixmap 20105b261ecSmrg * @param x1 left coordinate 20205b261ecSmrg * @param y1 top coordinate 20305b261ecSmrg * @param x2 right coordinate 20405b261ecSmrg * @param y2 bottom coordinate 20505b261ecSmrg * 20605b261ecSmrg * Performs the fill set up by the last PrepareSolid() call, covering the 20705b261ecSmrg * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are 20805b261ecSmrg * in the coordinate space of the destination pixmap, so the driver will 20905b261ecSmrg * need to set up the hardware's offset and pitch for the destination 21005b261ecSmrg * coordinates according to the pixmap's offset and pitch within 21105b261ecSmrg * framebuffer. This likely means using exaGetPixmapOffset() and 21205b261ecSmrg * exaGetPixmapPitch(). 21305b261ecSmrg * 21405b261ecSmrg * This call is required if PrepareSolid() ever succeeds. 21505b261ecSmrg */ 21605b261ecSmrg void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2); 21705b261ecSmrg 21805b261ecSmrg /** 21905b261ecSmrg * DoneSolid() finishes a set of solid fills. 22005b261ecSmrg * 22105b261ecSmrg * @param pPixmap destination pixmap. 22205b261ecSmrg * 22305b261ecSmrg * The DoneSolid() call is called at the end of a series of consecutive 22405b261ecSmrg * Solid() calls following a successful PrepareSolid(). This allows drivers 22505b261ecSmrg * to finish up emitting drawing commands that were buffered, or clean up 22605b261ecSmrg * state from PrepareSolid(). 22705b261ecSmrg * 22805b261ecSmrg * This call is required if PrepareSolid() ever succeeds. 22905b261ecSmrg */ 23005b261ecSmrg void (*DoneSolid) (PixmapPtr pPixmap); 23105b261ecSmrg /** @} */ 23205b261ecSmrg 23305b261ecSmrg /** @name Copy 23405b261ecSmrg * @{ 23505b261ecSmrg */ 23605b261ecSmrg /** 23705b261ecSmrg * PrepareCopy() sets up the driver for doing a copy within video 23805b261ecSmrg * memory. 23905b261ecSmrg * 24005b261ecSmrg * @param pSrcPixmap source pixmap 24105b261ecSmrg * @param pDstPixmap destination pixmap 24205b261ecSmrg * @param dx X copy direction 24305b261ecSmrg * @param dy Y copy direction 24405b261ecSmrg * @param alu raster operation 24505b261ecSmrg * @param planemask write mask for the fill 24605b261ecSmrg * 24705b261ecSmrg * This call should set up the driver for doing a series of copies from the 24805b261ecSmrg * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the 24905b261ecSmrg * hardware should do the copy from the left to the right, and dy will be 25005b261ecSmrg * positive if the copy should be done from the top to the bottom. This 25105b261ecSmrg * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap. 25205b261ecSmrg * If your hardware can only support blits that are (left to right, top to 25305b261ecSmrg * bottom) or (right to left, bottom to top), then you should set 25405b261ecSmrg * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to 25505b261ecSmrg * ones that meet those requirements. The alu raster op is one of the GX* 25605b261ecSmrg * graphics functions listed in X.h, and typically maps to a similar 25705b261ecSmrg * single-byte "ROP" setting in all hardware. The planemask controls which 25805b261ecSmrg * bits of the destination should be affected, and will only represent the 25905b261ecSmrg * bits up to the depth of pPixmap. 26005b261ecSmrg * 26105b261ecSmrg * Note that many drivers will need to store some of the data in the driver 26205b261ecSmrg * private record, for sending to the hardware with each drawing command. 26305b261ecSmrg * 26405b261ecSmrg * The PrepareCopy() call is required of all drivers, but it may fail for any 26505b261ecSmrg * reason. Failure results in a fallback to software rendering. 26605b261ecSmrg */ 26705b261ecSmrg Bool (*PrepareCopy) (PixmapPtr pSrcPixmap, 26805b261ecSmrg PixmapPtr pDstPixmap, 26905b261ecSmrg int dx, 27005b261ecSmrg int dy, 27105b261ecSmrg int alu, 27205b261ecSmrg Pixel planemask); 27305b261ecSmrg 27405b261ecSmrg /** 27505b261ecSmrg * Copy() performs a copy set up in the last PrepareCopy call. 27605b261ecSmrg * 27705b261ecSmrg * @param pDstPixmap destination pixmap 27805b261ecSmrg * @param srcX source X coordinate 27905b261ecSmrg * @param srcY source Y coordinate 28005b261ecSmrg * @param dstX destination X coordinate 28105b261ecSmrg * @param dstY destination Y coordinate 28205b261ecSmrg * @param width width of the rectangle to be copied 28305b261ecSmrg * @param height height of the rectangle to be copied. 28405b261ecSmrg * 28505b261ecSmrg * Performs the copy set up by the last PrepareCopy() call, copying the 28605b261ecSmrg * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source 28705b261ecSmrg * pixmap to the same-sized rectangle at (dstX, dstY) in the destination 28805b261ecSmrg * pixmap. Those rectangles may overlap in memory, if 28905b261ecSmrg * pSrcPixmap == pDstPixmap. Note that this call does not receive the 29005b261ecSmrg * pSrcPixmap as an argument -- if it's needed in this function, it should 29105b261ecSmrg * be stored in the driver private during PrepareCopy(). As with Solid(), 29205b261ecSmrg * the coordinates are in the coordinate space of each pixmap, so the driver 29305b261ecSmrg * will need to set up source and destination pitches and offsets from those 29405b261ecSmrg * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch(). 29505b261ecSmrg * 29605b261ecSmrg * This call is required if PrepareCopy ever succeeds. 29705b261ecSmrg */ 29805b261ecSmrg void (*Copy) (PixmapPtr pDstPixmap, 29905b261ecSmrg int srcX, 30005b261ecSmrg int srcY, 30105b261ecSmrg int dstX, 30205b261ecSmrg int dstY, 30305b261ecSmrg int width, 30405b261ecSmrg int height); 30505b261ecSmrg 30605b261ecSmrg /** 30705b261ecSmrg * DoneCopy() finishes a set of copies. 30805b261ecSmrg * 30905b261ecSmrg * @param pPixmap destination pixmap. 31005b261ecSmrg * 31105b261ecSmrg * The DoneCopy() call is called at the end of a series of consecutive 31205b261ecSmrg * Copy() calls following a successful PrepareCopy(). This allows drivers 31305b261ecSmrg * to finish up emitting drawing commands that were buffered, or clean up 31405b261ecSmrg * state from PrepareCopy(). 31505b261ecSmrg * 31605b261ecSmrg * This call is required if PrepareCopy() ever succeeds. 31705b261ecSmrg */ 31805b261ecSmrg void (*DoneCopy) (PixmapPtr pDstPixmap); 31905b261ecSmrg /** @} */ 32005b261ecSmrg 32105b261ecSmrg /** @name Composite 32205b261ecSmrg * @{ 32305b261ecSmrg */ 32405b261ecSmrg /** 32505b261ecSmrg * CheckComposite() checks to see if a composite operation could be 32605b261ecSmrg * accelerated. 32705b261ecSmrg * 32805b261ecSmrg * @param op Render operation 32905b261ecSmrg * @param pSrcPicture source Picture 33005b261ecSmrg * @param pMaskPicture mask picture 33105b261ecSmrg * @param pDstPicture destination Picture 33205b261ecSmrg * 33305b261ecSmrg * The CheckComposite() call checks if the driver could handle acceleration 33405b261ecSmrg * of op with the given source, mask, and destination pictures. This allows 33505b261ecSmrg * drivers to check source and destination formats, supported operations, 33605b261ecSmrg * transformations, and component alpha state, and send operations it can't 33705b261ecSmrg * support to software rendering early on. This avoids costly pixmap 33805b261ecSmrg * migration to the wrong places when the driver can't accelerate 33905b261ecSmrg * operations. Note that because migration hasn't happened, the driver 34005b261ecSmrg * can't know during CheckComposite() what the offsets and pitches of the 34105b261ecSmrg * pixmaps are going to be. 34205b261ecSmrg * 34305b261ecSmrg * See PrepareComposite() for more details on likely issues that drivers 34405b261ecSmrg * will have in accelerating Composite operations. 34505b261ecSmrg * 34605b261ecSmrg * The CheckComposite() call is recommended if PrepareComposite() is 34705b261ecSmrg * implemented, but is not required. 34805b261ecSmrg */ 34905b261ecSmrg Bool (*CheckComposite) (int op, 35005b261ecSmrg PicturePtr pSrcPicture, 35105b261ecSmrg PicturePtr pMaskPicture, 35205b261ecSmrg PicturePtr pDstPicture); 35305b261ecSmrg 35405b261ecSmrg /** 35505b261ecSmrg * PrepareComposite() sets up the driver for doing a Composite operation 35605b261ecSmrg * described in the Render extension protocol spec. 35705b261ecSmrg * 35805b261ecSmrg * @param op Render operation 35905b261ecSmrg * @param pSrcPicture source Picture 36005b261ecSmrg * @param pMaskPicture mask picture 36105b261ecSmrg * @param pDstPicture destination Picture 36205b261ecSmrg * @param pSrc source pixmap 36305b261ecSmrg * @param pMask mask pixmap 36405b261ecSmrg * @param pDst destination pixmap 36505b261ecSmrg * 36605b261ecSmrg * This call should set up the driver for doing a series of Composite 36705b261ecSmrg * operations, as described in the Render protocol spec, with the given 36805b261ecSmrg * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and 36905b261ecSmrg * pDst are the pixmaps containing the pixel data, and should be used for 37005b261ecSmrg * setting the offset and pitch used for the coordinate spaces for each of 37105b261ecSmrg * the Pictures. 37205b261ecSmrg * 37305b261ecSmrg * Notes on interpreting Picture structures: 37405b261ecSmrg * - The Picture structures will always have a valid pDrawable. 37505b261ecSmrg * - The Picture structures will never have alphaMap set. 37605b261ecSmrg * - The mask Picture (and therefore pMask) may be NULL, in which case the 37705b261ecSmrg * operation is simply src OP dst instead of src IN mask OP dst, and 37805b261ecSmrg * mask coordinates should be ignored. 37905b261ecSmrg * - pMarkPicture may have componentAlpha set, which greatly changes 38005b261ecSmrg * the behavior of the Composite operation. componentAlpha has no effect 38105b261ecSmrg * when set on pSrcPicture or pDstPicture. 38205b261ecSmrg * - The source and mask Pictures may have a transformation set 38305b261ecSmrg * (Picture->transform != NULL), which means that the source coordinates 38405b261ecSmrg * should be transformed by that transformation, resulting in scaling, 38505b261ecSmrg * rotation, etc. The PictureTransformPoint() call can transform 38605b261ecSmrg * coordinates for you. Transforms have no effect on Pictures when used 38705b261ecSmrg * as a destination. 38805b261ecSmrg * - The source and mask pictures may have a filter set. PictFilterNearest 38905b261ecSmrg * and PictFilterBilinear are defined in the Render protocol, but others 39005b261ecSmrg * may be encountered, and must be handled correctly (usually by 39105b261ecSmrg * PrepareComposite failing, and falling back to software). Filters have 39205b261ecSmrg * no effect on Pictures when used as a destination. 39305b261ecSmrg * - The source and mask Pictures may have repeating set, which must be 39405b261ecSmrg * respected. Many chipsets will be unable to support repeating on 39505b261ecSmrg * pixmaps that have a width or height that is not a power of two. 39605b261ecSmrg * 39705b261ecSmrg * If your hardware can't support source pictures (textures) with 39805b261ecSmrg * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT. 39905b261ecSmrg * 40005b261ecSmrg * Note that many drivers will need to store some of the data in the driver 40105b261ecSmrg * private record, for sending to the hardware with each drawing command. 40205b261ecSmrg * 40305b261ecSmrg * The PrepareComposite() call is not required. However, it is highly 40405b261ecSmrg * recommended for performance of antialiased font rendering and performance 40505b261ecSmrg * of cairo applications. Failure results in a fallback to software 40605b261ecSmrg * rendering. 40705b261ecSmrg */ 40805b261ecSmrg Bool (*PrepareComposite) (int op, 40905b261ecSmrg PicturePtr pSrcPicture, 41005b261ecSmrg PicturePtr pMaskPicture, 41105b261ecSmrg PicturePtr pDstPicture, 41205b261ecSmrg PixmapPtr pSrc, 41305b261ecSmrg PixmapPtr pMask, 41405b261ecSmrg PixmapPtr pDst); 41505b261ecSmrg 41605b261ecSmrg /** 41705b261ecSmrg * Composite() performs a Composite operation set up in the last 41805b261ecSmrg * PrepareComposite() call. 41905b261ecSmrg * 42005b261ecSmrg * @param pDstPixmap destination pixmap 42105b261ecSmrg * @param srcX source X coordinate 42205b261ecSmrg * @param srcY source Y coordinate 42305b261ecSmrg * @param maskX source X coordinate 42405b261ecSmrg * @param maskY source Y coordinate 42505b261ecSmrg * @param dstX destination X coordinate 42605b261ecSmrg * @param dstY destination Y coordinate 42705b261ecSmrg * @param width destination rectangle width 42805b261ecSmrg * @param height destination rectangle height 42905b261ecSmrg * 43005b261ecSmrg * Performs the Composite operation set up by the last PrepareComposite() 43105b261ecSmrg * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height) 43205b261ecSmrg * in the destination Pixmap. Note that if a transformation was set on 43305b261ecSmrg * the source or mask Pictures, the source rectangles may not be the same 43405b261ecSmrg * size as the destination rectangles and filtering. Getting the coordinate 43505b261ecSmrg * transformation right at the subpixel level can be tricky, and rendercheck 43605b261ecSmrg * can test this for you. 43705b261ecSmrg * 43805b261ecSmrg * This call is required if PrepareComposite() ever succeeds. 43905b261ecSmrg */ 44005b261ecSmrg void (*Composite) (PixmapPtr pDst, 44105b261ecSmrg int srcX, 44205b261ecSmrg int srcY, 44305b261ecSmrg int maskX, 44405b261ecSmrg int maskY, 44505b261ecSmrg int dstX, 44605b261ecSmrg int dstY, 44705b261ecSmrg int width, 44805b261ecSmrg int height); 44905b261ecSmrg 45005b261ecSmrg /** 45105b261ecSmrg * DoneComposite() finishes a set of Composite operations. 45205b261ecSmrg * 45305b261ecSmrg * @param pPixmap destination pixmap. 45405b261ecSmrg * 45505b261ecSmrg * The DoneComposite() call is called at the end of a series of consecutive 45605b261ecSmrg * Composite() calls following a successful PrepareComposite(). This allows 45705b261ecSmrg * drivers to finish up emitting drawing commands that were buffered, or 45805b261ecSmrg * clean up state from PrepareComposite(). 45905b261ecSmrg * 46005b261ecSmrg * This call is required if PrepareComposite() ever succeeds. 46105b261ecSmrg */ 46205b261ecSmrg void (*DoneComposite) (PixmapPtr pDst); 46305b261ecSmrg /** @} */ 46405b261ecSmrg 46505b261ecSmrg /** 46605b261ecSmrg * UploadToScreen() loads a rectangle of data from src into pDst. 46705b261ecSmrg * 46805b261ecSmrg * @param pDst destination pixmap 46905b261ecSmrg * @param x destination X coordinate. 47005b261ecSmrg * @param y destination Y coordinate 47105b261ecSmrg * @param width width of the rectangle to be copied 47205b261ecSmrg * @param height height of the rectangle to be copied 47305b261ecSmrg * @param src pointer to the beginning of the source data 47405b261ecSmrg * @param src_pitch pitch (in bytes) of the lines of source data. 47505b261ecSmrg * 47605b261ecSmrg * UploadToScreen() copies data in system memory beginning at src (with 47705b261ecSmrg * pitch src_pitch) into the destination pixmap from (x, y) to 47805b261ecSmrg * (x + width, y + height). This is typically done with hostdata uploads, 47905b261ecSmrg * where the CPU sets up a blit command on the hardware with instructions 48005b261ecSmrg * that the blit data will be fed through some sort of aperture on the card. 48105b261ecSmrg * 48205b261ecSmrg * If UploadToScreen() is performed asynchronously, it is up to the driver 48305b261ecSmrg * to call exaMarkSync(). This is in contrast to most other acceleration 48405b261ecSmrg * calls in EXA. 48505b261ecSmrg * 48605b261ecSmrg * UploadToScreen() can aid in pixmap migration, but is most important for 48705b261ecSmrg * the performance of exaGlyphs() (antialiased font drawing) by allowing 48805b261ecSmrg * pipelining of data uploads, avoiding a sync of the card after each glyph. 48905b261ecSmrg * 49005b261ecSmrg * @return TRUE if the driver successfully uploaded the data. FALSE 49105b261ecSmrg * indicates that EXA should fall back to doing the upload in software. 49205b261ecSmrg * 49305b261ecSmrg * UploadToScreen() is not required, but is recommended if Composite 49405b261ecSmrg * acceleration is supported. 49505b261ecSmrg */ 49605b261ecSmrg Bool (*UploadToScreen) (PixmapPtr pDst, 49705b261ecSmrg int x, 49805b261ecSmrg int y, 49905b261ecSmrg int w, 50005b261ecSmrg int h, 50105b261ecSmrg char *src, 50205b261ecSmrg int src_pitch); 50305b261ecSmrg 50405b261ecSmrg /** 5056747b715Smrg * UploadToScratch() is no longer used and will be removed next time the EXA 5066747b715Smrg * major version needs to be bumped. 50705b261ecSmrg */ 50805b261ecSmrg Bool (*UploadToScratch) (PixmapPtr pSrc, 50905b261ecSmrg PixmapPtr pDst); 51005b261ecSmrg 51105b261ecSmrg /** 51205b261ecSmrg * DownloadFromScreen() loads a rectangle of data from pSrc into dst 51305b261ecSmrg * 51405b261ecSmrg * @param pSrc source pixmap 51505b261ecSmrg * @param x source X coordinate. 51605b261ecSmrg * @param y source Y coordinate 51705b261ecSmrg * @param width width of the rectangle to be copied 51805b261ecSmrg * @param height height of the rectangle to be copied 51905b261ecSmrg * @param dst pointer to the beginning of the destination data 52005b261ecSmrg * @param dst_pitch pitch (in bytes) of the lines of destination data. 52105b261ecSmrg * 52205b261ecSmrg * DownloadFromScreen() copies data from offscreen memory in pSrc from 52305b261ecSmrg * (x, y) to (x + width, y + height), to system memory starting at 52405b261ecSmrg * dst (with pitch dst_pitch). This would usually be done 52505b261ecSmrg * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP 52605b261ecSmrg * and then synchronously reading from AGP. Because the implementation 52705b261ecSmrg * might be synchronous, EXA leaves it up to the driver to call 52805b261ecSmrg * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in 52905b261ecSmrg * contrast to most other acceleration calls in EXA. 53005b261ecSmrg * 53105b261ecSmrg * DownloadFromScreen() can aid in the largest bottleneck in pixmap 53205b261ecSmrg * migration, which is the read from framebuffer when evicting pixmaps from 53305b261ecSmrg * framebuffer memory. Thus, it is highly recommended, even though 53405b261ecSmrg * implementations are typically complicated. 53505b261ecSmrg * 53605b261ecSmrg * @return TRUE if the driver successfully downloaded the data. FALSE 53705b261ecSmrg * indicates that EXA should fall back to doing the download in software. 53805b261ecSmrg * 53905b261ecSmrg * DownloadFromScreen() is not required, but is highly recommended. 54005b261ecSmrg */ 54105b261ecSmrg Bool (*DownloadFromScreen)(PixmapPtr pSrc, 54205b261ecSmrg int x, int y, 54305b261ecSmrg int w, int h, 54405b261ecSmrg char *dst, int dst_pitch); 54505b261ecSmrg 54605b261ecSmrg /** 54705b261ecSmrg * MarkSync() requests that the driver mark a synchronization point, 54805b261ecSmrg * returning an driver-defined integer marker which could be requested for 54905b261ecSmrg * synchronization to later in WaitMarker(). This might be used in the 55005b261ecSmrg * future to avoid waiting for full hardware stalls before accessing pixmap 55105b261ecSmrg * data with the CPU, but is not important in the current incarnation of 55205b261ecSmrg * EXA. 55305b261ecSmrg * 55405b261ecSmrg * Note that drivers should call exaMarkSync() when they have done some 55505b261ecSmrg * acceleration, rather than their own MarkSync() handler, as otherwise EXA 55605b261ecSmrg * will be unaware of the driver's acceleration and not sync to it during 55705b261ecSmrg * fallbacks. 55805b261ecSmrg * 55905b261ecSmrg * MarkSync() is optional. 56005b261ecSmrg */ 56105b261ecSmrg int (*MarkSync) (ScreenPtr pScreen); 56205b261ecSmrg 56305b261ecSmrg /** 56405b261ecSmrg * WaitMarker() waits for all rendering before the given marker to have 56505b261ecSmrg * completed. If the driver does not implement MarkSync(), marker is 56605b261ecSmrg * meaningless, and all rendering by the hardware should be completed before 56705b261ecSmrg * WaitMarker() returns. 56805b261ecSmrg * 56905b261ecSmrg * Note that drivers should call exaWaitSync() to wait for all acceleration 57005b261ecSmrg * to finish, as otherwise EXA will be unaware of the driver having 57105b261ecSmrg * synchronized, resulting in excessive WaitMarker() calls. 57205b261ecSmrg * 57305b261ecSmrg * WaitMarker() is required of all drivers. 57405b261ecSmrg */ 57505b261ecSmrg void (*WaitMarker) (ScreenPtr pScreen, int marker); 57605b261ecSmrg 57705b261ecSmrg /** @{ */ 57805b261ecSmrg /** 57905b261ecSmrg * PrepareAccess() is called before CPU access to an offscreen pixmap. 58005b261ecSmrg * 58105b261ecSmrg * @param pPix the pixmap being accessed 58205b261ecSmrg * @param index the index of the pixmap being accessed. 58305b261ecSmrg * 58405b261ecSmrg * PrepareAccess() will be called before CPU access to an offscreen pixmap. 58505b261ecSmrg * This can be used to set up hardware surfaces for byteswapping or 58605b261ecSmrg * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of 58705b261ecSmrg * making CPU access use a different aperture. 58805b261ecSmrg * 5896747b715Smrg * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, 5906747b715Smrg * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or 5916747b715Smrg * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps 5926747b715Smrg * will have PrepareAccess() called on them per operation, drivers can have 5936747b715Smrg * a small, statically-allocated space to maintain state for PrepareAccess() 5946747b715Smrg * and FinishAccess() in. Note that PrepareAccess() is only called once per 5956747b715Smrg * pixmap and operation, regardless of whether the pixmap is used as a 5966747b715Smrg * destination and/or source, and the index may not reflect the usage. 59705b261ecSmrg * 59805b261ecSmrg * PrepareAccess() may fail. An example might be the case of hardware that 59905b261ecSmrg * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess() 60005b261ecSmrg * fails, EXA will migrate the pixmap to system memory. 60105b261ecSmrg * DownloadFromScreen() must be implemented and must not fail if a driver 60205b261ecSmrg * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when 60305b261ecSmrg * pPix is the visible screen, because the visible screen can not be 60405b261ecSmrg * migrated. 60505b261ecSmrg * 60605b261ecSmrg * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU 60705b261ecSmrg * drawing. 60805b261ecSmrg * @return FALSE if PrepareAccess() is unsuccessful and EXA should use 60905b261ecSmrg * DownloadFromScreen() to migate the pixmap out. 61005b261ecSmrg */ 61105b261ecSmrg Bool (*PrepareAccess)(PixmapPtr pPix, int index); 61205b261ecSmrg 61305b261ecSmrg /** 61405b261ecSmrg * FinishAccess() is called after CPU access to an offscreen pixmap. 61505b261ecSmrg * 61605b261ecSmrg * @param pPix the pixmap being accessed 61705b261ecSmrg * @param index the index of the pixmap being accessed. 61805b261ecSmrg * 61905b261ecSmrg * FinishAccess() will be called after finishing CPU access of an offscreen 62005b261ecSmrg * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be 62105b261ecSmrg * called if PrepareAccess() failed and the pixmap was migrated out. 62205b261ecSmrg */ 62305b261ecSmrg void (*FinishAccess)(PixmapPtr pPix, int index); 62405b261ecSmrg 62505b261ecSmrg /** 62605b261ecSmrg * PixmapIsOffscreen() is an optional driver replacement to 6276747b715Smrg * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour 6286747b715Smrg * of exaPixmapHasGpuCopy(). 62905b261ecSmrg * 63005b261ecSmrg * @param pPix the pixmap 63105b261ecSmrg * @return TRUE if the given drawable is in framebuffer memory. 63205b261ecSmrg * 6336747b715Smrg * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen 63405b261ecSmrg * memory, meaning that acceleration could probably be done to it, and that it 63505b261ecSmrg * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it 63605b261ecSmrg * with the CPU. 63705b261ecSmrg * 63805b261ecSmrg * 63905b261ecSmrg */ 64005b261ecSmrg Bool (*PixmapIsOffscreen)(PixmapPtr pPix); 64105b261ecSmrg 64205b261ecSmrg /** @name PrepareAccess() and FinishAccess() indices 64305b261ecSmrg * @{ 64405b261ecSmrg */ 64505b261ecSmrg /** 64605b261ecSmrg * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or 64705b261ecSmrg * read from. 64805b261ecSmrg */ 64905b261ecSmrg #define EXA_PREPARE_DEST 0 65005b261ecSmrg /** 65105b261ecSmrg * EXA_PREPARE_SRC is the index for a pixmap that may be read from 65205b261ecSmrg */ 65305b261ecSmrg #define EXA_PREPARE_SRC 1 65405b261ecSmrg /** 65505b261ecSmrg * EXA_PREPARE_SRC is the index for a second pixmap that may be read 65605b261ecSmrg * from. 65705b261ecSmrg */ 65805b261ecSmrg #define EXA_PREPARE_MASK 2 6594642e01fSmrg /** 6604642e01fSmrg * EXA_PREPARE_AUX* are additional indices for other purposes, e.g. 6614642e01fSmrg * separate alpha maps with Composite operations. 6624642e01fSmrg */ 6636747b715Smrg #define EXA_PREPARE_AUX_DEST 3 6646747b715Smrg #define EXA_PREPARE_AUX_SRC 4 6656747b715Smrg #define EXA_PREPARE_AUX_MASK 5 6666747b715Smrg #define EXA_NUM_PREPARE_INDICES 6 66705b261ecSmrg /** @} */ 6684642e01fSmrg 6694642e01fSmrg /** 6704642e01fSmrg * maxPitchPixels controls the pitch limitation for rendering from 6714642e01fSmrg * the card. 6724642e01fSmrg * The driver should never receive a request for rendering a pixmap 6734642e01fSmrg * that has a pitch (in pixels) beyond maxPitchPixels. 6744642e01fSmrg * 6754642e01fSmrg * Setting this field is optional -- if your hardware doesn't have 6764642e01fSmrg * a pitch limitation in pixels, don't set this. If neither this value 6774642e01fSmrg * nor maxPitchBytes is set, then maxPitchPixels is set to maxX. 6784642e01fSmrg * If set, it must not be smaller than maxX. 6794642e01fSmrg * 6804642e01fSmrg * @sa maxPitchBytes 6814642e01fSmrg */ 6824642e01fSmrg int maxPitchPixels; 6834642e01fSmrg 6844642e01fSmrg /** 6854642e01fSmrg * maxPitchBytes controls the pitch limitation for rendering from 6864642e01fSmrg * the card. 6874642e01fSmrg * The driver should never receive a request for rendering a pixmap 6884642e01fSmrg * that has a pitch (in bytes) beyond maxPitchBytes. 6894642e01fSmrg * 6904642e01fSmrg * Setting this field is optional -- if your hardware doesn't have 6914642e01fSmrg * a pitch limitation in bytes, don't set this. 6924642e01fSmrg * If set, it must not be smaller than maxX * 4. 6934642e01fSmrg * There's no default value for maxPitchBytes. 6944642e01fSmrg * 6954642e01fSmrg * @sa maxPitchPixels 6964642e01fSmrg */ 6974642e01fSmrg int maxPitchBytes; 6984642e01fSmrg 6994642e01fSmrg /* Hooks to allow driver to its own pixmap memory management */ 7004642e01fSmrg void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align); 7014642e01fSmrg void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv); 7026747b715Smrg /** 7036747b715Smrg * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is 7046747b715Smrg * not offscreen, which will never be accelerated and Prepare/FinishAccess won't 7056747b715Smrg * be called. 7066747b715Smrg */ 7074642e01fSmrg Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height, 7084642e01fSmrg int depth, int bitsPerPixel, int devKind, 7094642e01fSmrg pointer pPixData); 7104642e01fSmrg 7116747b715Smrg /* hooks for drivers with tiling support: 7126747b715Smrg * driver MUST fill out new_fb_pitch with valid pitch of pixmap 7136747b715Smrg */ 7146747b715Smrg void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height, 7156747b715Smrg int depth, int usage_hint, int bitsPerPixel, 7166747b715Smrg int *new_fb_pitch); 71705b261ecSmrg /** @} */ 71805b261ecSmrg} ExaDriverRec, *ExaDriverPtr; 71905b261ecSmrg 72005b261ecSmrg/** @name EXA driver flags 72105b261ecSmrg * @{ 72205b261ecSmrg */ 72305b261ecSmrg/** 72405b261ecSmrg * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support 72505b261ecSmrg * offscreen pixmaps. 72605b261ecSmrg */ 72705b261ecSmrg#define EXA_OFFSCREEN_PIXMAPS (1 << 0) 72805b261ecSmrg 72905b261ecSmrg/** 73005b261ecSmrg * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps 73105b261ecSmrg * to have a power-of-two pitch. 73205b261ecSmrg */ 73305b261ecSmrg#define EXA_OFFSCREEN_ALIGN_POT (1 << 1) 73405b261ecSmrg 73505b261ecSmrg/** 73605b261ecSmrg * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only 73705b261ecSmrg * support copies that are (left-to-right, top-to-bottom) or 73805b261ecSmrg * (right-to-left, bottom-to-top). 73905b261ecSmrg */ 74005b261ecSmrg#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2) 7414642e01fSmrg 7424642e01fSmrg/** 7434642e01fSmrg * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle 7444642e01fSmrg * all pixmap addressing and migration. 7454642e01fSmrg */ 7464642e01fSmrg#define EXA_HANDLES_PIXMAPS (1 << 3) 7474642e01fSmrg 7484642e01fSmrg/** 7494642e01fSmrg * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the 7504642e01fSmrg * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no 7514642e01fSmrg * such hooks, this flag has no effect. 7524642e01fSmrg */ 7534642e01fSmrg#define EXA_SUPPORTS_PREPARE_AUX (1 << 4) 7544642e01fSmrg 7556747b715Smrg/** 7566747b715Smrg * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks 7576747b715Smrg * can handle the source and destination occupying overlapping offscreen memory 7586747b715Smrg * areas. This allows the offscreen memory defragmentation code to defragment 7596747b715Smrg * areas where the defragmented position overlaps the fragmented position. 7606747b715Smrg * 7616747b715Smrg * Typically this is supported by traditional 2D engines but not by 3D engines. 7626747b715Smrg */ 7636747b715Smrg#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5) 7646747b715Smrg 7656747b715Smrg/** 7666747b715Smrg * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the 7676747b715Smrg * problem known software fallbacks like trapezoids. This only migrates pixmaps one way 7686747b715Smrg * into a driver pixmap and then pins it. 7696747b715Smrg */ 7706747b715Smrg#define EXA_MIXED_PIXMAPS (1 << 6) 7716747b715Smrg 77205b261ecSmrg/** @} */ 77305b261ecSmrg 7744642e01fSmrg/* in exa.c */ 7756747b715Smrgextern _X_EXPORT ExaDriverPtr 77605b261ecSmrgexaDriverAlloc(void); 77705b261ecSmrg 7786747b715Smrgextern _X_EXPORT Bool 7794642e01fSmrgexaDriverInit(ScreenPtr pScreen, 78005b261ecSmrg ExaDriverPtr pScreenInfo); 78105b261ecSmrg 7826747b715Smrgextern _X_EXPORT void 7834642e01fSmrgexaDriverFini(ScreenPtr pScreen); 78405b261ecSmrg 7856747b715Smrgextern _X_EXPORT void 78605b261ecSmrgexaMarkSync(ScreenPtr pScreen); 7876747b715Smrgextern _X_EXPORT void 78805b261ecSmrgexaWaitSync(ScreenPtr pScreen); 78905b261ecSmrg 7906747b715Smrgextern _X_EXPORT unsigned long 7914642e01fSmrgexaGetPixmapOffset(PixmapPtr pPix); 7924642e01fSmrg 7936747b715Smrgextern _X_EXPORT unsigned long 7944642e01fSmrgexaGetPixmapPitch(PixmapPtr pPix); 7954642e01fSmrg 7966747b715Smrgextern _X_EXPORT unsigned long 7974642e01fSmrgexaGetPixmapSize(PixmapPtr pPix); 7984642e01fSmrg 7996747b715Smrgextern _X_EXPORT void * 8004642e01fSmrgexaGetPixmapDriverPrivate(PixmapPtr p); 8014642e01fSmrg 8024642e01fSmrg 8034642e01fSmrg/* in exa_offscreen.c */ 8046747b715Smrgextern _X_EXPORT ExaOffscreenArea * 80505b261ecSmrgexaOffscreenAlloc(ScreenPtr pScreen, int size, int align, 80605b261ecSmrg Bool locked, 80705b261ecSmrg ExaOffscreenSaveProc save, 80805b261ecSmrg pointer privData); 80905b261ecSmrg 8106747b715Smrgextern _X_EXPORT ExaOffscreenArea * 81105b261ecSmrgexaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area); 81205b261ecSmrg 8136747b715Smrgextern _X_EXPORT void 81405b261ecSmrgExaOffscreenMarkUsed (PixmapPtr pPixmap); 81505b261ecSmrg 8166747b715Smrgextern _X_EXPORT void 81705b261ecSmrgexaEnableDisableFBAccess (int index, Bool enable); 81805b261ecSmrg 8196747b715Smrgextern _X_EXPORT Bool 8204642e01fSmrgexaDrawableIsOffscreen (DrawablePtr pDrawable); 8214642e01fSmrg 8226747b715Smrg/* in exa.c */ 8236747b715Smrgextern _X_EXPORT void 82405b261ecSmrgexaMoveInPixmap (PixmapPtr pPixmap); 82505b261ecSmrg 8266747b715Smrgextern _X_EXPORT void 82705b261ecSmrgexaMoveOutPixmap (PixmapPtr pPixmap); 82805b261ecSmrg 8294642e01fSmrg 8304642e01fSmrg/* in exa_unaccel.c */ 8316747b715Smrgextern _X_EXPORT CARD32 8324642e01fSmrgexaGetPixmapFirstPixel (PixmapPtr pPixmap); 8334642e01fSmrg 8344642e01fSmrg 83505b261ecSmrg/** 83605b261ecSmrg * Returns TRUE if the given planemask covers all the significant bits in the 83705b261ecSmrg * pixel values for pDrawable. 83805b261ecSmrg */ 83905b261ecSmrg#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ 84005b261ecSmrg (((_pm) & FbFullMask((_pDrawable)->depth)) == \ 84105b261ecSmrg FbFullMask((_pDrawable)->depth)) 84205b261ecSmrg 84305b261ecSmrg#endif /* EXA_H */ 844