Changeset 32184 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
- Timestamp:
- Sep 1, 2010 4:37:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
r31868 r32184 935 935 } 936 936 937 #ifdef VBOXWDDM 938 HRESULT VBoxWineExD3DDev9CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, 937 static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, 939 938 D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface, 940 939 UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality 940 #ifdef VBOXWDDM 941 941 , HANDLE *shared_handle 942 942 , void *pvClientMem 943 #endif 943 944 ) 944 945 { … … 960 961 961 962 hr = surface_init(object, This, Width, Height, Format, Lockable, Discard, 962 Level, Usage, Pool, MultiSample, MultisampleQuality, 963 shared_handle, pvClientMem); 963 Level, Usage, Pool, MultiSample, MultisampleQuality 964 #ifdef VBOXWDDM 965 , shared_handle 966 , pvClientMem 967 #endif 968 ); 964 969 if (FAILED(hr)) 965 970 { … … 973 978 974 979 return D3D_OK; 975 }976 #endif977 static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height,978 D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface,979 UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality)980 {981 #ifdef VBOXWDDM982 return VBoxWineExD3DDev9CreateSurface(iface, Width, Height, Format, Lockable, Discard, Level, ppSurface,983 Usage, Pool, MultiSample, MultisampleQuality, NULL, NULL);984 #else985 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;986 IDirect3DSurface9Impl *object;987 HRESULT hr;988 989 TRACE("iface %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p.\n"990 "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n",991 iface, Width, Height, Format, Lockable, Discard, Level, ppSurface,992 Usage, Pool, MultiSample, MultisampleQuality);993 994 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DSurface9Impl));995 if (!object)996 {997 FIXME("Failed to allocate surface memory.\n");998 return D3DERR_OUTOFVIDEOMEMORY;999 }1000 1001 hr = surface_init(object, This, Width, Height, Format, Lockable, Discard,1002 Level, Usage, Pool, MultiSample, MultisampleQuality);1003 if (FAILED(hr))1004 {1005 WARN("Failed to initialize surface, hr %#x.\n", hr);1006 HeapFree(GetProcessHeap(), 0, object);1007 return hr;1008 }1009 1010 TRACE("Created surface %p.\n", object);1011 *ppSurface = (IDirect3DSurface9 *)object;1012 1013 return D3D_OK;1014 #endif1015 980 } 1016 981 … … 1027 992 1028 993 hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */, 1029 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality); 994 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality 995 #ifdef VBOXWDDM 996 , pSharedHandle 997 , NULL 998 #endif 999 ); 1030 1000 1031 1001 return hr; … … 1044 1014 1045 1015 hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, Discard, 1046 0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality); 1016 0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality 1017 #ifdef VBOXWDDM 1018 , pSharedHandle 1019 , NULL 1020 #endif 1021 ); 1047 1022 1048 1023 return hr; … … 1179 1154 hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE /* Discard */, 1180 1155 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, (WINED3DPOOL)Pool, D3DMULTISAMPLE_NONE, 1181 0 /* MultisampleQuality */); 1156 0 /* MultisampleQuality */ 1157 #ifdef VBOXWDDM 1158 , pSharedHandle 1159 , NULL 1160 #endif 1161 ); 1182 1162 1183 1163 return hr; … … 2756 2736 lockable = FALSE; 2757 2737 2758 #ifdef VBOXWDDM2759 hr = VBoxWineExD3DDev9CreateSurface((IDirect3DDevice9Ex *)This, width, height,2760 d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level,2761 (IDirect3DSurface9 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */2762 , shared_handle2763 , pvClientMem2764 );2765 2766 #else2767 2738 hr = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)This, width, height, 2768 2739 d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level, 2769 2740 (IDirect3DSurface9 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */ 2741 #ifdef VBOXWDDM 2742 , shared_handle 2743 , pvClientMem 2744 #endif 2770 2745 ); 2771 #endif2772 2746 if (FAILED(hr)) 2773 2747 {
Note:
See TracChangeset
for help on using the changeset viewer.