~ppsspp/ppsspp/ppsspp_1.3.0

« back to all changes in this revision

Viewing changes to GPU/Common/VertexDecoderFake.cpp

  • Committer: Sérgio Benjamim
  • Date: 2017-01-02 00:12:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20170102001205-cxbta9za203nmjwm
1.3.0 source (from ppsspp_1.3.0-r160.p5.l1762.a165.t83~56~ubuntu16.04.1.tar.xz).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) 2013- PPSSPP Project.
 
2
 
 
3
// This program is free software: you can redistribute it and/or modify
 
4
// it under the terms of the GNU General Public License as published by
 
5
// the Free Software Foundation, version 2.0 or later versions.
 
6
 
 
7
// This program is distributed in the hope that it will be useful,
 
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
// GNU General Public License 2.0 for more details.
 
11
 
 
12
// A copy of the GPL 2.0 should have been included with the program.
 
13
// If not, see http://www.gnu.org/licenses/
 
14
 
 
15
// Official git repository and contact information can be found at
 
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
 
17
 
 
18
#include "base/logging.h"
 
19
#include "Common/CPUDetect.h"
 
20
#include "Core/Config.h"
 
21
#include "Core/Reporting.h"
 
22
#include "GPU/GPUState.h"
 
23
#include "GPU/Common/VertexDecoderCommon.h"
 
24
 
 
25
static const float by128 = 1.0f / 128.0f;
 
26
static const float by16384 = 1.0f / 16384.0f;
 
27
static const float by32768 = 1.0f / 32768.0f;
 
28
 
 
29
#ifdef MIPS
 
30
using namespace MIPSGen;
 
31
#else
 
32
using namespace FakeGen;
 
33
#endif
 
34
 
 
35
static const JitLookup jitLookup[] = {
 
36
        {&VertexDecoder::Step_WeightsU8, &VertexDecoderJitCache::Jit_WeightsU8},
 
37
        {&VertexDecoder::Step_WeightsU16, &VertexDecoderJitCache::Jit_WeightsU16},
 
38
        {&VertexDecoder::Step_WeightsFloat, &VertexDecoderJitCache::Jit_WeightsFloat},
 
39
 
 
40
        {&VertexDecoder::Step_WeightsU8Skin, &VertexDecoderJitCache::Jit_WeightsU8Skin},
 
41
        {&VertexDecoder::Step_WeightsU16Skin, &VertexDecoderJitCache::Jit_WeightsU16Skin},
 
42
        {&VertexDecoder::Step_WeightsFloatSkin, &VertexDecoderJitCache::Jit_WeightsFloatSkin},
 
43
 
 
44
        {&VertexDecoder::Step_TcU8, &VertexDecoderJitCache::Jit_TcU8},
 
45
        {&VertexDecoder::Step_TcU16, &VertexDecoderJitCache::Jit_TcU16},
 
46
        {&VertexDecoder::Step_TcFloat, &VertexDecoderJitCache::Jit_TcFloat},
 
47
        {&VertexDecoder::Step_TcU16Double, &VertexDecoderJitCache::Jit_TcU16Double},
 
48
 
 
49
        {&VertexDecoder::Step_TcU8Prescale, &VertexDecoderJitCache::Jit_TcU8Prescale},
 
50
        {&VertexDecoder::Step_TcU16Prescale, &VertexDecoderJitCache::Jit_TcU16Prescale},
 
51
        {&VertexDecoder::Step_TcFloatPrescale, &VertexDecoderJitCache::Jit_TcFloatPrescale},
 
52
 
 
53
        {&VertexDecoder::Step_TcU16Through, &VertexDecoderJitCache::Jit_TcU16Through},
 
54
        {&VertexDecoder::Step_TcFloatThrough, &VertexDecoderJitCache::Jit_TcFloatThrough},
 
55
        {&VertexDecoder::Step_TcU16ThroughDouble, &VertexDecoderJitCache::Jit_TcU16ThroughDouble},
 
56
 
 
57
        {&VertexDecoder::Step_NormalS8, &VertexDecoderJitCache::Jit_NormalS8},
 
58
        {&VertexDecoder::Step_NormalS16, &VertexDecoderJitCache::Jit_NormalS16},
 
59
        {&VertexDecoder::Step_NormalFloat, &VertexDecoderJitCache::Jit_NormalFloat},
 
60
 
 
61
        {&VertexDecoder::Step_NormalS8Skin, &VertexDecoderJitCache::Jit_NormalS8Skin},
 
62
        {&VertexDecoder::Step_NormalS16Skin, &VertexDecoderJitCache::Jit_NormalS16Skin},
 
63
        {&VertexDecoder::Step_NormalFloatSkin, &VertexDecoderJitCache::Jit_NormalFloatSkin},
 
64
 
 
65
        {&VertexDecoder::Step_Color8888, &VertexDecoderJitCache::Jit_Color8888},
 
66
        {&VertexDecoder::Step_Color4444, &VertexDecoderJitCache::Jit_Color4444},
 
67
        {&VertexDecoder::Step_Color565, &VertexDecoderJitCache::Jit_Color565},
 
68
        {&VertexDecoder::Step_Color5551, &VertexDecoderJitCache::Jit_Color5551},
 
69
 
 
70
        {&VertexDecoder::Step_PosS8Through, &VertexDecoderJitCache::Jit_PosS8Through},
 
71
        {&VertexDecoder::Step_PosS16Through, &VertexDecoderJitCache::Jit_PosS16Through},
 
72
        {&VertexDecoder::Step_PosFloatThrough, &VertexDecoderJitCache::Jit_PosFloat},
 
73
 
 
74
        {&VertexDecoder::Step_PosS8, &VertexDecoderJitCache::Jit_PosS8},
 
75
        {&VertexDecoder::Step_PosS16, &VertexDecoderJitCache::Jit_PosS16},
 
76
        {&VertexDecoder::Step_PosFloat, &VertexDecoderJitCache::Jit_PosFloat},
 
77
 
 
78
        {&VertexDecoder::Step_PosS8Skin, &VertexDecoderJitCache::Jit_PosS8Skin},
 
79
        {&VertexDecoder::Step_PosS16Skin, &VertexDecoderJitCache::Jit_PosS16Skin},
 
80
        {&VertexDecoder::Step_PosFloatSkin, &VertexDecoderJitCache::Jit_PosFloatSkin},
 
81
 
 
82
        {&VertexDecoder::Step_NormalS8Morph, &VertexDecoderJitCache::Jit_NormalS8Morph},
 
83
        {&VertexDecoder::Step_NormalS16Morph, &VertexDecoderJitCache::Jit_NormalS16Morph},
 
84
        {&VertexDecoder::Step_NormalFloatMorph, &VertexDecoderJitCache::Jit_NormalFloatMorph},
 
85
 
 
86
        {&VertexDecoder::Step_PosS8Morph, &VertexDecoderJitCache::Jit_PosS8Morph},
 
87
        {&VertexDecoder::Step_PosS16Morph, &VertexDecoderJitCache::Jit_PosS16Morph},
 
88
        {&VertexDecoder::Step_PosFloatMorph, &VertexDecoderJitCache::Jit_PosFloatMorph},
 
89
 
 
90
        {&VertexDecoder::Step_Color8888Morph, &VertexDecoderJitCache::Jit_Color8888Morph},
 
91
        {&VertexDecoder::Step_Color4444Morph, &VertexDecoderJitCache::Jit_Color4444Morph},
 
92
        {&VertexDecoder::Step_Color565Morph, &VertexDecoderJitCache::Jit_Color565Morph},
 
93
        {&VertexDecoder::Step_Color5551Morph, &VertexDecoderJitCache::Jit_Color5551Morph},
 
94
};
 
