1 | /*!****************************************************************************
|
---|
2 | @File pvr2d.h
|
---|
3 | @Title PVR2D external header file
|
---|
4 | @Author Imagination Technologies
|
---|
5 | @Copyright Copyright (c) by Imagination Technologies Limited.
|
---|
6 | This specification is protected by copyright laws and contains
|
---|
7 | material proprietary to Imagination Technologies Limited.
|
---|
8 | You may use and distribute this specification free of charge for implementing
|
---|
9 | the functionality therein, without altering or removing any trademark, copyright,
|
---|
10 | or other notice from the specification.
|
---|
11 | @Platform Generic
|
---|
12 | @Description PVR2D definitions for PVR2D clients
|
---|
13 | ******************************************************************************/
|
---|
14 |
|
---|
15 |
|
---|
16 | /******************************************************************************
|
---|
17 | Modifications :-
|
---|
18 | $Log: pvr2d.h $
|
---|
19 | ******************************************************************************/
|
---|
20 |
|
---|
21 | #ifndef _PVR2D_H_
|
---|
22 | #define _PVR2D_H_
|
---|
23 |
|
---|
24 | #ifdef __cplusplus
|
---|
25 | extern "C" {
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | /* PVR2D Platform-specific definitions */
|
---|
29 | #define PVR2D_EXPORT
|
---|
30 | #define PVR2D_IMPORT
|
---|
31 |
|
---|
32 |
|
---|
33 | #define PVR2D_REV_MAJOR 2
|
---|
34 | #define PVR2D_REV_MINOR 1
|
---|
35 |
|
---|
36 | typedef enum
|
---|
37 | {
|
---|
38 | PVR2D_FALSE = 0,
|
---|
39 | PVR2D_TRUE
|
---|
40 | } PVR2D_BOOL;
|
---|
41 |
|
---|
42 |
|
---|
43 | /* error codes */
|
---|
44 | typedef enum
|
---|
45 | {
|
---|
46 | PVR2D_OK = 0,
|
---|
47 | PVR2DERROR_INVALID_PARAMETER = -1,
|
---|
48 | PVR2DERROR_DEVICE_UNAVAILABLE = -2,
|
---|
49 | PVR2DERROR_INVALID_CONTEXT = -3,
|
---|
50 | PVR2DERROR_MEMORY_UNAVAILABLE = -4,
|
---|
51 | PVR2DERROR_DEVICE_NOT_PRESENT = -5,
|
---|
52 | PVR2DERROR_IOCTL_ERROR = -6,
|
---|
53 | PVR2DERROR_GENERIC_ERROR = -7,
|
---|
54 | PVR2DERROR_BLT_NOTCOMPLETE = -8,
|
---|
55 | PVR2DERROR_HW_FEATURE_NOT_SUPPORTED = -9,
|
---|
56 | PVR2DERROR_NOT_YET_IMPLEMENTED = -10,
|
---|
57 | PVR2DERROR_MAPPING_FAILED = -11
|
---|
58 | }PVR2DERROR;
|
---|
59 |
|
---|
60 |
|
---|
61 | /* pixel formats */
|
---|
62 | typedef enum
|
---|
63 | {
|
---|
64 | PVR2D_1BPP = 0,
|
---|
65 | PVR2D_RGB565,
|
---|
66 | PVR2D_ARGB4444,
|
---|
67 | PVR2D_RGB888,
|
---|
68 | PVR2D_ARGB8888,
|
---|
69 | PVR2D_ARGB1555,
|
---|
70 | PVR2D_ALPHA8,
|
---|
71 | PVR2D_ALPHA4,
|
---|
72 | PVR2D_PAL2,
|
---|
73 | PVR2D_PAL4,
|
---|
74 | PVR2D_PAL8,
|
---|
75 | PVR2D_VGAEMU
|
---|
76 |
|
---|
77 | }PVR2DFORMAT;
|
---|
78 |
|
---|
79 |
|
---|
80 | /* wrap surface type */
|
---|
81 | typedef enum
|
---|
82 | {
|
---|
83 | PVR2D_WRAPFLAG_NONCONTIGUOUS = 0,
|
---|
84 | PVR2D_WRAPFLAG_CONTIGUOUS = 1,
|
---|
85 |
|
---|
86 | }PVR2DWRAPFLAGS;
|
---|
87 |
|
---|
88 | /* flags for control information of additional blits */
|
---|
89 | typedef enum
|
---|
90 | {
|
---|
91 | PVR2D_BLIT_DISABLE_ALL = 0x0000, /* disable all additional controls */
|
---|
92 | PVR2D_BLIT_CK_ENABLE = 0x0001, /* enable colour key */
|
---|
93 | PVR2D_BLIT_GLOBAL_ALPHA_ENABLE = 0x0002, /* enable standard global alpha */
|
---|
94 | PVR2D_BLIT_PERPIXEL_ALPHABLEND_ENABLE = 0x0004, /* enable per-pixel alpha bleding */
|
---|
95 | PVR2D_BLIT_PAT_SURFACE_ENABLE = 0x0008, /* enable pattern surf (disable fill) */
|
---|
96 | PVR2D_BLIT_FULLY_SPECIFIED_ALPHA_ENABLE = 0x0010, /* enable fully specified alpha */
|
---|
97 | PVR2D_BLIT_ROT_90 = 0x0020, /* apply 90 degree rotation to the blt */
|
---|
98 | PVR2D_BLIT_ROT_180 = 0x0040, /* apply 180 degree rotation to the blt */
|
---|
99 | PVR2D_BLIT_ROT_270 = 0x0080, /* apply 270 degree rotation to the blt */
|
---|
100 | PVR2D_BLIT_COPYORDER_TL2BR = 0x0100, /* copy order overrides */
|
---|
101 | PVR2D_BLIT_COPYORDER_BR2TL = 0x0200,
|
---|
102 | PVR2D_BLIT_COPYORDER_TR2BL = 0x0400,
|
---|
103 | PVR2D_BLIT_COPYORDER_BL2TR = 0x0800,
|
---|
104 | PVR2D_BLIT_COLKEY_SOURCE = 0x1000, /* Key colour is on the source surface */
|
---|
105 | PVR2D_BLIT_COLKEY_DEST = 0x2000 /* Key colour is on the destination surface */
|
---|
106 |
|
---|
107 | } PVR2DBLITFLAGS;
|
---|
108 |
|
---|
109 | /* standard alpha-blending functions, AlphaBlendingFunc field of PVR2DBLTINFO */
|
---|
110 | typedef enum
|
---|
111 | {
|
---|
112 | PVR2D_ALPHA_OP_SRC_DSTINV = 1, /* source alpha : Cdst = Csrc*Asrc + Cdst*(1-Asrc) */
|
---|
113 | PVR2D_ALPHA_OP_SRCP_DSTINV = 2 /* premultiplied source alpha : Cdst = Csrc + Cdst*(1-Asrc) */
|
---|
114 | } PVR2D_ALPHABLENDFUNC;
|
---|
115 |
|
---|
116 | /* blend ops for fully specified alpha */
|
---|
117 | typedef enum
|
---|
118 | {
|
---|
119 | PVR2D_BLEND_OP_ZERO = 0,
|
---|
120 | PVR2D_BLEND_OP_ONE = 1,
|
---|
121 | PVR2D_BLEND_OP_SRC = 2,
|
---|
122 | PVR2D_BLEND_OP_DST = 3,
|
---|
123 | PVR2D_BLEND_OP_GLOBAL = 4,
|
---|
124 | PVR2D_BLEND_OP_SRC_PLUS_GLOBAL = 5,
|
---|
125 | PVR2D_BLEND_OP_DST_PLUS_GLOBAL = 6
|
---|
126 | }PVR2D_BLEND_OP;
|
---|
127 |
|
---|
128 |
|
---|
129 | typedef void* PVR2D_HANDLE;
|
---|
130 |
|
---|
131 |
|
---|
132 | /* Fully specified alpha blend : pAlpha field of PVR2DBLTINFO structure */
|
---|
133 | /* a fully specified Alpha Blend operation is defined as */
|
---|
134 | /* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (ALPHA_3 * DST (ALPHA)) */
|
---|
135 | /* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (ALPHA_4 * DST (RGB)) */
|
---|
136 | /* if the pre-multiplication stage is enabled then the equations become the following: */
|
---|
137 | /* PRE_MUL = ((SRC(A)) * (Global Alpha Value)) */
|
---|
138 | /* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (PRE_MUL * DST (ALPHA)) */
|
---|
139 | /* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (PRE_MUL * DST (RGB)) */
|
---|
140 | /* if the transparent source alpha stage is enabled then a source alpha of zero forces the */
|
---|
141 | /* source to be transparent for that pixel regardless of the blend equation being used. */
|
---|
142 | typedef struct _PVR2D_ALPHABLT
|
---|
143 | {
|
---|
144 | PVR2D_BLEND_OP eAlpha1;
|
---|
145 | PVR2D_BOOL bAlpha1Invert;
|
---|
146 | PVR2D_BLEND_OP eAlpha2;
|
---|
147 | PVR2D_BOOL bAlpha2Invert;
|
---|
148 | PVR2D_BLEND_OP eAlpha3;
|
---|
149 | PVR2D_BOOL bAlpha3Invert;
|
---|
150 | PVR2D_BLEND_OP eAlpha4;
|
---|
151 | PVR2D_BOOL bAlpha4Invert;
|
---|
152 | PVR2D_BOOL bPremulAlpha; /* enable pre-multiplication stage */
|
---|
153 | PVR2D_BOOL bTransAlpha; /* enable transparent source alpha stage */
|
---|
154 | PVR2D_BOOL bUpdateAlphaLookup; /* enable and update the 1555-Lookup alpha table */
|
---|
155 | unsigned char uAlphaLookup0; /* 8 bit alpha when A=0 in a 1555-Lookup surface */
|
---|
156 | unsigned char uAlphaLookup1; /* 8 bit alpha when A=1 in a 1555-Lookup surface */
|
---|
157 | unsigned char uGlobalRGB; /* Global Alpha Value for RGB, 0=transparent 255=opaque */
|
---|
158 | unsigned char uGlobalA; /* Global Alpha Value for Alpha */
|
---|
159 |
|
---|
160 | } PVR2D_ALPHABLT, *PPVR2D_ALPHABLT;
|
---|
161 |
|
---|
162 |
|
---|
163 | /* surface memory info structure */
|
---|
164 | typedef struct _PVR2DMEMINFO
|
---|
165 | {
|
---|
166 | void *pBase;
|
---|
167 | unsigned long ui32MemSize;
|
---|
168 | unsigned long ui32DevAddr;
|
---|
169 | unsigned long ulFlags;
|
---|
170 | void *hPrivateData;
|
---|
171 | void *hPrivateMapData;
|
---|
172 |
|
---|
173 | }PVR2DMEMINFO, *PPVR2DMEMINFO;
|
---|
174 |
|
---|
175 |
|
---|
176 | #define PVR2D_MAX_DEVICE_NAME 20
|
---|
177 |
|
---|
178 | typedef struct _PVR2DDEVICEINFO
|
---|
179 | {
|
---|
180 | unsigned long ulDevID;
|
---|
181 | char szDeviceName[PVR2D_MAX_DEVICE_NAME];
|
---|
182 | }PVR2DDEVICEINFO;
|
---|
183 |
|
---|
184 |
|
---|
185 | typedef struct _PVR2DISPLAYINFO
|
---|
186 | {
|
---|
187 | unsigned long ulMaxFlipChains;
|
---|
188 | unsigned long ulMaxBuffersInChain;
|
---|
189 | PVR2DFORMAT eFormat;
|
---|
190 | unsigned long ulWidth;
|
---|
191 | unsigned long ulHeight;
|
---|
192 | long lStride;
|
---|
193 | unsigned long ulMinFlipInterval;
|
---|
194 | unsigned long ulMaxFlipInterval;
|
---|
195 |
|
---|
196 | }PVR2DDISPLAYINFO;
|
---|
197 |
|
---|
198 |
|
---|
199 | typedef struct _PVR2DBLTINFO
|
---|
200 | {
|
---|
201 | unsigned long CopyCode; /* rop code */
|
---|
202 | unsigned long Colour; /* fill colour */
|
---|
203 | unsigned long ColourKey; /* colour key */
|
---|
204 | unsigned char GlobalAlphaValue; /* global alpha blending */
|
---|
205 | unsigned char AlphaBlendingFunc; /* per-pixel alpha-blending function */
|
---|
206 |
|
---|
207 | PVR2DBLITFLAGS BlitFlags; /* additional blit control information */
|
---|
208 |
|
---|
209 | PVR2DMEMINFO *pDstMemInfo; /* destination memory */
|
---|
210 | unsigned long DstOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */
|
---|
211 | long DstStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */
|
---|
212 | long DstX, DstY; /* pixel offset from start of dest surface to start of blt rectangle */
|
---|
213 | long DSizeX,DSizeY; /* blt size */
|
---|
214 | PVR2DFORMAT DstFormat; /* dest format */
|
---|
215 | unsigned long DstSurfWidth; /* size of dest surface in pixels */
|
---|
216 | unsigned long DstSurfHeight; /* size of dest surface in pixels */
|
---|
217 |
|
---|
218 | PVR2DMEMINFO *pSrcMemInfo; /* source mem, (source fields are also used for patterns) */
|
---|
219 | unsigned long SrcOffset; /* byte offset from start of allocation to src/pat surface pixel 0,0 */
|
---|
220 | long SrcStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */
|
---|
221 | long SrcX, SrcY; /* pixel offset from start of surface to start of source rectangle */
|
---|
222 | /* for patterns this is the start offset within the pattern */
|
---|
223 | long SizeX,SizeY; /* source rectangle size or pattern size in pixels */
|
---|
224 | PVR2DFORMAT SrcFormat; /* source/pattern format */
|
---|
225 | PVR2DMEMINFO *pPalMemInfo; /* source/pattern palette memory containing argb8888 colour table */
|
---|
226 | unsigned long PalOffset; /* byte offset from start of allocation to start of palette */
|
---|
227 | unsigned long SrcSurfWidth; /* size of source surface in pixels */
|
---|
228 | unsigned long SrcSurfHeight; /* size of source surface in pixels */
|
---|
229 |
|
---|
230 | PVR2DMEMINFO *pMaskMemInfo; /* mask memory, 1bpp format implied */
|
---|
231 | unsigned long MaskOffset; /* byte offset from start of allocation to mask surface pixel 0,0 */
|
---|
232 | long MaskStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */
|
---|
233 | long MaskX, MaskY; /* mask rect top left (mask size = blt size) */
|
---|
234 | unsigned long MaskSurfWidth; /* size of mask surface in pixels */
|
---|
235 | unsigned long MaskSurfHeight; /* size of mask surface in pixels */
|
---|
236 |
|
---|
237 | PPVR2D_ALPHABLT pAlpha; /* fully specified alpha blend */
|
---|
238 |
|
---|
239 | }PVR2DBLTINFO, *PPVR2DBLTINFO;
|
---|
240 |
|
---|
241 | typedef struct _PVR2DRECT
|
---|
242 | {
|
---|
243 | long left, top;
|
---|
244 | long right, bottom;
|
---|
245 | } PVR2DRECT;
|
---|
246 |
|
---|
247 | typedef struct
|
---|
248 | {
|
---|
249 | PVR2DMEMINFO *pSurfMemInfo; /* surface memory */
|
---|
250 | unsigned long SurfOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */
|
---|
251 | long Stride; /* signed stride */
|
---|
252 | PVR2DFORMAT Format;
|
---|
253 | unsigned long SurfWidth; /* surface size in pixels */
|
---|
254 | unsigned long SurfHeight;
|
---|
255 |
|
---|
256 | } PVR2D_SURFACE, *PPVR2D_SURFACE;
|
---|
257 |
|
---|
258 | typedef struct
|
---|
259 | {
|
---|
260 | unsigned long *pUseCode; /* USSE code */
|
---|
261 | unsigned long UseCodeSize; /* usse code size in bytes */
|
---|
262 |
|
---|
263 | } PVR2D_USECODE, *PPVR2D_USECODE;
|
---|
264 |
|
---|
265 | typedef struct
|
---|
266 | {
|
---|
267 | PVR2D_SURFACE sDst; /* destination surface */
|
---|
268 | PVR2D_SURFACE sSrc; /* source surface */
|
---|
269 | PVR2DRECT rcDest; /* destination rectangle */
|
---|
270 | PVR2DRECT rcSource; /* source rectangle */
|
---|
271 | PVR2D_HANDLE hUseCode; /* custom USE code (NULL implies source copy) */
|
---|
272 | unsigned long UseParams[2]; /* per-blt params for use code */
|
---|
273 |
|
---|
274 | } PVR2D_3DBLT, *PPVR2D_3DBLT;
|
---|
275 |
|
---|
276 |
|
---|
277 | #define MAKE_COPY_BLIT(src,soff,dest,doff,sx,sy,dx,dy,sz)
|
---|
278 |
|
---|
279 | typedef void* PVR2DCONTEXTHANDLE;
|
---|
280 | typedef void* PVR2DFLIPCHAINHANDLE;
|
---|
281 |
|
---|
282 |
|
---|
283 | // CopyCode field of PVR2DBLTINFO structure:
|
---|
284 | // the CopyCode field of the PVR2DBLTINFO structure should contain a rop3 or rop4 code.
|
---|
285 | // a rop3 is an 8 bit code that describes a blt with three inputs : source dest and pattern
|
---|
286 | // rop4 is a 16 bit code that describes a blt with four inputs : source dest pattern and mask
|
---|
287 | // common rop3 codes are defined below
|
---|
288 | // a colour fill blt is processed in the pattern channel as a constant colour with a rop code of 0xF0
|
---|
289 | // PVR2D_BLIT_PAT_SURFACE_ENABLE defines whether the pattern channel is a surface or a fill colour.
|
---|
290 | // a rop4 is defined by two rop3 codes, and the 1 bit-per-pixel mask surface defines which is used.
|
---|
291 | // a common rop4 is 0xAAF0 which is the mask copy blt used for text glyphs.
|
---|
292 | // CopyCode is taken to be a rop4 when pMaskMemInfo is non zero, otherwise it is assumed to be a rop3
|
---|
293 | // use the PVR2DMASKROP4 macro below to construct a rop4 from two rop3's
|
---|
294 | // rop3a is the rop used when mask pixel = 1, and rop3b when mask = 0
|
---|
295 | #define PVR2DROP4(rop3b, rop3a) ((rop3b<<8)|rop3a)
|
---|
296 |
|
---|
297 | /* common rop codes */
|
---|
298 | #define PVR2DROPclear 0x00 /* 0 (whiteness) */
|
---|
299 | #define PVR2DROPset 0xFF /* 1 (blackness) */
|
---|
300 | #define PVR2DROPnoop 0xAA /* dst (used for masked blts) */
|
---|
301 |
|
---|
302 | /* source and dest rop codes */
|
---|
303 | #define PVR2DROPand 0x88 /* src AND dst */
|
---|
304 | #define PVR2DROPandReverse 0x44 /* src AND NOT dst */
|
---|
305 | #define PVR2DROPcopy 0xCC /* src (used for source copy and alpha blts) */
|
---|
306 | #define PVR2DROPandInverted 0x22 /* NOT src AND dst */
|
---|
307 | #define PVR2DROPxor 0x66 /* src XOR dst */
|
---|
308 | #define PVR2DROPor 0xEE /* src OR dst */
|
---|
309 | #define PVR2DROPnor 0x11 /* NOT src AND NOT dst */
|
---|
310 | #define PVR2DROPequiv 0x99 /* NOT src XOR dst */
|
---|
311 | #define PVR2DROPinvert 0x55 /* NOT dst */
|
---|
312 | #define PVR2DROPorReverse 0xDD /* src OR NOT dst */
|
---|
313 | #define PVR2DROPcopyInverted 0x33 /* NOT src */
|
---|
314 | #define PVR2DROPorInverted 0xBB /* NOT src OR dst */
|
---|
315 | #define PVR2DROPnand 0x77 /* NOT src OR NOT dst */
|
---|
316 |
|
---|
317 | /* pattern rop codes */
|
---|
318 | #define PVR2DPATROPand 0xA0 /* pat AND dst */
|
---|
319 | #define PVR2DPATROPandReverse 0x50 /* pat AND NOT dst */
|
---|
320 | #define PVR2DPATROPcopy 0xF0 /* pat (used for solid color fills and pattern blts) */
|
---|
321 | #define PVR2DPATROPandInverted 0x0A /* NOT pat AND dst */
|
---|
322 | #define PVR2DPATROPxor 0x5A /* pat XOR dst */
|
---|
323 | #define PVR2DPATROPor 0xFA /* pat OR dst */
|
---|
324 | #define PVR2DPATROPnor 0x05 /* NOT pat AND NOT dst */
|
---|
325 | #define PVR2DPATROPequiv 0xA5 /* NOT pat XOR dst */
|
---|
326 | #define PVR2DPATROPinvert 0x55 /* NOT dst */
|
---|
327 | #define PVR2DPATROPorReverse 0xF5 /* pat OR NOT dst */
|
---|
328 | #define PVR2DPATROPcopyInverted 0x0F /* NOT pat */
|
---|
329 | #define PVR2DPATROPorInverted 0xAF /* NOT pat OR dst */
|
---|
330 | #define PVR2DPATROPnand 0x5F /* NOT pat OR NOT dst */
|
---|
331 |
|
---|
332 | /* common rop4 codes */
|
---|
333 | #define PVR2DROP4MaskedCopy PVR2DROP4(PVR2DROPnoop,PVR2DROPcopy) /* masked source copy blt (used for rounded window corners etc) */
|
---|
334 | #define PVR2DROP4MaskedFill PVR2DROP4(PVR2DROPnoop,PVR2DPATROPcopy) /* masked colour fill blt (used for text) */
|
---|
335 |
|
---|
336 | /* Legacy support */
|
---|
337 | #define PVR2DROP3_PATMASK PVR2DPATROPcopy
|
---|
338 | #define PVR2DROP3_SRCMASK PVR2DROPcopy
|
---|
339 |
|
---|
340 | /* pixmap memory alignment */
|
---|
341 | #define PVR2D_ALIGNMENT_4 4 /* DWORD alignment */
|
---|
342 | #define PVR2D_ALIGNMENT_ANY 0 /* no alignment */
|
---|
343 | #define PVR2D_ALIGNMENT_PALETTE 16 /* 16 byte alignment is required for palettes */
|
---|
344 |
|
---|
345 | /* Heap number for PVR2DGetFrameBuffer */
|
---|
346 | #define PVR2D_FB_PRIMARY_SURFACE 0
|
---|
347 |
|
---|
348 | #define PVR2D_PRESENT_PROPERTY_SRCSTRIDE (1 << 0)
|
---|
349 | #define PVR2D_PRESENT_PROPERTY_DSTSIZE (1 << 1)
|
---|
350 | #define PVR2D_PRESENT_PROPERTY_DSTPOS (1 << 2)
|
---|
351 | #define PVR2D_PRESENT_PROPERTY_CLIPRECTS (1 << 3)
|
---|
352 | #define PVR2D_PRESENT_PROPERTY_INTERVAL (1 << 4)
|
---|
353 |
|
---|
354 |
|
---|
355 | #define PVR2D_CREATE_FLIPCHAIN_SHARED (1 << 0)
|
---|
356 | #define PVR2D_CREATE_FLIPCHAIN_QUERY (1 << 1)
|
---|
357 |
|
---|
358 | /* Functions that the library exports */
|
---|
359 |
|
---|
360 | PVR2D_IMPORT
|
---|
361 | int PVR2DEnumerateDevices(PVR2DDEVICEINFO *pDevInfo);
|
---|
362 |
|
---|
363 | PVR2D_IMPORT
|
---|
364 | PVR2DERROR PVR2DCreateDeviceContext(unsigned long ulDevID,
|
---|
365 | PVR2DCONTEXTHANDLE* phContext,
|
---|
366 | unsigned long ulFlags);
|
---|
367 |
|
---|
368 | PVR2D_IMPORT
|
---|
369 | PVR2DERROR PVR2DDestroyDeviceContext(PVR2DCONTEXTHANDLE hContext);
|
---|
370 |
|
---|
371 | PVR2D_IMPORT
|
---|
372 | PVR2DERROR PVR2DGetDeviceInfo(PVR2DCONTEXTHANDLE hContext,
|
---|
373 | PVR2DDISPLAYINFO *pDisplayInfo);
|
---|
374 |
|
---|
375 | PVR2D_IMPORT
|
---|
376 | PVR2DERROR PVR2DGetScreenMode(PVR2DCONTEXTHANDLE hContext,
|
---|
377 | PVR2DFORMAT *pFormat,
|
---|
378 | long *plWidth,
|
---|
379 | long *plHeight,
|
---|
380 | long *plStride,
|
---|
381 | int *piRefreshRate);
|
---|
382 |
|
---|
383 | PVR2D_IMPORT
|
---|
384 | PVR2DERROR PVR2DGetFrameBuffer(PVR2DCONTEXTHANDLE hContext,
|
---|
385 | int nHeap,
|
---|
386 | PVR2DMEMINFO **ppsMemInfo);
|
---|
387 |
|
---|
388 | PVR2D_IMPORT
|
---|
389 | PVR2DERROR PVR2DMemAlloc(PVR2DCONTEXTHANDLE hContext,
|
---|
390 | unsigned long ulBytes,
|
---|
391 | unsigned long ulAlign,
|
---|
392 | unsigned long ulFlags,
|
---|
393 | PVR2DMEMINFO **ppsMemInfo);
|
---|
394 |
|
---|
395 | PVR2D_IMPORT
|
---|
396 | PVR2DERROR PVR2DMemWrap(PVR2DCONTEXTHANDLE hContext,
|
---|
397 | void *pMem,
|
---|
398 | unsigned long ulFlags,
|
---|
399 | unsigned long ulBytes,
|
---|
400 | unsigned long alPageAddress[],
|
---|
401 | PVR2DMEMINFO **ppsMemInfo);
|
---|
402 |
|
---|
403 | PVR2D_IMPORT
|
---|
404 | PVR2DERROR PVR2DMemMap(PVR2DCONTEXTHANDLE hContext,
|
---|
405 | unsigned long ulFlags,
|
---|
406 | void *hPrivateMapData,
|
---|
407 | PVR2DMEMINFO **ppsDstMem);
|
---|
408 |
|
---|
409 | PVR2D_IMPORT
|
---|
410 | PVR2DERROR PVR2DMemFree(PVR2DCONTEXTHANDLE hContext,
|
---|
411 | PVR2DMEMINFO *psMemInfo);
|
---|
412 |
|
---|
413 | PVR2D_IMPORT
|
---|
414 | PVR2DERROR PVR2DBlt(PVR2DCONTEXTHANDLE hContext,
|
---|
415 | PVR2DBLTINFO *pBltInfo);
|
---|
416 |
|
---|
417 | PVR2D_IMPORT
|
---|
418 | PVR2DERROR PVR2DBltClipped(PVR2DCONTEXTHANDLE hContext,
|
---|
419 | PVR2DBLTINFO *pBltInfo,
|
---|
420 | unsigned long ulNumClipRects,
|
---|
421 | PVR2DRECT *pClipRects);
|
---|
422 |
|
---|
423 | PVR2D_IMPORT
|
---|
424 | PVR2DERROR PVR2DQueryBlitsComplete(PVR2DCONTEXTHANDLE hContext,
|
---|
425 | PVR2DMEMINFO *pMemInfo,
|
---|
426 | unsigned int uiWaitForComplete);
|
---|
427 |
|
---|
428 | PVR2D_IMPORT
|
---|
429 | PVR2DERROR PVR2DSetPresentBltProperties(PVR2DCONTEXTHANDLE hContext,
|
---|
430 | unsigned long ulPropertyMask,
|
---|
431 | long lSrcStride,
|
---|
432 | unsigned long ulDstWidth,
|
---|
433 | unsigned long ulDstHeight,
|
---|
434 | long lDstXPos,
|
---|
435 | long lDstYPos,
|
---|
436 | unsigned long ulNumClipRects,
|
---|
437 | PVR2DRECT *pClipRects,
|
---|
438 | unsigned long ulSwapInterval);
|
---|
439 |
|
---|
440 | PVR2D_IMPORT
|
---|
441 | PVR2DERROR PVR2DPresentBlt(PVR2DCONTEXTHANDLE hContext,
|
---|
442 | PVR2DMEMINFO *pMemInfo,
|
---|
443 | long lRenderID);
|
---|
444 |
|
---|
445 | PVR2D_IMPORT
|
---|
446 | PVR2DERROR PVR2DCreateFlipChain(PVR2DCONTEXTHANDLE hContext,
|
---|
447 | unsigned long ulFlags,
|
---|
448 | unsigned long ulNumBuffers,
|
---|
449 | unsigned long ulWidth,
|
---|
450 | unsigned long ulHeight,
|
---|
451 | PVR2DFORMAT eFormat,
|
---|
452 | long *plStride,
|
---|
453 | unsigned long *pulFlipChainID,
|
---|
454 | PVR2DFLIPCHAINHANDLE *phFlipChain);
|
---|
455 |
|
---|
456 | PVR2D_IMPORT
|
---|
457 | PVR2DERROR PVR2DDestroyFlipChain(PVR2DCONTEXTHANDLE hContext,
|
---|
458 | PVR2DFLIPCHAINHANDLE hFlipChain);
|
---|
459 |
|
---|
460 | PVR2D_IMPORT
|
---|
461 | PVR2DERROR PVR2DGetFlipChainBuffers(PVR2DCONTEXTHANDLE hContext,
|
---|
462 | PVR2DFLIPCHAINHANDLE hFlipChain,
|
---|
463 | unsigned long *pulNumBuffers,
|
---|
464 | PVR2DMEMINFO *psMemInfo[]);
|
---|
465 |
|
---|
466 | PVR2D_IMPORT
|
---|
467 | PVR2DERROR PVR2DSetPresentFlipProperties(PVR2DCONTEXTHANDLE hContext,
|
---|
468 | PVR2DFLIPCHAINHANDLE hFlipChain,
|
---|
469 | unsigned long ulPropertyMask,
|
---|
470 | long lDstXPos,
|
---|
471 | long lDstYPos,
|
---|
472 | unsigned long ulNumClipRects,
|
---|
473 | PVR2DRECT *pClipRects,
|
---|
474 | unsigned long ulSwapInterval);
|
---|
475 |
|
---|
476 | PVR2D_IMPORT
|
---|
477 | PVR2DERROR PVR2DPresentFlip(PVR2DCONTEXTHANDLE hContext,
|
---|
478 | PVR2DFLIPCHAINHANDLE hFlipChain,
|
---|
479 | PVR2DMEMINFO *psMemInfo,
|
---|
480 | long lRenderID);
|
---|
481 |
|
---|
482 | PVR2D_IMPORT
|
---|
483 | PVR2DERROR PVR2DGetAPIRev(long *lRevMajor, long *lRevMinor);
|
---|
484 |
|
---|
485 | PVR2D_IMPORT
|
---|
486 | PVR2DERROR PVR2DLoadUseCode (const PVR2DCONTEXTHANDLE hContext, const unsigned char *pUseCode,
|
---|
487 | const unsigned long UseCodeSize, PVR2D_HANDLE *pUseCodeHandle);
|
---|
488 | PVR2D_IMPORT
|
---|
489 | PVR2DERROR PVR2DFreeUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_HANDLE hUseCodeHandle);
|
---|
490 |
|
---|
491 | PVR2D_IMPORT
|
---|
492 | PVR2DERROR PVR2DBlt3D (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT pBlt3D);
|
---|
493 |
|
---|
494 | #ifdef __cplusplus
|
---|
495 | }
|
---|
496 | #endif
|
---|
497 |
|
---|
498 | #endif /* _PVR2D_H_ */
|
---|
499 |
|
---|
500 | /******************************************************************************
|
---|
501 | End of file (pvr2d.h)
|
---|
502 | ******************************************************************************/
|
---|