wined3d: Don't set WINED3DUSAGE_RENDERTARGET on the front buffer.

We never render directly to the front buffer, and in case of e.g. a P8 front
buffer, we would fail surface creation if we were to enforce format
restrictions.
oldstable
Henri Verbeet 2013-09-04 08:56:45 +02:00 committed by Alexandre Julliard
parent 99092c2700
commit 6325f3ddd8
1 changed files with 2 additions and 1 deletions

View File

@ -882,7 +882,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
surface_desc.format = swapchain->desc.backbuffer_format;
surface_desc.multisample_type = swapchain->desc.multisample_type;
surface_desc.multisample_quality = swapchain->desc.multisample_quality;
surface_desc.usage = WINED3DUSAGE_RENDERTARGET;
surface_desc.usage = 0;
surface_desc.pool = WINED3D_POOL_DEFAULT;
surface_desc.width = swapchain->desc.backbuffer_width;
surface_desc.height = swapchain->desc.backbuffer_height;
@ -992,6 +992,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
goto err;
}
surface_desc.usage |= WINED3DUSAGE_RENDERTARGET;
for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
{
TRACE("Creating back buffer %u.\n", i);