/*
*
* Copyright (C) 2000 Keith Packard
* 2004 Eric Anholt
* 2005 Zack Rusin
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of copyright holders not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Copyright holders make no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef EXA_H
#define EXA_H
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "windowstr.h"
#include "gcstruct.h"
#include "picturestr.h"
#define EXA_VERSION_MAJOR 0
#define EXA_VERSION_RELEASE 0
typedef enum _ExaOffscreenState {
struct _ExaOffscreenArea {
int score;
};
typedef struct _ExaCardInfo {
/* These are here because I don't want to be adding more to
* ScrnInfoRec */
unsigned long offScreenBase;
/* It's fix.smem_len.
This one could be potentially substituted by ScrnInfoRec
videoRam member, but I do not want to be doing the silly
<< 10, >>10 all over the place */
unsigned long memorySize;
int pixmapOffsetAlign;
int pixmapPitchAlign;
int flags;
/* The coordinate limitations for rendering for this hardware.
* Exa breaks larger pixmaps into smaller pieces and calls Prepare multiple times
* to handle larger pixmaps
*/
int maxX;
int maxY;
/* private */
int lastMarker;
typedef struct _ExaAccelInfo {
* This is an important feature for handling strange corner cases
* in hardware that are poorly expressed through flags.
*/
int alu,
* This is an important feature for handling strange corner cases
* in hardware that are poorly expressed through flags.
*/
int dx,
int dy,
int alu,
int srcX,
int srcY,
int dstX,
int dstY,
int width,
int height);
/* The Composite hooks are a wrapper around the Composite operation.
* The CheckComposite occurs before pixmap migration occurs,
* and may fail for many hardware-dependent reasons.
* PrepareComposite should not fail, and the Bool return may
* not be necessary if we can
*/
int srcX,
int srcY,
int maskX,
int maskY,
int dstX,
int dstY,
int width,
int height);
/* Attempt to upload the data from src into the rectangle of the
* in-framebuffer pDst beginning at x,y and of width w,h. May fail.
*/
int x,
int y,
int w,
int h,
char *src,
int src_pitch);
/* Attempt to download the rectangle from the in-framebuffer pSrc into
* dst, given the pitch. May fail. Since it is likely
* accelerated, a markSync will follow it as with other acceleration
* hooks.
*/
int x, int y,
int w, int h,
/* Should return a hrdware-dependent marker number which can
* be waited for with WaitMarker. It can be not implemented in which
* case WaitMarker must wait for idle on any given marker
* number.
*/
/* These are wrapping all fb or composite operations that will cause
* a direct access to the framebuffer. You can use them to update
* endian swappers, force migration to RAM, or whatever else you find
* access, though they will have a different index. If your hardware
* doesn't have enough separate configurable swapper, you can return
* FALSE from PrepareAccess() to force EXA to migrate the pixmap to RAM.
* Note that DownloadFromScreen and UploadToScreen can both be called
* between PrepareAccess() and FinishAccess(). If they need to use a
* swapper, they should save & restore its setting.
*/
#define EXA_PREPARE_DEST 0
typedef struct _ExaDriver {
#define EXA_VERSION \
unsigned int
exaGetVersion(void);
void
void
void
unsigned long
unsigned long
unsigned long
#endif /* EXA_H */