wined3d: Do not upload to the vbo if there's nothing to do.

This commit is contained in:
Stefan Dösinger 2007-04-19 18:11:36 +02:00 committed by Alexandre Julliard
parent a224fdb14e
commit fe3ebb3c42
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface)
TRACE("(%p)\n", This);
/* For now load in unlock */
if(locks == 0 && This->vbo) {
if(locks == 0 && This->vbo && (This->dirtyend - This->dirtystart) > 0) {
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
ENTER_GL();