- Timestamp:
- May 20, 2010 10:02:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r29488 r29677 35 35 # include <stdio.h> 36 36 #endif 37 38 static FORMATOP gVBoxFormatOps[] = { 39 {D3DDDIFMT_A8R8G8B8, 40 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 41 FORMATOP_SAME_FORMAT_RENDERTARGET| 42 FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET| 43 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 44 FORMATOP_MEMBEROFGROUP_ARGB| 45 FORMATOP_SRGBWRITE|FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 46 47 {D3DDDIFMT_X8R8G8B8, 48 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 49 FORMATOP_SAME_FORMAT_RENDERTARGET| 50 FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION| 51 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 52 FORMATOP_MEMBEROFGROUP_ARGB| 53 FORMATOP_SRGBWRITE|FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 54 55 {D3DDDIFMT_A2R10G10B10, 56 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 57 FORMATOP_SAME_FORMAT_RENDERTARGET| 58 0| 59 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 60 FORMATOP_MEMBEROFGROUP_ARGB| 61 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 62 63 {D3DDDIFMT_X1R5G5B5, 64 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 65 FORMATOP_SAME_FORMAT_RENDERTARGET| 66 0| 67 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 68 FORMATOP_MEMBEROFGROUP_ARGB| 69 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 70 71 {D3DDDIFMT_A1R5G5B5, 72 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 73 FORMATOP_SAME_FORMAT_RENDERTARGET| 74 FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET| 75 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 76 FORMATOP_MEMBEROFGROUP_ARGB| 77 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 78 79 {D3DDDIFMT_A4R4G4B4, 80 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 81 FORMATOP_SAME_FORMAT_RENDERTARGET| 82 FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET| 83 FORMATOP_OFFSCREENPLAIN| 84 0| 85 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 86 87 {D3DDDIFMT_R5G6B5, 88 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 89 FORMATOP_SAME_FORMAT_RENDERTARGET| 90 FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION| 91 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 92 FORMATOP_MEMBEROFGROUP_ARGB| 93 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 94 95 {D3DDDIFMT_L16, 96 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 97 0| 98 0| 99 FORMATOP_OFFSCREENPLAIN| 100 0| 101 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 102 103 {D3DDDIFMT_A8L8, 104 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 105 0| 106 0| 107 FORMATOP_OFFSCREENPLAIN| 108 0| 109 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 110 111 {D3DDDIFMT_A8, 112 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 113 0| 114 0| 115 FORMATOP_OFFSCREENPLAIN| 116 0| 117 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 118 119 {D3DDDIFMT_L8, 120 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 121 0| 122 0| 123 FORMATOP_OFFSCREENPLAIN| 124 0| 125 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 126 127 {D3DDDIFMT_D16, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0}, 128 {D3DDDIFMT_D24S8, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0}, 129 {D3DDDIFMT_D24X8, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0}, 130 131 {D3DDDIFMT_DXT1, 132 FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE| 133 0| 134 0| 135 FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 136 0| 137 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 138 139 {D3DDDIFMT_DXT2, 140 FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE| 141 0| 142 0| 143 FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 144 0| 145 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 146 147 {D3DDDIFMT_DXT3, 148 FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE| 149 0| 150 0| 151 FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 152 0| 153 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 154 155 {D3DDDIFMT_DXT4, 156 FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE| 157 0| 158 0| 159 FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 160 0| 161 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 162 163 {D3DDDIFMT_DXT5, 164 FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE| 165 0| 166 0| 167 FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD| 168 0| 169 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 170 171 {D3DDDIFMT_X8L8V8U8, 172 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 173 0| 174 0| 175 0| 176 FORMATOP_BUMPMAP| 177 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 178 179 {D3DDDIFMT_A2W10V10U10, 180 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 181 0| 182 0| 183 0| 184 FORMATOP_BUMPMAP| 185 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 186 187 {D3DDDIFMT_V8U8, 188 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 189 0| 190 0| 191 0| 192 FORMATOP_BUMPMAP| 193 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 194 195 {D3DDDIFMT_Q8W8V8U8, 196 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 197 0| 198 0| 199 FORMATOP_OFFSCREENPLAIN| 200 FORMATOP_BUMPMAP| 201 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 202 203 {D3DDDIFMT_CxV8U8, FORMATOP_NOFILTER|FORMATOP_NOALPHABLEND|FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0}, 204 205 {D3DDDIFMT_R16F, 206 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 207 FORMATOP_SAME_FORMAT_RENDERTARGET| 208 0| 209 FORMATOP_OFFSCREENPLAIN| 210 0| 211 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 212 213 {D3DDDIFMT_R32F, 214 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 215 FORMATOP_SAME_FORMAT_RENDERTARGET| 216 0| 217 FORMATOP_OFFSCREENPLAIN| 218 0| 219 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 220 221 {D3DDDIFMT_G16R16F, 222 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 223 FORMATOP_SAME_FORMAT_RENDERTARGET| 224 0| 225 FORMATOP_OFFSCREENPLAIN| 226 0| 227 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 228 229 {D3DDDIFMT_G32R32F, 230 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 231 FORMATOP_SAME_FORMAT_RENDERTARGET| 232 0| 233 FORMATOP_OFFSCREENPLAIN| 234 0| 235 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 236 237 {D3DDDIFMT_A16B16G16R16F, 238 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 239 FORMATOP_SAME_FORMAT_RENDERTARGET| 240 0| 241 FORMATOP_OFFSCREENPLAIN| 242 0| 243 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 244 245 {D3DDDIFMT_A32B32G32R32F, 246 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 247 FORMATOP_SAME_FORMAT_RENDERTARGET| 248 0| 249 FORMATOP_OFFSCREENPLAIN| 250 0| 251 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 252 253 {D3DDDIFMT_G16R16, 254 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 255 FORMATOP_SAME_FORMAT_RENDERTARGET| 256 0| 257 FORMATOP_OFFSCREENPLAIN| 258 0| 259 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 260 261 {D3DDDIFMT_A16B16G16R16, 262 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET| 263 FORMATOP_SAME_FORMAT_RENDERTARGET| 264 0| 265 FORMATOP_OFFSCREENPLAIN| 266 0| 267 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 268 269 {D3DDDIFMT_V16U16, 270 FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE| 271 0| 272 0| 273 0| 274 FORMATOP_BUMPMAP| 275 FORMATOP_VERTEXTEXTURE, 0, 0, 0}, 276 277 {D3DDDIFMT_P8, FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION|FORMATOP_OFFSCREENPLAIN, 0, 0, 0}, 278 279 {D3DDDIFMT_UYVY, 280 0| 281 0| 282 0| 283 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 284 FORMATOP_NOFILTER| 285 FORMATOP_NOALPHABLEND| 286 FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0}, 287 288 {D3DDDIFMT_YUY2, 289 0| 290 0| 291 0| 292 FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN| 293 FORMATOP_NOFILTER| 294 FORMATOP_NOALPHABLEND| 295 FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0}, 296 }; 297 298 #define VBOX_FORMATOP_COUNT() (sizeof(gVBoxFormatOps)/sizeof(gVBoxFormatOps[0])) 37 299 38 300 /** … … 181 443 } 182 444 case D3DDDICAPS_GETFORMATCOUNT: 183 *((uint32_t*)pData->pData) = 0;445 *((uint32_t*)pData->pData) = VBOX_FORMATOP_COUNT(); 184 446 break; 185 447 case D3DDDICAPS_GETFORMATDATA: 186 /* TODO: fill the array of FORMATOP structures of size reported with D3DDDICAPS_GETFORMATCOUNT (currently 0) */ 448 Assert(pData->DataSize >= VBOX_FORMATOP_COUNT() * sizeof(FORMATOP)); 449 memcpy(pData->pData, gVBoxFormatOps, VBOX_FORMATOP_COUNT()*sizeof(FORMATOP)); 187 450 break; 188 451 case D3DDDICAPS_GETD3DQUERYCOUNT:
Note:
See TracChangeset
for help on using the changeset viewer.