95
 
 
96
JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int32_t *jittedSize) {
 
97
        dec_ = &dec;
 
98
        //const u8 *start = AlignCode16();
 
99
 
 
100
        bool prescaleStep = false;
 
101
        bool skinning = false;
 
102
 
 
103
        return nullptr;
 
104
}
 
105
 
 
106
void VertexDecoderJitCache::Jit_WeightsU8() {
 
107
}
 
108
 
 
109
void VertexDecoderJitCache::Jit_WeightsU16() {
 
110
}
 
111
 
 
112
void VertexDecoderJitCache::Jit_WeightsFloat() {
 
113
}
 
114
 
 
115
void VertexDecoderJitCache::Jit_ApplyWeights() {
 
116
}
 
117
 
 
118
void VertexDecoderJitCache::Jit_WeightsU8Skin() {
 
119
}
 
120
 
 
121
void VertexDecoderJitCache::Jit_WeightsU16Skin() {
 
122
}
 
123
 
 
124
void VertexDecoderJitCache::Jit_WeightsFloatSkin() {
 
125
}
 
126
 
 
127
void VertexDecoderJitCache::Jit_TcU8() {
 
128
}
 
129
 
 
130
void VertexDecoderJitCache::Jit_TcU16() {
 
131
}
 
132
 
 
133
void VertexDecoderJitCache::Jit_TcFloat() {
 
134
}
 
135
 
 
136
void VertexDecoderJitCache::Jit_TcU16Through() {
 
137
}
 
138
 
 
139
void VertexDecoderJitCache::Jit_TcFloatThrough() {
 
140
}
 
141
 
 
142
void VertexDecoderJitCache::Jit_TcU16Double() {
 
143
}
 
144
 
 
145
void VertexDecoderJitCache::Jit_TcU16ThroughDouble() {
 
146
}
 
147
 
 
148
void VertexDecoderJitCache::Jit_TcU8Prescale() {
 
149
}
 
150
 
 
151
void VertexDecoderJitCache::Jit_TcU16Prescale() {
 
152
}
 
