/[pcsx2_0.9.7]/trunk/plugins/zzogl-pg/opengl/x86.h
ViewVC logotype

Contents of /trunk/plugins/zzogl-pg/opengl/x86.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 2 months ago) by william
File MIME type: text/plain
File size: 9978 byte(s)
re-commit (had local access denied errors when committing)
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 ZEROGS_X86
21 #define ZEROGS_X86
22
23 #include "GS.h"
24
25 extern "C" void __fastcall SwizzleBlock32_sse2(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff);
26 extern "C" void __fastcall SwizzleBlock16_sse2(u8* dst, u8* src, int srcpitch);
27 extern "C" void __fastcall SwizzleBlock8_sse2(u8* dst, u8* src, int srcpitch);
28 extern "C" void __fastcall SwizzleBlock4_sse2(u8* dst, u8* src, int srcpitch);
29 extern "C" void __fastcall SwizzleBlock32u_sse2(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff);
30 extern "C" void __fastcall SwizzleBlock16u_sse2(u8* dst, u8* src, int srcpitch);
31 extern "C" void __fastcall SwizzleBlock8u_sse2(u8* dst, u8* src, int srcpitch);
32 extern "C" void __fastcall SwizzleBlock4u_sse2(u8* dst, u8* src, int srcpitch);
33
34 // frame swizzling
35
36 #if 0
37 // no AA
38 extern "C" void __fastcall FrameSwizzleBlock32_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask);
39 extern "C" void __fastcall FrameSwizzleBlock16_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask);
40 extern "C" void __fastcall Frame16SwizzleBlock32_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
41 extern "C" void __fastcall Frame16SwizzleBlock32Z_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
42 extern "C" void __fastcall Frame16SwizzleBlock16_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
43 extern "C" void __fastcall Frame16SwizzleBlock16Z_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
44
45 // AA 2x
46 extern "C" void __fastcall FrameSwizzleBlock32A2_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask);
47 extern "C" void __fastcall FrameSwizzleBlock16A2_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask);
48 extern "C" void __fastcall Frame16SwizzleBlock32A2_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
49 extern "C" void __fastcall Frame16SwizzleBlock32ZA2_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
50 extern "C" void __fastcall Frame16SwizzleBlock16A2_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
51 extern "C" void __fastcall Frame16SwizzleBlock16ZA2_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
52
53 // AA 4x
54 extern "C" void __fastcall FrameSwizzleBlock32A4_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask);
55 extern "C" void __fastcall FrameSwizzleBlock16A4_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask);
56 extern "C" void __fastcall Frame16SwizzleBlock32A4_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
57 extern "C" void __fastcall Frame16SwizzleBlock32ZA4_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
58 extern "C" void __fastcall Frame16SwizzleBlock16A4_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
59 extern "C" void __fastcall Frame16SwizzleBlock16ZA4_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
60
61 /*extern void __fastcall SwizzleBlock32_c(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff);
62 extern void __fastcall SwizzleBlock16_c(u8* dst, u8* src, int srcpitch);
63 extern void __fastcall SwizzleBlock8_c(u8* dst, u8* src, int srcpitch);
64 extern void __fastcall SwizzleBlock4_c(u8* dst, u8* src, int srcpitch);*/
65
66 // no AA
67 extern void __fastcall FrameSwizzleBlock32_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
68 extern void __fastcall FrameSwizzleBlock24_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
69 extern void __fastcall FrameSwizzleBlock16_c(u16* dst, u32* src, int srcpitch, u32 WriteMask);
70 extern void __fastcall Frame16SwizzleBlock32_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
71 extern void __fastcall Frame16SwizzleBlock32Z_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
72 extern void __fastcall Frame16SwizzleBlock16_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
73 extern void __fastcall Frame16SwizzleBlock16Z_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
74
75 // AA 2x
76 extern void __fastcall FrameSwizzleBlock32A2_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
77 extern void __fastcall FrameSwizzleBlock24A2_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
78 extern void __fastcall FrameSwizzleBlock16A2_c(u16* dst, u32* src, int srcpitch, u32 WriteMask);
79 extern void __fastcall Frame16SwizzleBlock32A2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
80 extern void __fastcall Frame16SwizzleBlock32ZA2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
81 extern void __fastcall Frame16SwizzleBlock16A2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
82 extern void __fastcall Frame16SwizzleBlock16ZA2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
83
84 // AA 4x
85 extern void __fastcall FrameSwizzleBlock32A4_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
86 extern void __fastcall FrameSwizzleBlock24A4_c(u32* dst, u32* src, int srcpitch, u32 WriteMask);
87 extern void __fastcall FrameSwizzleBlock16A4_c(u16* dst, u32* src, int srcpitch, u32 WriteMask);
88 extern void __fastcall Frame16SwizzleBlock32A4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
89 extern void __fastcall Frame16SwizzleBlock32ZA4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
90 extern void __fastcall Frame16SwizzleBlock16A4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
91 extern void __fastcall Frame16SwizzleBlock16ZA4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask);
92 #endif
93
94 extern void __fastcall SwizzleColumn32_c(int y, u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff);
95 extern void __fastcall SwizzleColumn16_c(int y, u8* dst, u8* src, int srcpitch);
96 extern void __fastcall SwizzleColumn8_c(int y, u8* dst, u8* src, int srcpitch);
97 extern void __fastcall SwizzleColumn4_c(int y, u8* dst, u8* src, int srcpitch);
98
99 // extern "C" void __fastcall WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32* clut);
100 extern "C" void __fastcall WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32 csa);
101 extern "C" void __fastcall WriteCLUT_T32_I8_CSM1_sse2(u32* vm, u32* clut);
102 // extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32* clut);
103 extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32 csa);
104 extern "C" void __fastcall WriteCLUT_T32_I4_CSM1_sse2(u32* vm, u32* clut);
105 extern void __fastcall WriteCLUT_T16_I8_CSM1_c(u32* vm, u32* clut);
106 extern void __fastcall WriteCLUT_T32_I8_CSM1_c(u32* vm, u32* clut);
107
108 extern void __fastcall WriteCLUT_T16_I4_CSM1_c(u32* vm, u32* clut);
109 extern void __fastcall WriteCLUT_T32_I4_CSM1_c(u32* vm, u32* clut);
110
111 extern void SSE2_UnswizzleZ16Target(u16* dst, u16* src, int iters);
112
113 #ifdef ZEROGS_SSE2
114
115 #define FrameSwizzleBlock32 FrameSwizzleBlock32_c
116 #define FrameSwizzleBlock24 FrameSwizzleBlock24_c
117 #define FrameSwizzleBlock16 FrameSwizzleBlock16_c
118 #define Frame16SwizzleBlock32 Frame16SwizzleBlock32_c
119 #define Frame16SwizzleBlock32Z Frame16SwizzleBlock32Z_c
120 #define Frame16SwizzleBlock16 Frame16SwizzleBlock16_c
121 #define Frame16SwizzleBlock16Z Frame16SwizzleBlock16Z_c
122
123 #define FrameSwizzleBlock32A2 FrameSwizzleBlock32A2_c
124 #define FrameSwizzleBlock24A2 FrameSwizzleBlock24A2_c
125 #define FrameSwizzleBlock16A2 FrameSwizzleBlock16A2_c
126 #define Frame16SwizzleBlock32A2 Frame16SwizzleBlock32A2_c
127 #define Frame16SwizzleBlock32ZA2 Frame16SwizzleBlock32ZA2_c
128 #define Frame16SwizzleBlock16A2 Frame16SwizzleBlock16A2_c
129 #define Frame16SwizzleBlock16ZA2 Frame16SwizzleBlock16ZA2_c
130
131 #define FrameSwizzleBlock32A4 FrameSwizzleBlock32A4_c
132 #define FrameSwizzleBlock24A4 FrameSwizzleBlock24A4_c
133 #define FrameSwizzleBlock16A4 FrameSwizzleBlock16A4_c
134 #define Frame16SwizzleBlock32A4 Frame16SwizzleBlock32A4_c
135 #define Frame16SwizzleBlock32ZA4 Frame16SwizzleBlock32ZA4_c
136 #define Frame16SwizzleBlock16A4 Frame16SwizzleBlock16A4_c
137 #define Frame16SwizzleBlock16ZA4 Frame16SwizzleBlock16ZA4_c
138
139 #define WriteCLUT_T16_I8_CSM1 WriteCLUT_T16_I8_CSM1_sse2
140 #define WriteCLUT_T32_I8_CSM1 WriteCLUT_T32_I8_CSM1_sse2
141 #define WriteCLUT_T16_I4_CSM1 WriteCLUT_T16_I4_CSM1_sse2
142 #define WriteCLUT_T32_I4_CSM1 WriteCLUT_T32_I4_CSM1_sse2
143
144 #else
145
146 #define FrameSwizzleBlock32 FrameSwizzleBlock32_c
147 #define FrameSwizzleBlock16 FrameSwizzleBlock16_c
148 #define Frame16SwizzleBlock32 Frame16SwizzleBlock32_c
149 #define Frame16SwizzleBlock32Z Frame16SwizzleBlock32Z_c
150 #define Frame16SwizzleBlock16 Frame16SwizzleBlock16_c
151 #define Frame16SwizzleBlock16Z Frame16SwizzleBlock16Z_c
152
153 #define FrameSwizzleBlock32A2 FrameSwizzleBlock32A2_c
154 #define FrameSwizzleBlock16A2 FrameSwizzleBlock16A2_c
155 #define Frame16SwizzleBlock32A2 Frame16SwizzleBlock32A2_c
156 #define Frame16SwizzleBlock32ZA2 Frame16SwizzleBlock32ZA2_c
157 #define Frame16SwizzleBlock16A2 Frame16SwizzleBlock16A2_c
158 #define Frame16SwizzleBlock16ZA2 Frame16SwizzleBlock16ZA2_c
159
160 #define FrameSwizzleBlock32A4 FrameSwizzleBlock32A4_c
161 #define FrameSwizzleBlock16A4 FrameSwizzleBlock16A4_c
162 #define Frame16SwizzleBlock32A4 Frame16SwizzleBlock32A4_c
163 #define Frame16SwizzleBlock32ZA4 Frame16SwizzleBlock32ZA4_c
164 #define Frame16SwizzleBlock16A4 Frame16SwizzleBlock16A4_c
165 #define Frame16SwizzleBlock16ZA4 Frame16SwizzleBlock16ZA4_c
166
167 #define WriteCLUT_T16_I8_CSM1 WriteCLUT_T16_I8_CSM1_c
168 #define WriteCLUT_T32_I8_CSM1 WriteCLUT_T32_I8_CSM1_c
169 #define WriteCLUT_T16_I4_CSM1 WriteCLUT_T16_I4_CSM1_c
170 #define WriteCLUT_T32_I4_CSM1 WriteCLUT_T32_I4_CSM1_c
171
172 #endif
173
174 #endif

  ViewVC Help
Powered by ViewVC 1.1.22