Changeset 31936 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
- Timestamp:
- Aug 24, 2010 4:52:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
r31828 r31936 495 495 { 496 496 IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; 497 498 #if defined(DEBUG_misha) && defined (VBOXWDDM) 499 if (VBOXSHRC_IS_SHARED(This)) 500 { 501 Assert(0); 502 } 503 #endif 497 504 498 505 This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); … … 887 894 } 888 895 889 if (format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED && mem) 890 { 891 GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level, 892 internal, width, height, 0, This->resource.size, mem)); 893 } 894 else 895 { 896 glTexImage2D(This->texture_target, This->texture_level, 897 internal, width, height, 0, format_desc->glFormat, format_desc->glType, mem); 898 checkGLcall("glTexImage2D"); 896 #ifdef VBOXWDDM 897 if (!VBOXSHRC_IS_SHARED_OPENED(This)) 898 #endif 899 { 900 if (format_desc->Flags & WINED3DFMT_FLAG_COMPRESSED && mem) 901 { 902 GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level, 903 internal, width, height, 0, This->resource.size, mem)); 904 } 905 else 906 { 907 glTexImage2D(This->texture_target, This->texture_level, 908 internal, width, height, 0, format_desc->glFormat, format_desc->glType, mem); 909 checkGLcall("glTexImage2D"); 910 } 899 911 } 900 912 … … 1001 1013 IWineD3DBaseTexture *baseTexture = NULL; 1002 1014 1003 #ifdef VBOXWDDM 1004 if (VBOXSHRC_IS_SHARED(This)) 1005 { 1006 if (!VBOXSHRC_IS_SHARED_OPENED(This)) 1007 IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL); 1008 else 1009 This->Flags |= SFLAG_INTEXTURE; 1010 } 1011 else 1012 #endif 1013 { 1014 if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE)) 1015 IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */); 1016 1017 IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE); 1018 } 1015 if (!(This->Flags & SFLAG_INSYSMEM) && (This->Flags & SFLAG_INTEXTURE)) 1016 IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL /* no partial locking for textures yet */); 1017 1018 IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE); 1019 1019 1020 1020 if (dirty_rect) … … 3982 3982 } 3983 3983 3984 #ifdef VBOXWDDM 3985 static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, DWORD flag, const RECT *rect); 3986 #endif 3987 3984 3988 static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { 3985 3989 /** Check against the maximum texture sizes supported by the video card **/ … … 4066 4070 } 4067 4071 4068 #ifdef VBOXWDDM 4069 if (!VBOXSHRC_IS_SHARED(This)) 4070 #endif 4071 { 4072 This->Flags |= SFLAG_INSYSMEM; 4073 } 4072 This->Flags |= SFLAG_INSYSMEM; 4074 4073 4075 4074 return WINED3D_OK; … … 4281 4280 if(((This->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) || 4282 4281 ((This->Flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX))) { 4282 #ifdef VBOXWDDM 4283 if (VBOXSHRC_IS_SHARED(This)) 4284 { 4285 IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL); 4286 } 4287 else 4288 #endif 4283 4289 if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) { 4284 4290 TRACE("Passing to container\n"); … … 4298 4304 } else { 4299 4305 if((This->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) { 4306 #ifdef VBOXWDDM 4307 if (VBOXSHRC_IS_SHARED(This)) 4308 { 4309 IWineD3DSurfaceImpl_LoadLocation(iface, SFLAG_INTEXTURE, NULL); 4310 } 4311 else 4312 #endif 4300 4313 if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) { 4301 4314 TRACE("Passing to container\n");
Note:
See TracChangeset
for help on using the changeset viewer.