• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "Capabilities.hpp"
16 
17 #include "Main/Config.hpp"
18 
19 namespace D3D9
20 {
21 	bool Capabilities::Surface::RenderTarget::NULL_ = true;
22 	bool Capabilities::Surface::RenderTarget::R8G8B8 = false;
23 	bool Capabilities::Surface::RenderTarget::R5G6B5 = true;
24 	bool Capabilities::Surface::RenderTarget::X1R5G5B5 = true;
25 	bool Capabilities::Surface::RenderTarget::A1R5G5B5 = true;
26 	bool Capabilities::Surface::RenderTarget::A4R4G4B4 = true;
27 	bool Capabilities::Surface::RenderTarget::R3G3B2 = false;
28 	bool Capabilities::Surface::RenderTarget::A8R3G3B2 = false;
29 	bool Capabilities::Surface::RenderTarget::X4R4G4B4 = true;
30 	bool Capabilities::Surface::RenderTarget::A8R8G8B8 = true;
31 	bool Capabilities::Surface::RenderTarget::X8R8G8B8 = true;
32 	bool Capabilities::Surface::RenderTarget::A8B8G8R8 = true;
33 	bool Capabilities::Surface::RenderTarget::X8B8G8R8 = true;
34 	bool Capabilities::Surface::RenderTarget::G16R16 = true;
35 	bool Capabilities::Surface::RenderTarget::A2B10G10R10 = true;
36 	bool Capabilities::Surface::RenderTarget::A2R10G10B10 = true;
37 	bool Capabilities::Surface::RenderTarget::A16B16G16R16 = true;
38 	bool Capabilities::Surface::RenderTarget::R16F = true;
39 	bool Capabilities::Surface::RenderTarget::G16R16F = true;
40 	bool Capabilities::Surface::RenderTarget::A16B16G16R16F = true;
41 	bool Capabilities::Surface::RenderTarget::R32F = true;
42 	bool Capabilities::Surface::RenderTarget::G32R32F = true;
43 	bool Capabilities::Surface::RenderTarget::A32B32G32R32F = true;
44 
45 	bool Capabilities::Surface::DepthStencil::D32 = true;
46 	bool Capabilities::Surface::DepthStencil::D24S8 = true;
47 	bool Capabilities::Surface::DepthStencil::D24X8 = true;
48 	bool Capabilities::Surface::DepthStencil::D16 = true;
49 	bool Capabilities::Surface::DepthStencil::D24FS8 = true;
50 	bool Capabilities::Surface::DepthStencil::D32F_LOCKABLE = true;
51 	bool Capabilities::Surface::DepthStencil::DF24 = true;
52 	bool Capabilities::Surface::DepthStencil::DF16 = true;
53 	bool Capabilities::Surface::DepthStencil::INTZ = true;
54 
55 	bool Capabilities::Surface::A8 = true;
56 	bool Capabilities::Surface::R5G6B5 = true;
57 	bool Capabilities::Surface::X1R5G5B5 = true;
58 	bool Capabilities::Surface::A1R5G5B5 = true;
59 	bool Capabilities::Surface::A4R4G4B4 = true;
60 	bool Capabilities::Surface::R3G3B2 = true;
61 	bool Capabilities::Surface::A8R3G3B2 = true;
62 	bool Capabilities::Surface::X4R4G4B4 = true;
63 	bool Capabilities::Surface::R8G8B8 = true;
64 	bool Capabilities::Surface::X8R8G8B8 = true;
65 	bool Capabilities::Surface::A8R8G8B8 = true;
66 	bool Capabilities::Surface::X8B8G8R8 = true;
67 	bool Capabilities::Surface::A8B8G8R8 = true;
68 	bool Capabilities::Surface::P8 = false;
69 	bool Capabilities::Surface::A8P8 = false;
70 	bool Capabilities::Surface::G16R16 = true;
71 	bool Capabilities::Surface::A2R10G10B10 = true;
72 	bool Capabilities::Surface::A2B10G10R10 = true;
73 	bool Capabilities::Surface::A16B16G16R16 = true;
74 	bool Capabilities::Surface::DXT1 = true;
75 	bool Capabilities::Surface::DXT2 = true;
76 	bool Capabilities::Surface::DXT3 = true;
77 	bool Capabilities::Surface::DXT4 = true;
78 	bool Capabilities::Surface::DXT5 = true;
79 	bool Capabilities::Surface::ATI1 = true;
80 	bool Capabilities::Surface::ATI2 = true;
81 	bool Capabilities::Surface::R16F = true;
82 	bool Capabilities::Surface::G16R16F = true;
83 	bool Capabilities::Surface::A16B16G16R16F = true;
84 	bool Capabilities::Surface::R32F = true;
85 	bool Capabilities::Surface::G32R32F = true;
86 	bool Capabilities::Surface::A32B32G32R32F = true;
87 	bool Capabilities::Surface::V8U8 = true;
88 	bool Capabilities::Surface::L6V5U5 = true;
89 	bool Capabilities::Surface::X8L8V8U8 = true;
90 	bool Capabilities::Surface::Q8W8V8U8 = true;
91 	bool Capabilities::Surface::V16U16 = true;
92 	bool Capabilities::Surface::A2W10V10U10 = true;
93 	bool Capabilities::Surface::Q16W16V16U16 = true;
94 	bool Capabilities::Surface::L8 = true;
95 	bool Capabilities::Surface::A4L4 = true;
96 	bool Capabilities::Surface::L16 = true;
97 	bool Capabilities::Surface::A8L8 = true;
98 	bool Capabilities::Surface::NVDB = false;
99 	bool Capabilities::Surface::ATOC = true;
100 
101 	bool Capabilities::Volume::A8 = true;
102 	bool Capabilities::Volume::R5G6B5 = true;
103 	bool Capabilities::Volume::X1R5G5B5 = true;
104 	bool Capabilities::Volume::A1R5G5B5 = true;
105 	bool Capabilities::Volume::A4R4G4B4 = true;
106 	bool Capabilities::Volume::R3G3B2 = true;
107 	bool Capabilities::Volume::A8R3G3B2 = true;
108 	bool Capabilities::Volume::X4R4G4B4 = true;
109 	bool Capabilities::Volume::R8G8B8 = false;
110 	bool Capabilities::Volume::X8R8G8B8 = true;
111 	bool Capabilities::Volume::A8R8G8B8 = true;
112 	bool Capabilities::Volume::X8B8G8R8 = true;
113 	bool Capabilities::Volume::A8B8G8R8 = true;
114 	bool Capabilities::Volume::P8 = false;
115 	bool Capabilities::Volume::A8P8 = false;
116 	bool Capabilities::Volume::G16R16 = true;
117 	bool Capabilities::Volume::A2R10G10B10 = true;
118 	bool Capabilities::Volume::A2B10G10R10 = true;
119 	bool Capabilities::Volume::A16B16G16R16 = true;
120 	bool Capabilities::Volume::DXT1 = true;
121 	bool Capabilities::Volume::DXT2 = true;
122 	bool Capabilities::Volume::DXT3 = true;
123 	bool Capabilities::Volume::DXT4 = true;
124 	bool Capabilities::Volume::DXT5 = true;
125 	bool Capabilities::Volume::ATI1 = true;
126 	bool Capabilities::Volume::ATI2 = true;
127 	bool Capabilities::Volume::R16F = true;
128 	bool Capabilities::Volume::G16R16F = true;
129 	bool Capabilities::Volume::A16B16G16R16F = true;
130 	bool Capabilities::Volume::R32F = true;
131 	bool Capabilities::Volume::G32R32F = true;
132 	bool Capabilities::Volume::A32B32G32R32F = true;
133 	bool Capabilities::Volume::V8U8 = true;
134 	bool Capabilities::Volume::L6V5U5 = true;
135 	bool Capabilities::Volume::X8L8V8U8 = true;
136 	bool Capabilities::Volume::Q8W8V8U8 = true;
137 	bool Capabilities::Volume::V16U16 = true;
138 	bool Capabilities::Volume::A2W10V10U10 = true;
139 	bool Capabilities::Volume::Q16W16V16U16 = true;
140 	bool Capabilities::Volume::L8 = true;
141 	bool Capabilities::Volume::A4L4 = true;
142 	bool Capabilities::Volume::L16 = true;
143 	bool Capabilities::Volume::A8L8 = true;
144 
145 	bool Capabilities::CubeMap::RenderTarget::NULL_ = true;
146 	bool Capabilities::CubeMap::RenderTarget::R8G8B8 = false;
147 	bool Capabilities::CubeMap::RenderTarget::R5G6B5 = true;
148 	bool Capabilities::CubeMap::RenderTarget::X1R5G5B5 = true;
149 	bool Capabilities::CubeMap::RenderTarget::A1R5G5B5 = true;
150 	bool Capabilities::CubeMap::RenderTarget::A4R4G4B4 = true;
151 	bool Capabilities::CubeMap::RenderTarget::R3G3B2 = false;
152 	bool Capabilities::CubeMap::RenderTarget::A8R3G3B2 = false;
153 	bool Capabilities::CubeMap::RenderTarget::X4R4G4B4 = true;
154 	bool Capabilities::CubeMap::RenderTarget::A8R8G8B8 = true;
155 	bool Capabilities::CubeMap::RenderTarget::X8R8G8B8 = true;
156 	bool Capabilities::CubeMap::RenderTarget::A8B8G8R8 = true;
157 	bool Capabilities::CubeMap::RenderTarget::X8B8G8R8 = true;
158 	bool Capabilities::CubeMap::RenderTarget::G16R16 = true;
159 	bool Capabilities::CubeMap::RenderTarget::A2B10G10R10 = true;
160 	bool Capabilities::CubeMap::RenderTarget::A2R10G10B10 = true;
161 	bool Capabilities::CubeMap::RenderTarget::A16B16G16R16 = true;
162 	bool Capabilities::CubeMap::RenderTarget::R16F = true;
163 	bool Capabilities::CubeMap::RenderTarget::G16R16F = true;
164 	bool Capabilities::CubeMap::RenderTarget::A16B16G16R16F = true;
165 	bool Capabilities::CubeMap::RenderTarget::R32F = true;
166 	bool Capabilities::CubeMap::RenderTarget::G32R32F = true;
167 	bool Capabilities::CubeMap::RenderTarget::A32B32G32R32F = true;
168 
169 	bool Capabilities::CubeMap::DepthStencil::D32 = false;
170 	bool Capabilities::CubeMap::DepthStencil::D24S8 = false;
171 	bool Capabilities::CubeMap::DepthStencil::D24X8 = false;
172 	bool Capabilities::CubeMap::DepthStencil::D16 = false;
173 	bool Capabilities::CubeMap::DepthStencil::D24FS8 = false;
174 	bool Capabilities::CubeMap::DepthStencil::D32F_LOCKABLE = false;
175 	bool Capabilities::CubeMap::DepthStencil::DF24 = false;
176 	bool Capabilities::CubeMap::DepthStencil::DF16 = false;
177 	bool Capabilities::CubeMap::DepthStencil::INTZ = false;
178 
179 	bool Capabilities::CubeMap::A8 = true;
180 	bool Capabilities::CubeMap::R5G6B5 = true;
181 	bool Capabilities::CubeMap::X1R5G5B5 = true;
182 	bool Capabilities::CubeMap::A1R5G5B5 = true;
183 	bool Capabilities::CubeMap::A4R4G4B4 = true;
184 	bool Capabilities::CubeMap::R3G3B2 = true;
185 	bool Capabilities::CubeMap::A8R3G3B2 = true;
186 	bool Capabilities::CubeMap::X4R4G4B4 = true;
187 	bool Capabilities::CubeMap::R8G8B8 = false;
188 	bool Capabilities::CubeMap::X8R8G8B8 = true;
189 	bool Capabilities::CubeMap::A8R8G8B8 = true;
190 	bool Capabilities::CubeMap::X8B8G8R8 = true;
191 	bool Capabilities::CubeMap::A8B8G8R8 = true;
192 	bool Capabilities::CubeMap::P8 = false;
193 	bool Capabilities::CubeMap::A8P8 = false;
194 	bool Capabilities::CubeMap::G16R16 = true;
195 	bool Capabilities::CubeMap::A2R10G10B10 = true;
196 	bool Capabilities::CubeMap::A2B10G10R10 = true;
197 	bool Capabilities::CubeMap::A16B16G16R16 = true;
198 	bool Capabilities::CubeMap::DXT1 = true;
199 	bool Capabilities::CubeMap::DXT2 = true;
200 	bool Capabilities::CubeMap::DXT3 = true;
201 	bool Capabilities::CubeMap::DXT4 = true;
202 	bool Capabilities::CubeMap::DXT5 = true;
203 	bool Capabilities::CubeMap::ATI1 = true;
204 	bool Capabilities::CubeMap::ATI2 = true;
205 	bool Capabilities::CubeMap::R16F = true;
206 	bool Capabilities::CubeMap::G16R16F = true;
207 	bool Capabilities::CubeMap::A16B16G16R16F = true;
208 	bool Capabilities::CubeMap::R32F = true;
209 	bool Capabilities::CubeMap::G32R32F = true;
210 	bool Capabilities::CubeMap::A32B32G32R32F = true;
211 	bool Capabilities::CubeMap::V8U8 = true;
212 	bool Capabilities::CubeMap::L6V5U5 = true;
213 	bool Capabilities::CubeMap::X8L8V8U8 = true;
214 	bool Capabilities::CubeMap::Q8W8V8U8 = true;
215 	bool Capabilities::CubeMap::V16U16 = true;
216 	bool Capabilities::CubeMap::A2W10V10U10 = true;
217 	bool Capabilities::CubeMap::Q16W16V16U16 = true;
218 	bool Capabilities::CubeMap::L8 = true;
219 	bool Capabilities::CubeMap::A4L4 = true;
220 	bool Capabilities::CubeMap::L16 = true;
221 	bool Capabilities::CubeMap::A8L8 = true;
222 
223 	bool Capabilities::VolumeTexture::A8 = true;
224 	bool Capabilities::VolumeTexture::R5G6B5 = true;
225 	bool Capabilities::VolumeTexture::X1R5G5B5 = true;
226 	bool Capabilities::VolumeTexture::A1R5G5B5 = true;
227 	bool Capabilities::VolumeTexture::A4R4G4B4 = true;
228 	bool Capabilities::VolumeTexture::R3G3B2 = true;
229 	bool Capabilities::VolumeTexture::A8R3G3B2 = true;
230 	bool Capabilities::VolumeTexture::X4R4G4B4 = true;
231 	bool Capabilities::VolumeTexture::R8G8B8 = false;
232 	bool Capabilities::VolumeTexture::X8R8G8B8 = true;
233 	bool Capabilities::VolumeTexture::A8R8G8B8 = true;
234 	bool Capabilities::VolumeTexture::X8B8G8R8 = true;
235 	bool Capabilities::VolumeTexture::A8B8G8R8 = true;
236 	bool Capabilities::VolumeTexture::P8 = false;
237 	bool Capabilities::VolumeTexture::A8P8 = false;
238 	bool Capabilities::VolumeTexture::G16R16 = true;
239 	bool Capabilities::VolumeTexture::A2R10G10B10 = true;
240 	bool Capabilities::VolumeTexture::A2B10G10R10 = true;
241 	bool Capabilities::VolumeTexture::A16B16G16R16 = true;
242 	bool Capabilities::VolumeTexture::DXT1 = true;
243 	bool Capabilities::VolumeTexture::DXT2 = true;
244 	bool Capabilities::VolumeTexture::DXT3 = true;
245 	bool Capabilities::VolumeTexture::DXT4 = true;
246 	bool Capabilities::VolumeTexture::DXT5 = true;
247 	bool Capabilities::VolumeTexture::ATI1 = true;
248 	bool Capabilities::VolumeTexture::ATI2 = true;
249 	bool Capabilities::VolumeTexture::R16F = true;
250 	bool Capabilities::VolumeTexture::G16R16F = true;
251 	bool Capabilities::VolumeTexture::A16B16G16R16F = true;
252 	bool Capabilities::VolumeTexture::R32F = true;
253 	bool Capabilities::VolumeTexture::G32R32F = true;
254 	bool Capabilities::VolumeTexture::A32B32G32R32F = true;
255 	bool Capabilities::VolumeTexture::V8U8 = true;
256 	bool Capabilities::VolumeTexture::L6V5U5 = true;
257 	bool Capabilities::VolumeTexture::X8L8V8U8 = true;
258 	bool Capabilities::VolumeTexture::Q8W8V8U8 = true;
259 	bool Capabilities::VolumeTexture::V16U16 = true;
260 	bool Capabilities::VolumeTexture::A2W10V10U10 = true;
261 	bool Capabilities::VolumeTexture::Q16W16V16U16 = true;
262 	bool Capabilities::VolumeTexture::L8 = true;
263 	bool Capabilities::VolumeTexture::A4L4 = true;
264 	bool Capabilities::VolumeTexture::L16 = true;
265 	bool Capabilities::VolumeTexture::A8L8 = true;
266 
267 	bool Capabilities::Texture::RenderTarget::NULL_ = true;
268 	bool Capabilities::Texture::RenderTarget::R8G8B8 = false;
269 	bool Capabilities::Texture::RenderTarget::R5G6B5 = true;
270 	bool Capabilities::Texture::RenderTarget::X1R5G5B5 = true;
271 	bool Capabilities::Texture::RenderTarget::A1R5G5B5 = true;
272 	bool Capabilities::Texture::RenderTarget::A4R4G4B4 = true;
273 	bool Capabilities::Texture::RenderTarget::R3G3B2 = false;
274 	bool Capabilities::Texture::RenderTarget::A8R3G3B2 = false;
275 	bool Capabilities::Texture::RenderTarget::X4R4G4B4 = true;
276 	bool Capabilities::Texture::RenderTarget::A8R8G8B8 = true;
277 	bool Capabilities::Texture::RenderTarget::X8R8G8B8 = true;
278 	bool Capabilities::Texture::RenderTarget::A8B8G8R8 = true;
279 	bool Capabilities::Texture::RenderTarget::X8B8G8R8 = true;
280 	bool Capabilities::Texture::RenderTarget::G16R16 = true;
281 	bool Capabilities::Texture::RenderTarget::A2B10G10R10 = true;
282 	bool Capabilities::Texture::RenderTarget::A2R10G10B10 = true;
283 	bool Capabilities::Texture::RenderTarget::A16B16G16R16 = true;
284 	bool Capabilities::Texture::RenderTarget::R16F = true;
285 	bool Capabilities::Texture::RenderTarget::G16R16F = true;
286 	bool Capabilities::Texture::RenderTarget::A16B16G16R16F = true;
287 	bool Capabilities::Texture::RenderTarget::R32F = true;
288 	bool Capabilities::Texture::RenderTarget::G32R32F = true;
289 	bool Capabilities::Texture::RenderTarget::A32B32G32R32F = true;
290 
291 	bool Capabilities::Texture::DepthStencil::D32 = true;
292 	bool Capabilities::Texture::DepthStencil::D24S8 = true;
293 	bool Capabilities::Texture::DepthStencil::D24X8 = true;
294 	bool Capabilities::Texture::DepthStencil::D16 = true;
295 	bool Capabilities::Texture::DepthStencil::D24FS8 = true;
296 	bool Capabilities::Texture::DepthStencil::D32F_LOCKABLE = true;
297 	bool Capabilities::Texture::DepthStencil::DF24 = true;
298 	bool Capabilities::Texture::DepthStencil::DF16 = true;
299 	bool Capabilities::Texture::DepthStencil::INTZ = true;
300 
301 	bool Capabilities::Texture::NULL_ = true;
302 	bool Capabilities::Texture::A8 = true;
303 	bool Capabilities::Texture::R5G6B5 = true;
304 	bool Capabilities::Texture::X1R5G5B5 = true;
305 	bool Capabilities::Texture::A1R5G5B5 = true;
306 	bool Capabilities::Texture::A4R4G4B4 = true;
307 	bool Capabilities::Texture::R3G3B2 = true;
308 	bool Capabilities::Texture::A8R3G3B2 = true;
309 	bool Capabilities::Texture::X4R4G4B4 = true;
310 	bool Capabilities::Texture::R8G8B8 = false;
311 	bool Capabilities::Texture::X8R8G8B8 = true;
312 	bool Capabilities::Texture::A8R8G8B8 = true;
313 	bool Capabilities::Texture::X8B8G8R8 = true;
314 	bool Capabilities::Texture::A8B8G8R8 = true;
315 	bool Capabilities::Texture::P8 = false;
316 	bool Capabilities::Texture::A8P8 = false;
317 	bool Capabilities::Texture::G16R16 = true;
318 	bool Capabilities::Texture::A2R10G10B10 = true;
319 	bool Capabilities::Texture::A2B10G10R10 = true;
320 	bool Capabilities::Texture::A16B16G16R16 = true;
321 	bool Capabilities::Texture::DXT1 = true;
322 	bool Capabilities::Texture::DXT2 = true;
323 	bool Capabilities::Texture::DXT3 = true;
324 	bool Capabilities::Texture::DXT4 = true;
325 	bool Capabilities::Texture::DXT5 = true;
326 	bool Capabilities::Texture::ATI1 = true;
327 	bool Capabilities::Texture::ATI2 = true;
328 	bool Capabilities::Texture::R16F = true;
329 	bool Capabilities::Texture::G16R16F = true;
330 	bool Capabilities::Texture::A16B16G16R16F = true;
331 	bool Capabilities::Texture::R32F = true;
332 	bool Capabilities::Texture::G32R32F = true;
333 	bool Capabilities::Texture::A32B32G32R32F = true;
334 	bool Capabilities::Texture::V8U8 = true;
335 	bool Capabilities::Texture::L6V5U5 = true;
336 	bool Capabilities::Texture::X8L8V8U8 = true;
337 	bool Capabilities::Texture::Q8W8V8U8 = true;
338 	bool Capabilities::Texture::V16U16 = true;
339 	bool Capabilities::Texture::A2W10V10U10 = true;
340 	bool Capabilities::Texture::Q16W16V16U16 = true;
341 	bool Capabilities::Texture::L8 = true;
342 	bool Capabilities::Texture::A4L4 = true;
343 	bool Capabilities::Texture::L16 = true;
344 	bool Capabilities::Texture::A8L8 = true;
345 	bool Capabilities::Texture::D32 = true;
346 	bool Capabilities::Texture::D24S8 = true;
347 	bool Capabilities::Texture::D24X8 = true;
348 	bool Capabilities::Texture::D16 = true;
349 	bool Capabilities::Texture::D24FS8 = true;
350 	bool Capabilities::Texture::D32F_LOCKABLE = true;
351 	bool Capabilities::Texture::DF24 = true;
352 	bool Capabilities::Texture::DF16 = true;
353 	bool Capabilities::Texture::INTZ = true;
354 
isSRGBreadable(D3DFORMAT format)355 	bool Capabilities::isSRGBreadable(D3DFORMAT format)
356 	{
357 		// Keep in sync with Surface::isSRGBreadable
358 		switch(format)
359 		{
360 		case D3DFMT_L8:
361 		case D3DFMT_A8L8:
362 		case D3DFMT_R8G8B8:
363 		case D3DFMT_A8R8G8B8:
364 		case D3DFMT_X8R8G8B8:
365 		case D3DFMT_A8B8G8R8:
366 		case D3DFMT_X8B8G8R8:
367 		case D3DFMT_R5G6B5:
368 		case D3DFMT_X1R5G5B5:
369 		case D3DFMT_A1R5G5B5:
370 		case D3DFMT_A4R4G4B4:
371 		case D3DFMT_DXT1:
372 		case D3DFMT_DXT2:
373 		case D3DFMT_DXT3:
374 		case D3DFMT_DXT4:
375 		case D3DFMT_DXT5:
376 		case D3DFMT_ATI1:
377 		case D3DFMT_ATI2:
378 			return true;
379 		default:
380 			return false;
381 		}
382 
383 		return false;
384 	}
385 
isSRGBwritable(D3DFORMAT format)386 	bool Capabilities::isSRGBwritable(D3DFORMAT format)
387 	{
388 		// Keep in sync with Surface::isSRGBwritable
389 		switch(format)
390 		{
391 		case D3DFMT_NULL:
392 		case D3DFMT_A8R8G8B8:
393 		case D3DFMT_X8R8G8B8:
394 		case D3DFMT_A8B8G8R8:
395 		case D3DFMT_X8B8G8R8:
396 		case D3DFMT_R5G6B5:
397 			return true;
398 		default:
399 			return false;
400 		}
401 	}
402 
403 	unsigned int pixelShaderVersionX = D3DPS_VERSION(3, 0);
404 	unsigned int vertexShaderVersionX = D3DVS_VERSION(3, 0);
405 
406 	unsigned long pixelShaderArbitrarySwizzle = D3DPS20CAPS_ARBITRARYSWIZZLE;
407 	unsigned long pixelShaderGradientInstructions = D3DPS20CAPS_GRADIENTINSTRUCTIONS;
408 	unsigned long pixelShaderPredication = D3DPS20CAPS_PREDICATION;
409 	unsigned long pixelShaderNoDependentReadLimit = D3DPS20CAPS_NODEPENDENTREADLIMIT;
410 	unsigned long pixelShaderNoTexInstructionLimit = D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT;
411 
412 	unsigned long pixelShaderDynamicFlowControlDepth = D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH;
413 	unsigned long pixelShaderStaticFlowControlDepth = D3DPS20_MAX_STATICFLOWCONTROLDEPTH;
414 
415 	unsigned long vertexShaderPredication = D3DVS20CAPS_PREDICATION;
416 	unsigned long vertexShaderDynamicFlowControlDepth = D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH;
417 
418 	unsigned int textureMemory = 256 * 1024 * 1024;
419 	unsigned int maxAnisotropy = 16;
420 }
421