153
 
 
154
void VertexDecoderJitCache::Jit_TcFloatPrescale() {
 
155
}
 
156
 
 
157
void VertexDecoderJitCache::Jit_Color8888() {
 
158
}
 
159
 
 
160
void VertexDecoderJitCache::Jit_Color4444() {
 
161
}
 
162
 
 
163
void VertexDecoderJitCache::Jit_Color565() {
 
164
}
 
165
 
 
166
void VertexDecoderJitCache::Jit_Color5551() {
 
167
}
 
168
 
 
169
void VertexDecoderJitCache::Jit_Color8888Morph() {
 
170
}
 
171
 
 
172
void VertexDecoderJitCache::Jit_Color4444Morph() {
 
173
}
 
174
 
 
175
void VertexDecoderJitCache::Jit_Color565Morph() {
 
176
}
 
177
 
 
178
void VertexDecoderJitCache::Jit_Color5551Morph() {
 
179
}
 
180
 
 
181
void VertexDecoderJitCache::Jit_WriteMorphColor(int outOff, bool checkAlpha) {
 
182
}
 
183
 
 
184
void VertexDecoderJitCache::Jit_NormalS8() {
 
185
}
 
186
 
 
187
void VertexDecoderJitCache::Jit_NormalS16() {
 
188
}
 
189
 
 
190
void VertexDecoderJitCache::Jit_NormalFloat() {
 
191
}
 
192
 
 
193
void VertexDecoderJitCache::Jit_PosS8Through() {
 
194
}
 
195
 
 
196
void VertexDecoderJitCache::Jit_PosS16Through() {
 
197
}
 
198
 
 
199
void VertexDecoderJitCache::Jit_PosS8() {
 
200
}
 
201
 
 
202
void VertexDecoderJitCache::Jit_PosS16() {
 
203
}
 
204
 
 
205
// Just copy 12 bytes.
 
206
void VertexDecoderJitCache::Jit_PosFloat() {
 
207
}
 
208
 
 
209
void VertexDecoderJitCache::Jit_NormalS8Skin() {
 
210
}
 
211
 
 
212
void VertexDecoderJitCache::Jit_NormalS16Skin() {
 
213
}
 
214
 
 
215
void VertexDecoderJitCache::Jit_NormalFloatSkin() {
 
216
}
 
217
 
 
218
void VertexDecoderJitCache::Jit_WriteMatrixMul(int outOff, bool pos) {
 
219
}
 
220
 
 
221
void VertexDecoderJitCache::Jit_PosS8Skin() {
 
222
}
 
223
 
 
224
void VertexDecoderJitCache::Jit_PosS16Skin() {
 
225
}
 
226
 
 
227
void VertexDecoderJitCache::Jit_PosFloatSkin() {
 
228
}
 
229
 
 
230
void VertexDecoderJitCache::Jit_AnyS8ToFloat(int srcoff) {
 
231
}
 
232
 
 
233
void VertexDecoderJitCache::Jit_AnyS16ToFloat(int srcoff) {
 
234
}
 
235
 
 
236
void VertexDecoderJitCache::Jit_AnyS8Morph(int srcoff, int dstoff) {
 
237
}
 
238
 
 
239
void VertexDecoderJitCache::Jit_AnyS16Morph(int srcoff, int dstoff) {
 
240
}
 
241
 
 
242
void VertexDecoderJitCache::Jit_AnyFloatMorph(int srcoff, int dstoff) {
 
243
}
 
244
 
 
245
void VertexDecoderJitCache::Jit_PosS8Morph() {
 
246
        Jit_AnyS8Morph(dec_->posoff, dec_->decFmt.posoff);
 
247
}
 
248
 
 
249
void VertexDecoderJitCache::Jit_PosS16Morph() {
 
250
        Jit_AnyS16Morph(dec_->posoff, dec_->decFmt.posoff);
 
251
}
 
252
 
 
253
void VertexDecoderJitCache::Jit_PosFloatMorph() {
 
254
        Jit_AnyFloatMorph(dec_->posoff, dec_->decFmt.posoff);
 
255
}
 
256
 
 
257
void VertexDecoderJitCache::Jit_NormalS8Morph() {
 
258
        Jit_AnyS8Morph(dec_->nrmoff, dec_->decFmt.nrmoff);
 
259
}
 
260
 
 
261
void VertexDecoderJitCache::Jit_NormalS16Morph() {
 
262
        Jit_AnyS16Morph(dec_->nrmoff, dec_->decFmt.nrmoff);
 
263
}
 
264
 
 
265
void VertexDecoderJitCache::Jit_NormalFloatMorph() {
 
266
        Jit_AnyFloatMorph(dec_->nrmoff, dec_->decFmt.nrmoff);
 
267
}
 
268
 
 
269
bool VertexDecoderJitCache::CompileStep(const VertexDecoder &dec, int step) {
 
270
        return false;
 
271
}
 
272