~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/kdrive/ati/ati_draw.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
Import upstream version 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright � 2004 Eric Anholt
 
3
 *
 
4
 * Permission to use, copy, modify, distribute, and sell this software and its
 
5
 * documentation for any purpose is hereby granted without fee, provided that
 
6
 * the above copyright notice appear in all copies and that both that
 
7
 * copyright notice and this permission notice appear in supporting
 
8
 * documentation, and that the name of Eric Anholt not be used in
 
9
 * advertising or publicity pertaining to distribution of the software without
 
10
 * specific, written prior permission.  Eric Anholt makes no
 
11
 * representations about the suitability of this software for any purpose.  It
 
12
 * is provided "as is" without express or implied warranty.
 
13
 *
 
14
 * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
15
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
16
 * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
17
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
18
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 
19
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
20
 * PERFORMANCE OF THIS SOFTWARE.
 
21
 */
 
22
/* $Header: /cvs/xorg/xserver/xorg/hw/kdrive/ati/ati_draw.h,v 1.10 2005/12/27 08:25:55 ajax Exp $ */
 
23
 
 
24
#ifndef _ATI_DRAW_H_
 
25
#define _ATI_DRAW_H_
 
26
 
 
27
Bool ATIGetOffsetPitch(ATIScreenInfo *atis, int bpp, CARD32 *pitch_offset,
 
28
    int offset, int pitch);
 
29
Bool ATIGetPixmapOffsetPitch(PixmapPtr pPix, CARD32 *pitch_offset);
 
30
 
 
31
Bool R128CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
 
32
    PicturePtr pDstPicture);
 
33
Bool R128PrepareComposite(int op, PicturePtr pSrcPicture,
 
34
    PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc,
 
35
    PixmapPtr pMask, PixmapPtr pDst);
 
36
void R128Composite(int srcX, int srcY, int maskX, int maskY, int dstX, int dstY,
 
37
    int w, int h);
 
38
void R128DoneComposite(void);
 
39
 
 
40
Bool R128PrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst);
 
41
void R128Trapezoids(KaaTrapezoid *traps, int ntraps);
 
42
void R128DoneTrapezoids(void);
 
43
 
 
44
Bool R100CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
 
45
    PicturePtr pDstPicture);
 
46
Bool R100PrepareComposite(int op, PicturePtr pSrcPicture,
 
47
    PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc,
 
48
    PixmapPtr pMask, PixmapPtr pDst);
 
49
Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
 
50
    PicturePtr pDstPicture);
 
51
Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
 
52
    PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc,
 
53
    PixmapPtr pMask, PixmapPtr pDst);
 
54
void RadeonComposite(int srcX, int srcY, int maskX, int maskY, int dstX,
 
55
    int dstY, int w, int h);
 
56
void RadeonDoneComposite(void);
 
57
 
 
58
Bool RadeonPrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst);
 
59
void RadeonTrapezoids(KaaTrapezoid *traps, int ntraps);
 
60
void RadeonDoneTrapezoids(void);
 
61
 
 
62
void RadeonSwitchTo2D(ATIScreenInfo *atis);
 
63
void RadeonSwitchTo3D(ATIScreenInfo *atis);
 
64
void ATIWaitIdle(ATIScreenInfo *atis);
 
65
 
 
66
#define ATI_TRACE_FALL 0
 
67
#define ATI_TRACE_DRAW 0
 
68
 
 
69
#if ATI_TRACE_FALL
 
70
#define ATI_FALLBACK(x)                 \
 
71
do {                                    \
 
72
        ErrorF("%s: ", __FUNCTION__);   \
 
73
        ErrorF x;                       \
 
74
        return FALSE;                   \
 
75
} while (0)
 
76
#else
 
77
#define ATI_FALLBACK(x) return FALSE
 
78
#endif
 
79
 
 
80
#if ATI_TRACE_DRAW
 
81
#define ENTER_DRAW(pix) ATIEnterDraw(pix, __FUNCTION__)
 
82
#define LEAVE_DRAW(pix) ATILeaveDraw(pix, __FUNCTION__)
 
83
 
 
84
void
 
85
ATIEnterDraw (PixmapPtr pPixmap, char *function);
 
86
 
 
87
void
 
88
ATILeaveDraw (PixmapPtr pPixmap, char *function);
 
89
#else /* ATI_TRACE */
 
90
#define ENTER_DRAW(pix)
 
91
#define LEAVE_DRAW(pix)
 
92
#endif /* !ATI_TRACE */
 
93
 
 
94
#endif /* _ATI_DRAW_H_ */