/[pcsx2_0.9.7]/branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/Mem.h
ViewVC logotype

Contents of /branch/debug/0.X/0.9.X/0.9.7/ramdump-lateset/plugins/zzogl-pg/opengl/Mem.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314 - (show annotations) (download)
Sun Dec 26 18:56:19 2010 UTC (9 years, 1 month ago) by william
File MIME type: text/plain
File size: 20889 byte(s)
** merged upstream r4049 (re-integration of GregMiscellaneous branch)
** applied patched to GigTranser.cpp in ZZOgl from r4140 to change 'static int count = 0;' to 'static int path1_count = 0;')
1 /* ZZ Open GL graphics plugin
2 * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
3 * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #ifndef __MEM_H__
21 #define __MEM_H__
22
23 #include <assert.h>
24 #include <vector>
25
26 // works only when base is a power of 2
27 static __forceinline int ROUND_UPPOW2(int val, int base) { return (((val) + (base - 1))&~(base - 1)); }
28 static __forceinline int ROUND_DOWNPOW2(int val, int base) { return ((val)&~(base - 1)); }
29 static __forceinline int MOD_POW2(int val, int base) { return ((val)&(base - 1)); }
30
31 // d3d texture dims
32 const int BLOCK_TEXWIDTH = 128;
33 const int BLOCK_TEXHEIGHT = 512;
34
35 extern PCSX2_ALIGNED16(u32 tempblock[64]);
36
37 typedef u32(*_getPixelAddress)(int x, int y, u32 bp, u32 bw);
38 typedef u32(*_getPixelAddress_0)(int x, int y, u32 bw);
39 typedef void (*_writePixel)(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw);
40 typedef void (*_writePixel_0)(void* pmem, int x, int y, u32 pixel, u32 bw);
41 typedef u32(*_readPixel)(const void* pmem, int x, int y, u32 bp, u32 bw);
42 typedef u32(*_readPixel_0)(const void* pmem, int x, int y, u32 bw);
43 typedef int (*_TransferHostLocal)(const void* pbyMem, u32 nQWordSize);
44 typedef void (*_TransferLocalHost)(void* pbyMem, u32 nQWordSize);
45 typedef void (*_SwizzleBlock)(u8 *dst, u8 *src, int pitch);
46
47 extern _getPixelAddress_0 getPixelFun_0[64];
48 extern _writePixel_0 writePixelFun_0[64];
49 extern _readPixel_0 readPixelFun_0[64];
50 extern _writePixel writePixelFun[64];
51 extern _readPixel readPixelFun[64];
52 extern _SwizzleBlock swizzleBlockFun[64];
53 extern _SwizzleBlock swizzleBlockUnFun[64];
54 extern _TransferHostLocal TransferHostLocalFun[64];
55 extern _TransferLocalHost TransferLocalHostFun[64];
56
57 // Both of the following structs should probably be local class variables or in a namespace,
58 // but this works for the moment.
59
60 struct TransferData
61 {
62 // Signed because Visual C++ is weird.
63 s32 widthlimit;
64 u32 blockbits;
65 u32 blockwidth;
66 u32 blockheight;
67 u32 transfersize;
68 u32 psm;
69 };
70
71 struct TransferFuncts
72 {
73 _writePixel_0 wp;
74 _getPixelAddress_0 gp;
75 _SwizzleBlock Swizzle, Swizzle_u;
76 __forceinline TransferFuncts(_writePixel_0 writePix, _getPixelAddress_0 readPix, _SwizzleBlock s, _SwizzleBlock su)
77 {
78 wp = writePix;
79 gp = readPix;
80 Swizzle = s;
81 Swizzle_u = su;
82 }
83 __forceinline TransferFuncts(u32 psm)
84 {
85 wp = writePixelFun_0[psm];
86 gp = getPixelFun_0[psm];
87 Swizzle = swizzleBlockFun[psm];
88 Swizzle_u = swizzleBlockUnFun[psm];
89 }
90 };
91
92 extern TransferData tData[64];
93 // rest not visible externally
94
95 extern u32 g_blockTable32[4][8];
96 extern u32 g_blockTable32Z[4][8];
97 extern u32 g_blockTable16[8][4];
98 extern u32 g_blockTable16S[8][4];
99 extern u32 g_blockTable16Z[8][4];
100 extern u32 g_blockTable16SZ[8][4];
101 extern u32 g_blockTable8[4][8];
102 extern u32 g_blockTable4[8][4];
103
104 extern u32 g_columnTable32[8][8];
105 extern u32 g_columnTable16[8][16];
106 extern u32 g_columnTable8[16][16];
107 extern u32 g_columnTable4[16][32];
108
109 extern u32 g_pageTable32[32][64];
110 extern u32 g_pageTable32Z[32][64];
111 extern u32 g_pageTable16[64][64];
112 extern u32 g_pageTable16S[64][64];
113 extern u32 g_pageTable16Z[64][64];
114 extern u32 g_pageTable16SZ[64][64];
115 extern u32 g_pageTable8[64][128];
116 extern u32 g_pageTable4[128][128];
117
118 struct BLOCK
119 {
120 BLOCK() { memset(this, 0, sizeof(BLOCK)); }
121
122 // shader constants for this block
123 float4 vTexBlock;
124 float4 vTexDims;
125 int width, height; // dims of one page in pixels
126 int ox, oy, mult;
127 int bpp;
128 int colwidth, colheight;
129 u32* pageTable; // offset inside each page
130 u32* blockTable;
131 u32* columnTable;
132
133 _getPixelAddress getPixelAddress;
134 _getPixelAddress_0 getPixelAddress_0;
135 _writePixel writePixel;
136 _writePixel_0 writePixel_0;
137 _readPixel readPixel;
138 _readPixel_0 readPixel_0;
139 _TransferHostLocal TransferHostLocal;
140 _TransferLocalHost TransferLocalHost;
141
142 // texture must be of dims BLOCK_TEXWIDTH and BLOCK_TEXHEIGHT
143 static void FillBlocks(std::vector<char>& vBlockData, std::vector<char>& vBilinearData, int floatfmt);
144
145 void SetDim(u32 bw, u32 bh, u32 ox2, u32 oy2, u32 mult2)
146 {
147 ox = ox2;
148 oy = oy2;
149 mult = mult2;
150 vTexDims = float4(BLOCK_TEXWIDTH/(float)(bw), BLOCK_TEXHEIGHT/(float)bh, 0, 0);
151 vTexBlock = float4((float)bw/BLOCK_TEXWIDTH, (float)bh/BLOCK_TEXHEIGHT, ((float)ox+0.2f)/BLOCK_TEXWIDTH, ((float)oy+0.05f)/BLOCK_TEXHEIGHT);
152 width = bw;
153 height = bh;
154 colwidth = bh / 4;
155 colheight = bw / 8;
156 bpp = 32/mult;
157 }
158
159 void SetFun(u32 psm)
160 {
161 writePixel = writePixelFun[psm];
162 writePixel_0 = writePixelFun_0[psm];
163 readPixel = readPixelFun[psm];
164 readPixel_0 = readPixelFun_0[psm];
165 TransferHostLocal = TransferHostLocalFun[psm];
166 TransferLocalHost = TransferLocalHostFun[psm];
167 }
168
169 void SetTable(u32 psm)
170 {
171 switch (psm) {
172 case PSMCT32:
173 assert( sizeof(g_pageTable32) == width * height * sizeof(g_pageTable32[0][0]) );
174 pageTable = &g_pageTable32[0][0];
175 blockTable = &g_blockTable32[0][0];
176 columnTable = &g_columnTable32[0][0];
177 break;
178 case PSMT32Z:
179 assert( sizeof(g_pageTable32Z) == width * height * sizeof(g_pageTable32Z[0][0]) );
180 pageTable = &g_pageTable32Z[0][0];
181 blockTable = &g_blockTable32Z[0][0];
182 columnTable = &g_columnTable32[0][0];
183 break;
184 case PSMCT16:
185 assert( sizeof(g_pageTable16) == width * height * sizeof(g_pageTable16[0][0]) );
186 pageTable = &g_pageTable16[0][0];
187 blockTable = &g_blockTable16[0][0];
188 columnTable = &g_columnTable16[0][0];
189 break;
190 case PSMCT16S:
191 assert( sizeof(g_pageTable16S) == width * height * sizeof(g_pageTable16S[0][0]) );
192 pageTable = &g_pageTable16S[0][0];
193 blockTable = &g_blockTable16S[0][0];
194 columnTable = &g_columnTable16[0][0];
195 break;
196 case PSMT16Z:
197 assert( sizeof(g_pageTable16Z) == width * height * sizeof(g_pageTable16Z[0][0]) );
198 pageTable = &g_pageTable16Z[0][0];
199 blockTable = &g_blockTable16Z[0][0];
200 columnTable = &g_columnTable16[0][0];
201 break;
202 case PSMT16SZ:
203 assert( sizeof(g_pageTable16SZ) == width * height * sizeof(g_pageTable16SZ[0][0]) );
204 pageTable = &g_pageTable16SZ[0][0];
205 blockTable = &g_blockTable16SZ[0][0];
206 columnTable = &g_columnTable16[0][0];
207 break;
208 case PSMT8:
209 assert( sizeof(g_pageTable8) == width * height * sizeof(g_pageTable8[0][0]) );
210 pageTable = &g_pageTable8[0][0];
211 blockTable = &g_blockTable8[0][0];
212 columnTable = &g_columnTable8[0][0];
213 break;
214 case PSMT4:
215 assert( sizeof(g_pageTable4) == width * height * sizeof(g_pageTable4[0][0]) );
216 pageTable = &g_pageTable4[0][0];
217 blockTable = &g_blockTable4[0][0];
218 columnTable = &g_columnTable4[0][0];
219 break;
220 default:
221 pageTable = NULL;
222 blockTable = NULL;
223 columnTable = NULL;
224 break;
225 }
226 }
227 };
228
229 extern BLOCK m_Blocks[];
230
231 #define getPixelAddress24 getPixelAddress32
232 #define getPixelAddress24_0 getPixelAddress32_0
233 #define getPixelAddress8H getPixelAddress32
234 #define getPixelAddress8H_0 getPixelAddress32_0
235 #define getPixelAddress4HL getPixelAddress32
236 #define getPixelAddress4HL_0 getPixelAddress32_0
237 #define getPixelAddress4HH getPixelAddress32
238 #define getPixelAddress4HH_0 getPixelAddress32_0
239 #define getPixelAddress24Z getPixelAddress32Z
240 #define getPixelAddress24Z_0 getPixelAddress32Z_0
241
242 static __forceinline u32 getPixelAddress32(int x, int y, u32 bp, u32 bw)
243 {
244 u32 basepage = ((y >> 5) * (bw >> 6)) + (x >> 6);
245 u32 word = bp * 64 + basepage * 2048 + g_pageTable32[y&31][x&63];
246 return word;
247 }
248
249 static __forceinline u32 getPixelAddress16(int x, int y, u32 bp, u32 bw)
250 {
251 u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6);
252 u32 word = bp * 128 + basepage * 4096 + g_pageTable16[y&63][x&63];
253 return word;
254 }
255
256 static __forceinline u32 getPixelAddress16S(int x, int y, u32 bp, u32 bw)
257 {
258 u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6);
259 u32 word = bp * 128 + basepage * 4096 + g_pageTable16S[y&63][x&63];
260 return word;
261 }
262
263 static __forceinline u32 getPixelAddress8(int x, int y, u32 bp, u32 bw)
264 {
265 u32 basepage = ((y >> 6) * ((bw + 127) >> 7)) + (x >> 7);
266 u32 word = bp * 256 + basepage * 8192 + g_pageTable8[y&63][x&127];
267 return word;
268 }
269
270 static __forceinline u32 getPixelAddress4(int x, int y, u32 bp, u32 bw)
271 {
272 u32 basepage = ((y >> 7) * ((bw + 127) >> 7)) + (x >> 7);
273 u32 word = bp * 512 + basepage * 16384 + g_pageTable4[y&127][x&127];
274 return word;
275 }
276
277 static __forceinline u32 getPixelAddress32Z(int x, int y, u32 bp, u32 bw)
278 {
279 u32 basepage = ((y >> 5) * (bw >> 6)) + (x >> 6);
280 u32 word = bp * 64 + basepage * 2048 + g_pageTable32Z[y&31][x&63];
281 return word;
282 }
283
284 static __forceinline u32 getPixelAddress16Z(int x, int y, u32 bp, u32 bw)
285 {
286 u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6);
287 u32 word = bp * 128 + basepage * 4096 + g_pageTable16Z[y&63][x&63];
288 return word;
289 }
290
291 static __forceinline u32 getPixelAddress16SZ(int x, int y, u32 bp, u32 bw)
292 {
293 u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6);
294 u32 word = bp * 128 + basepage * 4096 + g_pageTable16SZ[y&63][x&63];
295 return word;
296 }
297
298 ///////////////
299
300 static __forceinline void writePixel32(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
301 {
302 ((u32*)pmem)[getPixelAddress32(x, y, bp, bw)] = pixel;
303 }
304
305 static __forceinline void writePixel24(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
306 {
307 u8 *buf = (u8*) & ((u32*)pmem)[getPixelAddress32(x, y, bp, bw)];
308 u8 *pix = (u8*) & pixel;
309 buf[0] = pix[0];
310 buf[1] = pix[1];
311 buf[2] = pix[2];
312 }
313
314 static __forceinline void writePixel16(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
315 {
316 ((u16*)pmem)[getPixelAddress16(x, y, bp, bw)] = pixel;
317 }
318
319 static __forceinline void writePixel16S(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
320 {
321 ((u16*)pmem)[getPixelAddress16S(x, y, bp, bw)] = pixel;
322 }
323
324 static __forceinline void writePixel8(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
325 {
326 ((u8*)pmem)[getPixelAddress8(x, y, bp, bw)] = pixel;
327 }
328
329 static __forceinline void writePixel8H(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
330 {
331 ((u8*)pmem)[4*getPixelAddress32(x, y, bp, bw)+3] = pixel;
332 }
333
334 static __forceinline void writePixel4(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
335 {
336 u32 addr = getPixelAddress4(x, y, bp, bw);
337 u8 pix = ((u8*)pmem)[addr/2];
338
339 if (addr & 0x1)((u8*)pmem)[addr/2] = (pix & 0x0f) | (pixel << 4);
340 else ((u8*)pmem)[addr/2] = (pix & 0xf0) | (pixel);
341 }
342
343 static __forceinline void writePixel4HL(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
344 {
345 u8 *p = (u8*)pmem + 4 * getPixelAddress4HL(x, y, bp, bw) + 3;
346 *p = (*p & 0xf0) | pixel;
347 }
348
349 static __forceinline void writePixel4HH(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
350 {
351 u8 *p = (u8*)pmem + 4 * getPixelAddress4HH(x, y, bp, bw) + 3;
352 *p = (*p & 0x0f) | (pixel << 4);
353 }
354
355 static __forceinline void writePixel32Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
356 {
357 ((u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)] = pixel;
358 }
359
360 static __forceinline void writePixel24Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
361 {
362 u8 *buf = (u8*)pmem + 4 * getPixelAddress32Z(x, y, bp, bw);
363 u8 *pix = (u8*) & pixel;
364 buf[0] = pix[0];
365 buf[1] = pix[1];
366 buf[2] = pix[2];
367 }
368
369 static __forceinline void writePixel16Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
370 {
371 ((u16*)pmem)[getPixelAddress16Z(x, y, bp, bw)] = pixel;
372 }
373
374 static __forceinline void writePixel16SZ(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw)
375 {
376 ((u16*)pmem)[getPixelAddress16SZ(x, y, bp, bw)] = pixel;
377 }
378
379 ///////////////
380
381 static __forceinline u32 readPixel32(const void* pmem, int x, int y, u32 bp, u32 bw)
382 {
383 return ((const u32*)pmem)[getPixelAddress32(x, y, bp, bw)];
384 }
385
386 static __forceinline u32 readPixel24(const void* pmem, int x, int y, u32 bp, u32 bw)
387 {
388 return ((const u32*)pmem)[getPixelAddress32(x, y, bp, bw)] & 0xffffff;
389 }
390
391 static __forceinline u32 readPixel16(const void* pmem, int x, int y, u32 bp, u32 bw)
392 {
393 return ((const u16*)pmem)[getPixelAddress16(x, y, bp, bw)];
394 }
395
396 static __forceinline u32 readPixel16S(const void* pmem, int x, int y, u32 bp, u32 bw)
397 {
398 return ((const u16*)pmem)[getPixelAddress16S(x, y, bp, bw)];
399 }
400
401 static __forceinline u32 readPixel8(const void* pmem, int x, int y, u32 bp, u32 bw)
402 {
403 return ((const u8*)pmem)[getPixelAddress8(x, y, bp, bw)];
404 }
405
406 static __forceinline u32 readPixel8H(const void* pmem, int x, int y, u32 bp, u32 bw)
407 {
408 return ((const u8*)pmem)[4*getPixelAddress32(x, y, bp, bw) + 3];
409 }
410
411 static __forceinline u32 readPixel4(const void* pmem, int x, int y, u32 bp, u32 bw)
412 {
413 u32 addr = getPixelAddress4(x, y, bp, bw);
414 u8 pix = ((const u8*)pmem)[addr/2];
415
416 if (addr & 0x1)
417 return pix >> 4;
418 else
419 return pix & 0xf;
420 }
421
422 static __forceinline u32 readPixel4HL(const void* pmem, int x, int y, u32 bp, u32 bw)
423 {
424 const u8 *p = (const u8*)pmem + 4 * getPixelAddress4HL(x, y, bp, bw) + 3;
425 return *p & 0x0f;
426 }
427
428 static __forceinline u32 readPixel4HH(const void* pmem, int x, int y, u32 bp, u32 bw)
429 {
430 const u8 *p = (const u8*)pmem + 4 * getPixelAddress4HH(x, y, bp, bw) + 3;
431 return *p >> 4;
432 }
433
434 ///////////////
435
436 static __forceinline u32 readPixel32Z(const void* pmem, int x, int y, u32 bp, u32 bw)
437 {
438 return ((const u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)];
439 }
440
441 static __forceinline u32 readPixel24Z(const void* pmem, int x, int y, u32 bp, u32 bw)
442 {
443 return ((const u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)] & 0xffffff;
444 }
445
446 static __forceinline u32 readPixel16Z(const void* pmem, int x, int y, u32 bp, u32 bw)
447 {
448 return ((const u16*)pmem)[getPixelAddress16Z(x, y, bp, bw)];
449 }
450
451 static __forceinline u32 readPixel16SZ(const void* pmem, int x, int y, u32 bp, u32 bw)
452 {
453 return ((const u16*)pmem)[getPixelAddress16SZ(x, y, bp, bw)];
454 }
455
456 ///////////////////////////////
457 // Functions that take 0 bps //
458 ///////////////////////////////
459
460 static __forceinline u32 getPixelAddress32_0(int x, int y, u32 bw) { return getPixelAddress32(x, y, 0, bw); }
461 static __forceinline u32 getPixelAddress16_0(int x, int y, u32 bw) { return getPixelAddress16(x, y, 0, bw); }
462 static __forceinline u32 getPixelAddress16S_0(int x, int y, u32 bw) { return getPixelAddress16S(x, y, 0, bw); }
463 static __forceinline u32 getPixelAddress8_0(int x, int y, u32 bw) { return getPixelAddress8(x, y, 0, bw); }
464 static __forceinline u32 getPixelAddress4_0(int x, int y, u32 bw) { return getPixelAddress4(x, y, 0, bw); }
465 static __forceinline u32 getPixelAddress32Z_0(int x, int y, u32 bw) { return getPixelAddress32Z(x, y, 0, bw); }
466 static __forceinline u32 getPixelAddress16Z_0(int x, int y, u32 bw) { return getPixelAddress16Z(x, y, 0, bw); }
467 static __forceinline u32 getPixelAddress16SZ_0(int x, int y, u32 bw) { return getPixelAddress16SZ(x, y, 0, bw); }
468
469 ///////////////
470
471 static __forceinline void writePixel32_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel32(pmem, x, y, pixel, 0, bw); }
472 static __forceinline void writePixel24_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel24(pmem, x, y, pixel, 0, bw); }
473 static __forceinline void writePixel16_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16(pmem, x, y, pixel, 0, bw); }
474 static __forceinline void writePixel16S_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16S(pmem, x, y, pixel, 0, bw); }
475 static __forceinline void writePixel8_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel8(pmem, x, y, pixel, 0, bw); }
476 static __forceinline void writePixel8H_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel8H(pmem, x, y, pixel, 0, bw); }
477 static __forceinline void writePixel4_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4(pmem, x, y, pixel, 0, bw); }
478 static __forceinline void writePixel4HL_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4HL(pmem, x, y, pixel, 0, bw); }
479 static __forceinline void writePixel4HH_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4HH(pmem, x, y, pixel, 0, bw); }
480 static __forceinline void writePixel32Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel32Z(pmem, x, y, pixel, 0, bw); }
481 static __forceinline void writePixel24Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel24Z(pmem, x, y, pixel, 0, bw); }
482 static __forceinline void writePixel16Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16Z(pmem, x, y, pixel, 0, bw); }
483 static __forceinline void writePixel16SZ_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16SZ(pmem, x, y, pixel, 0, bw); }
484
485 ///////////////
486
487 static __forceinline u32 readPixel32_0(const void* pmem, int x, int y, u32 bw) { return readPixel32(pmem, x, y, 0, bw); }
488 static __forceinline u32 readPixel24_0(const void* pmem, int x, int y, u32 bw) { return readPixel24(pmem, x, y, 0, bw); }
489 static __forceinline u32 readPixel16_0(const void* pmem, int x, int y, u32 bw) { return readPixel16(pmem, x, y, 0, bw); }
490 static __forceinline u32 readPixel16S_0(const void* pmem, int x, int y, u32 bw) { return readPixel16S(pmem, x, y, 0, bw); }
491 static __forceinline u32 readPixel8_0(const void* pmem, int x, int y, u32 bw) { return readPixel8(pmem, x, y, 0, bw); }
492 static __forceinline u32 readPixel8H_0(const void* pmem, int x, int y, u32 bw) { return readPixel8H(pmem, x, y, 0, bw); }
493 static __forceinline u32 readPixel4_0(const void* pmem, int x, int y, u32 bw) { return readPixel4(pmem, x, y, 0, bw); }
494 static __forceinline u32 readPixel4HL_0(const void* pmem, int x, int y, u32 bw) { return readPixel4HL(pmem, x, y, 0, bw); }
495 static __forceinline u32 readPixel4HH_0(const void* pmem, int x, int y, u32 bw) { return readPixel4HH(pmem, x, y, 0, bw); }
496 static __forceinline u32 readPixel32Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel32Z(pmem, x, y, 0, bw); }
497 static __forceinline u32 readPixel24Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel24Z(pmem, x, y, 0, bw); }
498 static __forceinline u32 readPixel16Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel16Z(pmem, x, y, 0, bw); }
499 static __forceinline u32 readPixel16SZ_0(const void* pmem, int x, int y, u32 bw) { return readPixel16SZ(pmem, x, y, 0, bw); }
500
501 ///////////////
502
503 extern int TransferHostLocal32(const void* pbyMem, u32 nQWordSize);
504 extern int TransferHostLocal32Z(const void* pbyMem, u32 nQWordSize);
505 extern int TransferHostLocal24(const void* pbyMem, u32 nQWordSize);
506 extern int TransferHostLocal24Z(const void* pbyMem, u32 nQWordSize);
507 extern int TransferHostLocal16(const void* pbyMem, u32 nQWordSize);
508 extern int TransferHostLocal16S(const void* pbyMem, u32 nQWordSize);
509 extern int TransferHostLocal16Z(const void* pbyMem, u32 nQWordSize);
510 extern int TransferHostLocal16SZ(const void* pbyMem, u32 nQWordSize);
511 extern int TransferHostLocal8(const void* pbyMem, u32 nQWordSize);
512 extern int TransferHostLocal4(const void* pbyMem, u32 nQWordSize);
513 extern int TransferHostLocal8H(const void* pbyMem, u32 nQWordSize);
514 extern int TransferHostLocal4HL(const void* pbyMem, u32 nQWordSize);
515 extern int TransferHostLocal4HH(const void* pbyMem, u32 nQWordSize);
516
517 extern void TransferLocalHost32(void* pbyMem, u32 nQWordSize);
518 extern void TransferLocalHost24(void* pbyMem, u32 nQWordSize);
519 extern void TransferLocalHost16(void* pbyMem, u32 nQWordSize);
520 extern void TransferLocalHost16S(void* pbyMem, u32 nQWordSize);
521 extern void TransferLocalHost8(void* pbyMem, u32 nQWordSize);
522 extern void TransferLocalHost4(void* pbyMem, u32 nQWordSize);
523 extern void TransferLocalHost8H(void* pbyMem, u32 nQWordSize);
524 extern void TransferLocalHost4HL(void* pbyMem, u32 nQWordSize);
525 extern void TransferLocalHost4HH(void* pbyMem, u32 nQWordSize);
526 extern void TransferLocalHost32Z(void* pbyMem, u32 nQWordSize);
527 extern void TransferLocalHost24Z(void* pbyMem, u32 nQWordSize);
528 extern void TransferLocalHost16Z(void* pbyMem, u32 nQWordSize);
529 extern void TransferLocalHost16SZ(void* pbyMem, u32 nQWordSize);
530
531 #endif /* __MEM_H__ */

  ViewVC Help
Powered by ViewVC 1.1.22