2009/12/2 Stefan Dösinger stefan@codeweavers.com:
updateSurfaceDesc((IWineD3DSurfaceImpl *)swapchain->frontBuffer, pPresentationParameters);
hr = updateSurfaceDesc((IWineD3DSurfaceImpl *)swapchain->frontBuffer, pPresentationParameters);
if(FAILED(hr))
{
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
return hr;
}
for(i = 0; i < swapchain->presentParms.BackBufferCount; i++) {
updateSurfaceDesc((IWineD3DSurfaceImpl *)swapchain->backBuffer[i], pPresentationParameters);
hr = updateSurfaceDesc((IWineD3DSurfaceImpl *)swapchain->backBuffer[i], pPresentationParameters);
if(FAILED(hr))
{
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
return hr;
} }
IWineD3DDeviceImpl_Reset() suffers from similar issues in general, so maybe we just don't care, but if one of the updateSurfaceDesc() calls fails you're left with inconsistent surface sizes.
- This->Flags |= SFLAG_INSYSMEM;
Why is this in surface_init_sysmem(), instead of a ModifyLocation() call after the call to surface_init_sysmem()?
Am 02.12.2009 um 22:10 schrieb Henri Verbeet:
IWineD3DDeviceImpl_Reset() suffers from similar issues in general, so maybe we just don't care, but if one of the updateSurfaceDesc() calls fails you're left with inconsistent surface sizes.
We don't care because by Microsoft's design Reset() leaves the device in a broken state if it fails, and all you can do with it is call Reset() again or destroy it.
- This->Flags |= SFLAG_INSYSMEM;
Why is this in surface_init_sysmem(), instead of a ModifyLocation() call after the call to surface_init_sysmem()?
My sense is that surface_init_sysmem should set it since it allocates and writes to the system memory copy. Probably surface_init_sysmem should call ModifyLocation itself to remove the other location flags.
2009/12/3 Stefan Dösinger stefandoesinger@gmx.at:
Am 02.12.2009 um 22:10 schrieb Henri Verbeet:
IWineD3DDeviceImpl_Reset() suffers from similar issues in general, so maybe we just don't care, but if one of the updateSurfaceDesc() calls fails you're left with inconsistent surface sizes.
We don't care because by Microsoft's design Reset() leaves the device in a broken state if it fails, and all you can do with it is call Reset() again or destroy it.
Ok.
- This->Flags |= SFLAG_INSYSMEM;
Why is this in surface_init_sysmem(), instead of a ModifyLocation() call after the call to surface_init_sysmem()?
My sense is that surface_init_sysmem should set it since it allocates and writes to the system memory copy. Probably surface_init_sysmem should call ModifyLocation itself to remove the other location flags.
That would work as well, my main point was that I don't like functions other than ModifyLocation() touching the location flags.