Home | History | Annotate | Download | only in D3D8
      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 #ifndef D3D8_Capabilities_hpp
     16 #define D3D8_Capabilities_hpp
     17 
     18 #include <d3d8.h>
     19 
     20 namespace D3D8
     21 {
     22 	struct Capabilities
     23 	{
     24 		struct Surface
     25 		{
     26 			struct RenderTarget
     27 			{
     28 				static bool R8G8B8;
     29 				static bool R5G6B5;
     30 				static bool X1R5G5B5;
     31 				static bool A1R5G5B5;
     32 				static bool A4R4G4B4;
     33 				static bool R3G3B2;
     34 				static bool A8R3G3B2;
     35 				static bool X4R4G4B4;
     36 				static bool A8R8G8B8;
     37 				static bool X8R8G8B8;
     38 				static bool A8B8G8R8;
     39 				static bool X8B8G8R8;
     40 				// Integer HDR formats
     41 				static bool G16R16;
     42 				static bool A2B10G10R10;
     43 			};
     44 
     45 			struct DepthStencil
     46 			{
     47 				static bool D32;
     48 				static bool D24S8;
     49 				static bool D24X8;
     50 				static bool D16;
     51 			};
     52 
     53 			static bool A8;
     54 			static bool R5G6B5;
     55 			static bool X1R5G5B5;
     56 			static bool A1R5G5B5;
     57 			static bool A4R4G4B4;
     58 			static bool R3G3B2;
     59 			static bool A8R3G3B2;
     60 			static bool X4R4G4B4;
     61 			static bool R8G8B8;
     62 			static bool X8R8G8B8;
     63 			static bool A8R8G8B8;
     64 			static bool A8B8G8R8;
     65 			static bool X8B8G8R8;
     66 			// Paletted formats
     67 			static bool P8;
     68 			static bool A8P8;
     69 			// Integer HDR formats
     70 			static bool G16R16;
     71 			static bool A2B10G10R10;
     72 			// Compressed formats
     73 			static bool DXT1;
     74 			static bool DXT2;
     75 			static bool DXT3;
     76 			static bool DXT4;
     77 			static bool DXT5;
     78 			// Bump map formats
     79 			static bool V8U8;
     80 			static bool L6V5U5;
     81 			static bool X8L8V8U8;
     82 			static bool Q8W8V8U8;
     83 			static bool V16U16;
     84 			static bool A2W10V10U10;
     85 			// Luminance formats
     86 			static bool L8;
     87 			static bool A4L4;
     88 			static bool A8L8;
     89 		};
     90 
     91 		struct Volume
     92 		{
     93 			static bool A8;
     94 			static bool R5G6B5;
     95 			static bool X1R5G5B5;
     96 			static bool A1R5G5B5;
     97 			static bool A4R4G4B4;
     98 			static bool R3G3B2;
     99 			static bool A8R3G3B2;
    100 			static bool X4R4G4B4;
    101 			static bool R8G8B8;
    102 			static bool X8R8G8B8;
    103 			static bool A8R8G8B8;
    104 			static bool A8B8G8R8;
    105 			static bool X8B8G8R8;
    106 			// Paletted formats
    107 			static bool P8;
    108 			static bool A8P8;
    109 			// Integer HDR formats
    110 			static bool G16R16;
    111 			static bool A2B10G10R10;
    112 			// Compressed formats
    113 			static bool DXT1;
    114 			static bool DXT2;
    115 			static bool DXT3;
    116 			static bool DXT4;
    117 			static bool DXT5;
    118 			// Bump map formats
    119 			static bool V8U8;
    120 			static bool L6V5U5;
    121 			static bool X8L8V8U8;
    122 			static bool Q8W8V8U8;
    123 			static bool V16U16;
    124 			static bool A2W10V10U10;
    125 			// Luminance formats
    126 			static bool L8;
    127 			static bool A4L4;
    128 			static bool A8L8;
    129 		};
    130 
    131 		struct CubeMap
    132 		{
    133 			struct RenderTarget
    134 			{
    135 				static bool R8G8B8;
    136 				static bool R5G6B5;
    137 				static bool X1R5G5B5;
    138 				static bool A1R5G5B5;
    139 				static bool A4R4G4B4;
    140 				static bool R3G3B2;
    141 				static bool A8R3G3B2;
    142 				static bool X4R4G4B4;
    143 				static bool A8R8G8B8;
    144 				static bool X8R8G8B8;
    145 				static bool A8B8G8R8;
    146 				static bool X8B8G8R8;
    147 				// Integer HDR formats
    148 				static bool G16R16;
    149 				static bool A2B10G10R10;
    150 			};
    151 
    152 			struct DepthStencil
    153 			{
    154 				static bool D32;
    155 				static bool D24S8;
    156 				static bool D24X8;
    157 				static bool D16;
    158 			};
    159 
    160 			static bool A8;
    161 			static bool R5G6B5;
    162 			static bool X1R5G5B5;
    163 			static bool A1R5G5B5;
    164 			static bool A4R4G4B4;
    165 			static bool R3G3B2;
    166 			static bool A8R3G3B2;
    167 			static bool X4R4G4B4;
    168 			static bool R8G8B8;
    169 			static bool X8R8G8B8;
    170 			static bool A8R8G8B8;
    171 			static bool A8B8G8R8;
    172 			static bool X8B8G8R8;
    173 			// Paletted formats
    174 			static bool P8;
    175 			static bool A8P8;
    176 			// Integer HDR formats
    177 			static bool G16R16;
    178 			static bool A2B10G10R10;
    179 			// Compressed formats
    180 			static bool DXT1;
    181 			static bool DXT2;
    182 			static bool DXT3;
    183 			static bool DXT4;
    184 			static bool DXT5;
    185 			// Bump map formats
    186 			static bool V8U8;
    187 			static bool L6V5U5;
    188 			static bool X8L8V8U8;
    189 			static bool Q8W8V8U8;
    190 			static bool V16U16;
    191 			static bool A2W10V10U10;
    192 			// Luminance formats
    193 			static bool L8;
    194 			static bool A4L4;
    195 			static bool A8L8;
    196 		};
    197 
    198 		struct VolumeTexture
    199 		{
    200 			static bool A8;
    201 			static bool R5G6B5;
    202 			static bool X1R5G5B5;
    203 			static bool A1R5G5B5;
    204 			static bool A4R4G4B4;
    205 			static bool R3G3B2;
    206 			static bool A8R3G3B2;
    207 			static bool X4R4G4B4;
    208 			static bool R8G8B8;
    209 			static bool X8R8G8B8;
    210 			static bool A8R8G8B8;
    211 			static bool A8B8G8R8;
    212 			static bool X8B8G8R8;
    213 			// Paletted formats
    214 			static bool P8;
    215 			static bool A8P8;
    216 			// Integer HDR formats
    217 			static bool G16R16;
    218 			static bool A2B10G10R10;
    219 			// Compressed formats
    220 			static bool DXT1;
    221 			static bool DXT2;
    222 			static bool DXT3;
    223 			static bool DXT4;
    224 			static bool DXT5;
    225 			// Bump map formats
    226 			static bool V8U8;
    227 			static bool L6V5U5;
    228 			static bool X8L8V8U8;
    229 			static bool Q8W8V8U8;
    230 			static bool V16U16;
    231 			static bool A2W10V10U10;
    232 			// Luminance formats
    233 			static bool L8;
    234 			static bool A4L4;
    235 			static bool A8L8;
    236 		};
    237 
    238 		struct Texture
    239 		{
    240 			struct RenderTarget
    241 			{
    242 				static bool R8G8B8;
    243 				static bool R5G6B5;
    244 				static bool X1R5G5B5;
    245 				static bool A1R5G5B5;
    246 				static bool A4R4G4B4;
    247 				static bool R3G3B2;
    248 				static bool A8R3G3B2;
    249 				static bool X4R4G4B4;
    250 				static bool A8R8G8B8;
    251 				static bool X8R8G8B8;
    252 				static bool A8B8G8R8;
    253 				static bool X8B8G8R8;
    254 				// Integer HDR formats
    255 				static bool G16R16;
    256 				static bool A2B10G10R10;
    257 			};
    258 
    259 			struct DepthStencil
    260 			{
    261 				static bool D32;
    262 				static bool D24S8;
    263 				static bool D24X8;
    264 				static bool D16;
    265 			};
    266 
    267 			static bool A8;
    268 			static bool R5G6B5;
    269 			static bool X1R5G5B5;
    270 			static bool A1R5G5B5;
    271 			static bool A4R4G4B4;
    272 			static bool R3G3B2;
    273 			static bool A8R3G3B2;
    274 			static bool X4R4G4B4;
    275 			static bool R8G8B8;
    276 			static bool X8R8G8B8;
    277 			static bool A8R8G8B8;
    278 			static bool A8B8G8R8;
    279 			static bool X8B8G8R8;
    280 			// Paletted formats
    281 			static bool P8;
    282 			static bool A8P8;
    283 			// Integer HDR formats
    284 			static bool G16R16;
    285 			static bool A2B10G10R10;
    286 			// Compressed formats
    287 			static bool DXT1;
    288 			static bool DXT2;
    289 			static bool DXT3;
    290 			static bool DXT4;
    291 			static bool DXT5;
    292 			// Bump map formats
    293 			static bool V8U8;
    294 			static bool L6V5U5;
    295 			static bool X8L8V8U8;
    296 			static bool Q8W8V8U8;
    297 			static bool V16U16;
    298 			static bool A2W10V10U10;
    299 			// Luminance formats
    300 			static bool L8;
    301 			static bool A4L4;
    302 			static bool A8L8;
    303 		};
    304 	};
    305 
    306 	extern unsigned int pixelShaderVersion;
    307 	extern unsigned int vertexShaderVersion;
    308 
    309 	extern unsigned int textureMemory;
    310 	extern unsigned int maxAnisotropy;
    311 }
    312 
    313 #endif   // D3D8_Capabilities_hpp
    314