- Timestamp:
- Mar 15, 2012 2:18:38 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/cubetexture.c
r40388 r40481 248 248 static HRESULT WINAPI IWineD3DCubeTextureImpl_SetShRcState(IWineD3DCubeTexture *iface, VBOXWINEEX_SHRC_STATE enmState) { 249 249 IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl*)iface; 250 struct wined3d_context *context = NULL; 250 251 HRESULT hr = IWineD3DResourceImpl_SetShRcState((IWineD3DResource*)iface, enmState); 251 252 unsigned int i, j; … … 266 267 } 267 268 269 if (!This->resource.device->isInDraw) 270 { 271 context = context_acquire(This->resource.device, NULL, CTXUSAGE_RESOURCELOAD); 272 if (!context) 273 { 274 ERR("zero context!"); 275 return E_FAIL; 276 } 277 278 if (!context->valid) 279 { 280 ERR("context invalid!"); 281 context_release(context); 282 return E_FAIL; 283 } 284 } 285 268 286 device_cleanup_durtify_texture_target(This->resource.device, ((IWineD3DSurfaceImpl*)This->surfaces[j][i])->texture_target); 287 288 if (context) 289 context_release(context); 269 290 270 291 return WINED3D_OK; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
r40388 r40481 5353 5353 IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl*)iface; 5354 5354 IWineD3DBaseTextureImpl *texture = NULL; 5355 struct wined3d_context *context = NULL; 5355 5356 HRESULT hr; 5356 5357 unsigned int i; … … 5392 5393 5393 5394 if (!texture) 5395 { 5396 if (!This->resource.device->isInDraw) 5397 { 5398 context = context_acquire(This->resource.device, NULL, CTXUSAGE_RESOURCELOAD); 5399 if (!context) 5400 { 5401 ERR("zero context!"); 5402 return E_FAIL; 5403 } 5404 5405 if (!context->valid) 5406 { 5407 ERR("context invalid!"); 5408 context_release(context); 5409 return E_FAIL; 5410 } 5411 } 5412 5394 5413 device_cleanup_durtify_texture_target(This->resource.device, This->texture_target); 5414 5415 if (context) 5416 context_release(context); 5417 } 5395 5418 5396 5419 return WINED3D_OK; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/texture.c
r40388 r40481 234 234 static HRESULT WINAPI IWineD3DTextureImpl_SetShRcState(IWineD3DTexture *iface, VBOXWINEEX_SHRC_STATE enmState) { 235 235 IWineD3DTextureImpl *This = (IWineD3DTextureImpl*)iface; 236 struct wined3d_context *context = NULL; 236 237 HRESULT hr = IWineD3DResourceImpl_SetShRcState((IWineD3DResource*)iface, enmState); 237 238 unsigned int i; … … 252 253 } 253 254 255 if (!This->resource.device->isInDraw) 256 { 257 context = context_acquire(This->resource.device, NULL, CTXUSAGE_RESOURCELOAD); 258 if (!context) 259 { 260 ERR("zero context!"); 261 return E_FAIL; 262 } 263 264 if (!context->valid) 265 { 266 ERR("context invalid!"); 267 context_release(context); 268 return E_FAIL; 269 } 270 } 271 254 272 device_cleanup_durtify_texture_target(This->resource.device, This->target); 273 274 if (context) 275 context_release(context); 255 276 256 277 return WINED3D_OK;
Note:
See TracChangeset
for help on using the changeset viewer.