Rebase against 3056f9beb95f66e598ab51d5d37b21a548b3e5f8

This commit is contained in:
Alistair Leslie-Hughes 2018-11-01 08:08:00 +11:00
parent 6fc555874b
commit a423a7087f
4 changed files with 77 additions and 47 deletions

View File

@ -1,4 +1,4 @@
From 37a07b352d184b7d7c53084eb6e2d3190f8f581d Mon Sep 17 00:00:00 2001
From cf433894ff56fda93491753843e0f4f658f67c8c 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.
@ -8,14 +8,14 @@ Based on a patch by Henri Verbeet.
dlls/ddraw/ddraw.c | 6 +++---
dlls/ddraw/ddraw_private.h | 3 ++-
dlls/ddraw/device.c | 23 ++++++++++++++---------
dlls/ddraw/surface.c | 21 +++++++++++++++++++--
4 files changed, 38 insertions(+), 15 deletions(-)
dlls/ddraw/surface.c | 36 ++++++++++++++++++++++++++++++++++--
4 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index e9e06ee..6677220 100644
index 9a40bc9..6f3d058 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4211,7 +4211,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
@@ -4210,7 +4210,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@ -24,7 +24,7 @@ index e9e06ee..6677220 100644
{
*device = &object->IDirect3DDevice7_iface;
}
@@ -4240,7 +4240,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
@@ -4239,7 +4239,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
return CLASS_E_NOAGGREGATION;
wined3d_mutex_lock();
@ -33,7 +33,7 @@ index e9e06ee..6677220 100644
{
*device = &device_impl->IDirect3DDevice3_iface;
}
@@ -4266,7 +4266,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
@@ -4265,7 +4265,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@ -64,7 +64,7 @@ index 495cb8b..4af638b 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 7866c28..81ace96 100644
index 0d48c7d..2bef17d 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 7866c28..81ace96 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 d201d9d..41fe6a1 100644
index 5ce1d85..e729348 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -226,7 +226,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
@ -164,11 +164,26 @@ index d201d9d..41fe6a1 100644
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
{
This->device1 = NULL;
@@ -6155,7 +6155,24 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
@@ -6162,7 +6162,39 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
{
- wined3d_desc.access = WINED3D_RESOURCE_ACCESS_CPU
+ unsigned int bind_flags = 0;
+
+ if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
+ {
+ bind_flags |= WINED3D_BIND_SHADER_RESOURCE;
+ }
+ else if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE)
+ {
+ bind_flags |= WINED3D_BIND_SHADER_RESOURCE;
+ }
+
+ if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)
+ bind_flags |= WINED3D_BIND_DEPTH_STENCIL;
+ else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
+ bind_flags |= WINED3D_BIND_RENDER_TARGET;
+ /*
+ * 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
@ -180,7 +195,7 @@ index d201d9d..41fe6a1 100644
+ if ((desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) &&
+ SUCCEEDED(hr = wined3d_check_device_format(ddraw->wined3d, WINED3DADAPTER_DEFAULT,
+ WINED3D_DEVICE_TYPE_HAL, mode.format_id, WINED3DUSAGE_RENDERTARGET,
+ WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
+ bind_flags, WINED3D_RTYPE_TEXTURE_2D, wined3d_desc.format)))
+ {
+ FIXME("Application wants to create rendering target in system memory, using video memory instead\n");
+ wined3d_desc.usage |= WINED3DUSAGE_RENDERTARGET;
@ -191,5 +206,5 @@ index d201d9d..41fe6a1 100644
}
else
--
2.7.4
1.9.1

View File

@ -1,4 +1,4 @@
From f41ca623297693e58b3d286245fa01b4c9d9f5b1 Mon Sep 17 00:00:00 2001
From 6b07556e47ab6db08cb68371b706f11525bd2d16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 01:06:26 +0200
Subject: [PATCH] ntdll: Add dummy apiset to PEB.
@ -6,16 +6,16 @@ Subject: [PATCH] ntdll: Add dummy apiset to PEB.
---
dlls/ntdll/thread.c | 2 ++
include/Makefile.in | 1 +
include/apiset.h | 33 +++++++++++++++++++++++++++++++++
include/apiset.h | 38 ++++++++++++++++++++++++++++++++++++++
include/winternl.h | 3 ++-
4 files changed, 38 insertions(+), 1 deletion(-)
4 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 include/apiset.h
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 34e12ad..b1d04ab 100644
index c4e02da..79bc4e2 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -75,6 +75,7 @@ static WCHAR current_dir[MAX_NT_PATH_LENGTH];
@@ -72,6 +72,7 @@ static WCHAR current_dir[MAX_PATH];
static RTL_BITMAP tls_bitmap;
static RTL_BITMAP tls_expansion_bitmap;
static RTL_BITMAP fls_bitmap;
@ -23,7 +23,7 @@ index 34e12ad..b1d04ab 100644
static int nb_threads = 1;
static RTL_CRITICAL_SECTION peb_lock;
@@ -396,6 +397,7 @@ HANDLE thread_init(void)
@@ -308,6 +309,7 @@ void thread_init(void)
peb->FastPebLock = &peb_lock;
peb->ProcessParameters = &params;
@ -32,23 +32,23 @@ index 34e12ad..b1d04ab 100644
peb->TlsExpansionBitmap = &tls_expansion_bitmap;
peb->FlsBitmap = &fls_bitmap;
diff --git a/include/Makefile.in b/include/Makefile.in
index ac0ff21..be384d5 100644
index cc78b1c..e6d554b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -14,6 +14,7 @@ SOURCES = \
@@ -13,6 +13,7 @@ SOURCES = \
amaudio.h \
amstream.idl \
amvideo.idl \
appcompatapi.h \
+ apiset.h \
appcompatapi.h \
appmgmt.h \
appmodel.h \
asptlb.idl \
diff --git a/include/apiset.h b/include/apiset.h
new file mode 100644
index 0000000..5f91171
index 0000000..f55f804
--- /dev/null
+++ b/include/apiset.h
@@ -0,0 +1,33 @@
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 Michael Müller
+ *
@ -66,6 +66,8 @@ index 0000000..5f91171
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#ifndef _API_SET_H_
+#define _API_SET_H_
+
+#include <windef.h>
+
@ -82,8 +84,11 @@ index 0000000..5f91171
+ ULONG Count;
+ API_SET_NAMESPACE_ENTRY Array[1];
+} API_SET_NAMESPACE_ARRAY, *PAPI_SET_NAMESPACE_ARRAY;
+
+#endif
+
diff --git a/include/winternl.h b/include/winternl.h
index 9dd95c3..0701ed4 100644
index 9c88613..c09f462 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -23,6 +23,7 @@
@ -94,7 +99,7 @@ index 9dd95c3..0701ed4 100644
#ifdef __cplusplus
extern "C" {
@@ -279,7 +280,7 @@ typedef struct _PEB
@@ -286,7 +287,7 @@ typedef struct _PEB
ULONG EnvironmentUpdateCount; /* 028/050 */
PVOID KernelCallbackTable; /* 02c/058 */
ULONG Reserved[2]; /* 030/060 */

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "3d5a2567977455d04e4896368a71db74e7b9074b"
echo "3056f9beb95f66e598ab51d5d37b21a548b3e5f8"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 231b7707b5a3f79c63ac3542ba58bf39fc04e972 Mon Sep 17 00:00:00 2001
From a38788ceb03df268149adad0c74b300220003eca Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 4 Dec 2015 10:36:47 +0100
Subject: [PATCH] server: Introduce a new alloc_handle object callback. (v2)
@ -22,7 +22,7 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
server/mailslot.c | 3 +++
server/mapping.c | 3 +++
server/mutex.c | 1 +
server/named_pipe.c | 4 ++++
server/named_pipe.c | 7 ++++++-
server/object.c | 4 ++++
server/object.h | 5 ++++-
server/process.c | 3 +++
@ -39,10 +39,10 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
server/timer.c | 1 +
server/token.c | 1 +
server/winstation.c | 2 ++
34 files changed, 75 insertions(+), 3 deletions(-)
34 files changed, 77 insertions(+), 4 deletions(-)
diff --git a/server/async.c b/server/async.c
index f2674bb..4828bcb 100644
index cadeda3..aab4085 100644
--- a/server/async.c
+++ b/server/async.c
@@ -79,6 +79,7 @@ static const struct object_ops async_ops =
@ -234,7 +234,7 @@ index cfc0f6a..608fafb 100644
no_destroy /* destroy */
};
diff --git a/server/fd.c b/server/fd.c
index e2d6143..52f70a3 100644
index 119fae6..5dcd382 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -218,6 +218,7 @@ static const struct object_ops fd_ops =
@ -270,7 +270,7 @@ index e2d6143..52f70a3 100644
no_destroy /* destroy */
};
diff --git a/server/file.c b/server/file.c
index 6840223..5eb5e65 100644
index 8d39f30..2d9134c 100644
--- a/server/file.c
+++ b/server/file.c
@@ -95,6 +95,7 @@ static const struct object_ops file_ops =
@ -367,7 +367,7 @@ index 95308c4..bc9089b 100644
mailslot_device_destroy /* destroy */
};
diff --git a/server/mapping.c b/server/mapping.c
index 1be6680..fb58376 100644
index bc59b21..ca803a4 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -77,6 +77,7 @@ static const struct object_ops ranges_ops =
@ -407,7 +407,7 @@ index d1887e4..a2a0a24 100644
mutex_destroy /* destroy */
};
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 19a5426..bc4d28f 100644
index 19a5426..8bb2283 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -134,6 +134,7 @@ static const struct object_ops named_pipe_ops =
@ -434,14 +434,24 @@ index 19a5426..bc4d28f 100644
fd_close_handle, /* close_handle */
pipe_end_destroy /* destroy */
};
@@ -263,6 +266,7 @@ static const struct object_ops named_pipe_device_ops =
@@ -262,7 +265,8 @@ static const struct object_ops named_pipe_device_ops =
directory_link_name, /* link_name */
default_unlink_name, /* unlink_name */
named_pipe_device_open_file, /* open_file */
no_close_handle, /* close_handle */
- no_close_handle, /* close_handle */
+ no_alloc_handle, /* alloc_handle */
+ fd_close_handle, /* close_handle */
named_pipe_device_destroy /* destroy */
};
@@ -290,6 +294,7 @@ static const struct object_ops named_pipe_device_file_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
+ no_alloc_handle, /* alloc_handle */
fd_close_handle, /* close_handle */
named_pipe_device_file_destroy /* destroy */
};
diff --git a/server/object.c b/server/object.c
index 4455718..14cd38e 100644
--- a/server/object.c
@ -482,10 +492,10 @@ index b5c50e1..72ad852 100644
extern void no_destroy( struct object *obj );
#ifdef DEBUG_OBJECTS
diff --git a/server/process.c b/server/process.c
index 5938fb4..c0a0113 100644
index 3bd545a..5274dc3 100644
--- a/server/process.c
+++ b/server/process.c
@@ -85,6 +85,7 @@ static const struct object_ops process_ops =
@@ -84,6 +84,7 @@ static const struct object_ops process_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@ -493,7 +503,7 @@ index 5938fb4..c0a0113 100644
no_close_handle, /* close_handle */
process_destroy /* destroy */
};
@@ -134,6 +135,7 @@ static const struct object_ops startup_info_ops =
@@ -133,6 +134,7 @@ static const struct object_ops startup_info_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
@ -501,7 +511,7 @@ index 5938fb4..c0a0113 100644
no_close_handle, /* close_handle */
startup_info_destroy /* destroy */
};
@@ -177,6 +179,7 @@ static const struct object_ops job_ops =
@@ -176,6 +178,7 @@ static const struct object_ops job_ops =
directory_link_name, /* link_name */
default_unlink_name, /* unlink_name */
no_open_file, /* open_file */
@ -510,7 +520,7 @@ index 5938fb4..c0a0113 100644
job_destroy /* destroy */
};
diff --git a/server/queue.c b/server/queue.c
index f5d3b19..f51a8f0 100644
index f274dfb..ca9d677 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -181,6 +181,7 @@ static const struct object_ops msg_queue_ops =
@ -542,7 +552,7 @@ index 9e6815d..21a6be5 100644
key_destroy /* destroy */
};
diff --git a/server/request.c b/server/request.c
index 86f293f..f75f21e 100644
index c10c4e6..4d0e673 100644
--- a/server/request.c
+++ b/server/request.c
@@ -107,6 +107,7 @@ static const struct object_ops master_socket_ops =
@ -590,7 +600,7 @@ index 74416fa..4b2b8c4 100644
handler_destroy /* destroy */
};
diff --git a/server/snapshot.c b/server/snapshot.c
index a32207c..47316d0 100644
index e35588a..6e788ab 100644
--- a/server/snapshot.c
+++ b/server/snapshot.c
@@ -71,6 +71,7 @@ static const struct object_ops snapshot_ops =
@ -634,7 +644,7 @@ index 9199bc5..ecc0e43 100644
symlink_destroy /* destroy */
};
diff --git a/server/thread.c b/server/thread.c
index 79e7e1a..b52649e 100644
index 7162fc3..7e9419b 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -120,6 +120,7 @@ static const struct object_ops thread_apc_ops =
@ -666,10 +676,10 @@ index 3a786fb..95df28f 100644
timer_destroy /* destroy */
};
diff --git a/server/token.c b/server/token.c
index e7b64b2..5df4e35 100644
index d88f16c..57c2267 100644
--- a/server/token.c
+++ b/server/token.c
@@ -161,6 +161,7 @@ static const struct object_ops token_ops =
@@ -155,6 +155,7 @@ static const struct object_ops token_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */