Commit 6325f3dd authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent 99092c27
...@@ -882,7 +882,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 ...@@ -882,7 +882,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
surface_desc.format = swapchain->desc.backbuffer_format; surface_desc.format = swapchain->desc.backbuffer_format;
surface_desc.multisample_type = swapchain->desc.multisample_type; surface_desc.multisample_type = swapchain->desc.multisample_type;
surface_desc.multisample_quality = swapchain->desc.multisample_quality; 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.pool = WINED3D_POOL_DEFAULT;
surface_desc.width = swapchain->desc.backbuffer_width; surface_desc.width = swapchain->desc.backbuffer_width;
surface_desc.height = swapchain->desc.backbuffer_height; surface_desc.height = swapchain->desc.backbuffer_height;
...@@ -992,6 +992,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 ...@@ -992,6 +992,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
goto err; goto err;
} }
surface_desc.usage |= WINED3DUSAGE_RENDERTARGET;
for (i = 0; i < swapchain->desc.backbuffer_count; ++i) for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
{ {
TRACE("Creating back buffer %u.\n", i); TRACE("Creating back buffer %u.\n", i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment