wined3d: Merge two if conditions in buffer.c.
This commit is contained in:
parent
2ca477c831
commit
b621fac215
|
@ -900,6 +900,19 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
|
|||
goto end;
|
||||
}
|
||||
buffer_check_buffer_object_size(This);
|
||||
|
||||
/* The declaration changed, reload the whole buffer */
|
||||
WARN("Reloading buffer because of decl change\n");
|
||||
buffer_clear_dirty_areas(This);
|
||||
if(!buffer_add_dirty_area(This, 0, 0))
|
||||
{
|
||||
ERR("buffer_add_dirty_area failed, this is not expected\n");
|
||||
return;
|
||||
}
|
||||
/* Avoid unfenced updates, we might overwrite more areas of the buffer than the application
|
||||
* cleared for unsynchronized updates
|
||||
*/
|
||||
flags = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -927,22 +940,6 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
|
|||
}
|
||||
}
|
||||
|
||||
if (decl_changed)
|
||||
{
|
||||
/* The declaration changed, reload the whole buffer */
|
||||
WARN("Reloading buffer because of decl change\n");
|
||||
buffer_clear_dirty_areas(This);
|
||||
if(!buffer_add_dirty_area(This, 0, 0))
|
||||
{
|
||||
ERR("buffer_add_dirty_area failed, this is not expected\n");
|
||||
return;
|
||||
}
|
||||
/* Avoid unfenced updates, we might overwrite more areas of the buffer than the application
|
||||
* cleared for unsynchronized updates
|
||||
*/
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
|
||||
{
|
||||
IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER);
|
||||
|
|
Loading…
Reference in New Issue