Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mesa / src / gallium / drivers / nvfx / nv04_2d_loops.h
blob3a6787c07179eebf33dcfab67b5dcc28dfbc8332
1 #ifndef T
3 if(dst->bpps == 0)
4 #define T uint8_t
5 #include "nv04_2d_loops.h"
6 #undef T
7 else if(dst->bpps == 1)
8 #define T uint16_t
9 #include "nv04_2d_loops.h"
10 #undef T
11 else if(dst->bpps == 2)
12 #define T uint32_t
13 #include "nv04_2d_loops.h"
14 #undef T
15 else
16 assert(0);
18 #else
19 #ifdef SWIZZLED_COPY_LOOPS
21 if(!dst->pitch)
23 if(!src->pitch)
25 LOOP_Y
27 T* pdst = (T*)mdst + dswy[iy];
28 T* psrc = (T*)msrc + sswy[iy];
29 LOOP_X
31 assert((char*)&psrc[sswx[ix] + 1] <= ((char*)src->bo->map + src->bo->size));
32 assert((char*)&pdst[dswx[ix] + 1] <= ((char*)dst->bo->map + dst->bo->size));
33 pdst[dswx[ix]] = psrc[sswx[ix]];
37 else
39 T* psrc = (T*)(msrc + ((dir > 0) ? src->y : (src->y + h - 1)) * src->pitch) + src->x;
40 LOOP_Y
42 T* pdst = (T*)mdst + dswy[iy];
43 LOOP_X
45 assert((char*)&psrc[ix + 1] <= ((char*)src->bo->map + src->bo->size));
46 assert((char*)&pdst[dswx[ix] + 1] <= ((char*)dst->bo->map + dst->bo->size));
47 pdst[dswx[ix]] = psrc[ix];
49 psrc = (T*)((char*)psrc + dir * src->pitch);
53 else
55 T* pdst = (T*)(mdst + ((dir > 0) ? dst->y : (dst->y + h - 1)) * dst->pitch) + dst->x;
56 LOOP_Y
58 T* psrc = (T*)msrc + sswy[iy];
59 LOOP_X
61 assert((char*)&psrc[sswx[ix] + 1] <= ((char*)src->bo->map + src->bo->size));
62 assert((char*)&pdst[ix + 1] <= ((char*)dst->bo->map + dst->bo->size));
63 pdst[ix] = psrc[sswx[ix]];
65 pdst = (T*)((char*)pdst + dir * dst->pitch);
69 #endif
70 #endif