Changeset 22496 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8
- Timestamp:
- Aug 27, 2009 8:57:47 AM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h
r21731 r22496 107 107 _pD3D8Caps->MaxPixelShaderValue = _pWineCaps->PixelShader1xMaxValue; 108 108 109 void fixup_caps(WINED3DCAPS *pWineCaps); 110 109 111 /* Direct3D8 Interfaces: */ 110 112 typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/device.c
r21731 r22496 404 404 hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps); 405 405 LeaveCriticalSection(&d3d8_cs); 406 fixup_caps(pWineCaps); 406 407 WINECAPSTOD3D8CAPS(pCaps, pWineCaps) 407 408 HeapFree(GetProcessHeap(), 0, pWineCaps); 408 409 /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */410 if(pCaps->PixelShaderVersion > D3DPS_VERSION(1,4)){411 pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);412 }413 if(pCaps->VertexShaderVersion > D3DVS_VERSION(1,1)){414 pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);415 }416 pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);417 409 418 410 TRACE("Returning %p %p\n", This, pCaps); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/directx.c
r21731 r22496 205 205 TRACE("(%p)->(%d, %d, %d, %08x, %d, %d)\n", This, Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat); 206 206 207 if(CheckFormat == D3DFMT_R8G8B8) 208 { 209 /* See comment in dlls/d3d9/directx.c, IDirect3D9Impl_CheckDeviceFormat for details */ 210 WARN("D3DFMT_R8G8B8 is not available on windows, returning D3DERR_NOTAVAILABLE\n"); 211 return D3DERR_NOTAVAILABLE; 212 } 213 214 207 215 switch(RType) { 208 216 case D3DRTYPE_VERTEXBUFFER: … … 252 260 } 253 261 262 void fixup_caps(WINED3DCAPS *caps) 263 { 264 /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */ 265 if (caps->PixelShaderVersion > D3DPS_VERSION(1,4)) { 266 caps->PixelShaderVersion = D3DPS_VERSION(1,4); 267 } 268 if (caps->VertexShaderVersion > D3DVS_VERSION(1,1)) { 269 caps->VertexShaderVersion = D3DVS_VERSION(1,1); 270 } 271 caps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, caps->MaxVertexShaderConst); 272 273 caps->StencilCaps &= ~WINED3DSTENCILCAPS_TWOSIDED; 274 } 275 254 276 static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) { 255 277 IDirect3D8Impl *This = (IDirect3D8Impl *)iface; … … 269 291 hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps); 270 292 LeaveCriticalSection(&d3d8_cs); 293 fixup_caps(pWineCaps); 271 294 WINECAPSTOD3D8CAPS(pCaps, pWineCaps) 272 295 HeapFree(GetProcessHeap(), 0, pWineCaps); 273 274 /* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */275 if(pCaps->PixelShaderVersion > D3DPS_VERSION(1,4)){276 pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);277 }278 if(pCaps->VertexShaderVersion > D3DVS_VERSION(1,1)){279 pCaps->VertexShaderVersion = D3DVS_VERSION(1,1);280 }281 pCaps->MaxVertexShaderConst = min(D3D8_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);282 296 283 297 TRACE("(%p) returning %p\n", This, pCaps); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/version.rc
r21731 r22496 35 35 */ 36 36 37 /* 38 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice 39 * other than GPL or LGPL is available it will apply instead, Sun elects to use only 40 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where 41 * a choice of LGPL license versions is made available with the language indicating 42 * that LGPLv2 or any later version may be used, or where a choice of which version 43 * of the LGPL is applied is otherwise unspecified. 44 */ 45 37 46 #define WINE_FILEDESCRIPTION_STR "Wine Direct3D" 38 47 #define WINE_FILENAME_STR "d3d8.dll"
Note:
See TracChangeset
for help on using the changeset viewer.