From 6325f3ddd8d9922b49608b3afc096eaebada737d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 4 Sep 2013 08:56:45 +0200 Subject: [PATCH] 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. --- dlls/wined3d/swapchain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index d1cb2f5550c..981d946ccc5 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -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);