Rebase against 538263d0efe725124df88ce1cce124bc3ad7e2af

This commit is contained in:
Alistair Leslie-Hughes
2018-02-20 08:24:24 +11:00
parent 852c641a59
commit 3ee8f1c014
15 changed files with 125 additions and 664 deletions

View File

@@ -1,4 +1,4 @@
From 82f1e6c7a13b14da012e8a8bd64847f05ac32dc1 Mon Sep 17 00:00:00 2001
From 46f234ba973f5c9c60cd1d39f2c61202f92458b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 29 Jul 2015 17:09:50 +0200
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
@@ -43,7 +43,7 @@ index 9115a59..3f14a9a 100644
*device = &device_impl->IDirect3DDevice2_iface;
}
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index d9559ce..c38c4af 100644
index 61f5347..baeb9db 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -305,6 +305,7 @@ struct d3d_device
@@ -64,7 +64,7 @@ index d9559ce..c38c4af 100644
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 0254364..de68965 100644
index c2d87dd..43f7402 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
@@ -152,7 +152,7 @@ index 0254364..de68965 100644
WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(object);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index b8b6860..74fdb95 100644
index a30b44f..9d4e83c 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -209,7 +209,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
@@ -164,11 +164,11 @@ index b8b6860..74fdb95 100644
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
{
This->device1 = NULL;
@@ -6110,7 +6110,24 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
@@ -6111,7 +6111,24 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
{
- wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP;
- wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU
+ /*
+ * The ddraw RGB device allows to use system memory surfaces as rendering target.
+ * This does not cause problems because the RGB device does software rasterization
@@ -186,10 +186,10 @@ index b8b6860..74fdb95 100644
+ wined3d_desc.usage |= WINED3DUSAGE_RENDERTARGET;
+ }
+ else
+ wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP;
+ wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU
| WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
}
else
{
--
1.9.1