Rebase against 661791cb7ea3757655aeff4fb061ada27a88cecc

This commit is contained in:
Alistair Leslie-Hughes 2018-03-09 08:57:29 +11:00
parent 04283ef5c5
commit 2ee460d68d
5 changed files with 29 additions and 122 deletions

View File

@ -1,73 +0,0 @@
From 45e90a8373a297509f21789aaf817f455e749975 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Sat, 12 Nov 2016 08:37:23 -0600
Subject: ntdll: Implement NtCreateThreadEx.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/thread.c | 17 +++++++++++++++++
include/winternl.h | 7 +++++++
3 files changed, 25 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 3c50e20a8b3..b6987830688 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -151,6 +151,7 @@
@ stdcall NtCreateSemaphore(ptr long ptr long long)
@ stdcall NtCreateSymbolicLinkObject(ptr long ptr ptr)
@ stub NtCreateThread
+@ stdcall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr)
@ stdcall NtCreateTimer(ptr long ptr long)
@ stub NtCreateToken
# @ stub NtCreateWaitablePort
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 5d45ebe0fd0..8da0779f4b2 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -599,6 +599,23 @@ static void start_thread( struct startup_info *info )
/***********************************************************************
+ * NtCreateThreadEx (NTDLL.@)
+ */
+NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
+ HANDLE process, LPTHREAD_START_ROUTINE start, void *param,
+ ULONG flags, ULONG zero_bits, ULONG stack_commit,
+ ULONG stack_reserve, void *attribute_list )
+{
+ FIXME( "%p, %x, %p, %p, %p, %p, %x, %x, %x, %x, %p semi-stub!\n", handle_ptr, access, attr,
+ process, start, param, flags, zero_bits, stack_commit, stack_reserve, attribute_list );
+
+ return RtlCreateUserThread( process, NULL, flags & THREAD_CREATE_FLAGS_CREATE_SUSPENDED,
+ NULL, stack_reserve, stack_commit, (PRTL_THREAD_START_ROUTINE)start,
+ param, handle_ptr, NULL );
+}
+
+
+/***********************************************************************
* RtlCreateUserThread (NTDLL.@)
*/
NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *descr,
diff --git a/include/winternl.h b/include/winternl.h
index d6f47ad3ba4..2878487c4bc 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2224,6 +2224,13 @@ typedef struct _SYSTEM_MODULE_INFORMATION
SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
+#define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
+#define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
+#define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
+#define THREAD_CREATE_FLAGS_HAS_SECURITY_DESCRIPTOR 0x00000010
+#define THREAD_CREATE_FLAGS_ACCESS_CHECK_IN_TARGET 0x00000020
+#define THREAD_CREATE_FLAGS_INITIAL_THREAD 0x00000080
+
/***********************************************************************
* Function declarations
*/
--
2.12.2

View File

@ -1 +0,0 @@
Fixes: [44616] Implement semi-stub for ntdll.NtCreateThreadEx

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "813ab925abd45d48c811898028fddc1047b0c250"
echo "661791cb7ea3757655aeff4fb061ada27a88cecc"
}
# Show version information
@ -240,7 +240,6 @@ patch_enable_all ()
enable_ntdll_NtAccessCheck="$1"
enable_ntdll_NtAllocateUuids="$1"
enable_ntdll_NtContinue="$1"
enable_ntdll_NtCreateThreadEx="$1"
enable_ntdll_NtDevicePath="$1"
enable_ntdll_NtQueryEaFile="$1"
enable_ntdll_NtQuerySection="$1"
@ -942,9 +941,6 @@ patch_enable ()
ntdll-NtContinue)
enable_ntdll_NtContinue="$2"
;;
ntdll-NtCreateThreadEx)
enable_ntdll_NtCreateThreadEx="$2"
;;
ntdll-NtDevicePath)
enable_ntdll_NtDevicePath="$2"
;;
@ -5773,21 +5769,6 @@ if test "$enable_ntdll_NtContinue" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-NtCreateThreadEx
# |
# | This patchset fixes the following Wine bugs:
# | * [#44616] Implement semi-stub for ntdll.NtCreateThreadEx
# |
# | Modified files:
# | * dlls/ntdll/ntdll.spec, dlls/ntdll/thread.c, include/winternl.h
# |
if test "$enable_ntdll_NtCreateThreadEx" -eq 1; then
patch_apply ntdll-NtCreateThreadEx/0001-ntdll-Implement-NtCreateThreadEx.patch
(
printf '%s\n' '+ { "Andrew Wesie", "ntdll: Implement NtCreateThreadEx.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Pipe_SpecialCharacters
# |
# | This patchset fixes the following Wine bugs:

View File

@ -271,7 +271,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2407,7 +2407,11 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
@@ -2418,7 +2418,11 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */

View File

@ -1,4 +1,4 @@
From 01399c30cb51b3790c8864d2ebd3f03950345ff1 Mon Sep 17 00:00:00 2001
From 5ecc03f8c488e0b700c8413ec81cbd60ce83bed8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 20 Jul 2017 13:50:07 +0200
Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
@ -17,10 +17,10 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
10 files changed, 72 insertions(+), 70 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 835ea8b..2ef9b46 100644
index 9c9b730..bfcd139 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -688,6 +688,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -2067,6 +2067,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
struct d3d_blend_state *blend_state_impl;
const D3D11_BLEND_DESC *desc;
@ -28,7 +28,7 @@ index 835ea8b..2ef9b46 100644
TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
iface, blend_state, debug_float4(blend_factor), sample_mask);
@@ -702,14 +703,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -2081,14 +2082,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
{
wined3d_device_set_blend_state(device->wined3d_device, NULL);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ALPHABLENDENABLE, FALSE);
@ -48,7 +48,7 @@ index 835ea8b..2ef9b46 100644
wined3d_mutex_unlock();
return;
}
@@ -737,14 +735,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -2116,14 +2114,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|| d->DestBlendAlpha == D3D11_BLEND_BLEND_FACTOR || d->DestBlendAlpha == D3D11_BLEND_INV_BLEND_FACTOR))
FIXME("Ignoring blend factor %s.\n", debug_float4(blend_factor));
}
@ -86,10 +86,10 @@ index a14c9d3..2bec92e 100644
/* glEnableIndexedEXT(GL_BLEND, ...) */
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 04853c9..140fc83 100644
index db710be..786a7d8 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2603,10 +2603,8 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
@@ -2597,10 +2597,8 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
}
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
checkGLcall("glColorMask");
@ -102,7 +102,7 @@ index 04853c9..140fc83 100644
if (gl_info->supported[EXT_SECONDARY_COLOR])
{
gl_info->gl_ops.gl.p_glDisable(GL_COLOR_SUM_EXT);
@@ -4823,7 +4821,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@@ -4856,7 +4854,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if (!(rtv = fb->render_targets[i]) || rtv->format->id == WINED3DFMT_NULL)
continue;
@ -112,7 +112,7 @@ index 04853c9..140fc83 100644
wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5ec0705..4269b20 100644
index d3f0aea..62c737d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -383,10 +383,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -129,10 +129,10 @@ index 5ec0705..4269b20 100644
checkGLcall("glClearColor");
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 3460d69..26c5815 100644
index 4ecd336..2f506c3 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1556,9 +1556,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
@@ -1566,9 +1566,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
static void state_colorwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
DWORD mask0 = state->render_states[WINED3D_RS_COLORWRITEENABLE];
@ -142,7 +142,7 @@ index 3460d69..26c5815 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
TRACE("Color mask: r(%d) g(%d) b(%d) a(%d)\n",
@@ -1572,13 +1569,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
@@ -1582,13 +1579,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
mask0 & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
checkGLcall("glColorMask(...)");
@ -157,7 +157,7 @@ index 3460d69..26c5815 100644
}
static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DWORD mask)
@@ -1591,24 +1582,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
@@ -1601,24 +1592,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
checkGLcall("glColorMaski");
}
@ -192,7 +192,7 @@ index 3460d69..26c5815 100644
}
static void state_localviewer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
@@ -5281,18 +5268,26 @@ const struct StateEntryTemplate misc_state_template[] =
@@ -5278,18 +5265,26 @@ const struct StateEntryTemplate misc_state_template[] =
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), { STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), state_multisampmask }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), { STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), state_debug_monitor }, WINED3D_GL_EXT_NONE },
@ -269,18 +269,18 @@ index b9efcec..c9b3527 100644
/* Texture Stage States - Put directly into state block, we will call function below */
for (i = 0; i < MAX_TEXTURES; ++i)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9ef917f..ff7646f 100644
index 6ef167f..0072479 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -383,6 +383,7 @@ static void surface_blt_fbo(const struct wined3d_device *device,
@@ -378,6 +378,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
RECT src_rect, dst_rect;
GLenum gl_filter;
GLenum buffer;
+ int i;
TRACE("device %p, filter %s,\n", device, debug_d3dtexturefiltertype(filter));
TRACE("src_surface %p, src_location %s, src_rect %s,\n",
@@ -480,10 +481,8 @@ static void surface_blt_fbo(const struct wined3d_device *device,
TRACE("device %p, context %p, filter %s, src_texture %p, src_sub_resource_idx %u, src_location %s, "
"src_rect %s, dst_texture %p, dst_sub_resource_idx %u, dst_location %s, dst_rect %s.\n",
@@ -489,10 +490,8 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
context_invalidate_state(context, STATE_FRAMEBUFFER);
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@ -294,10 +294,10 @@ index 9ef917f..ff7646f 100644
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 0171897..8c40fc8 100644
index 17abf76..4a21c12 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4442,7 +4442,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4443,7 +4443,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
@ -305,7 +305,7 @@ index 0171897..8c40fc8 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4462,9 +4461,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4463,9 +4462,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
@ -321,10 +321,10 @@ index 0171897..8c40fc8 100644
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7813df5..8a17aea 100644
index 3137e7a..aeeb912 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -276,6 +276,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@@ -277,6 +277,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
#define MAX_TGSM_REGISTERS 8192
#define MAX_VERTEX_BLENDS 4
#define MAX_MULTISAMPLE_TYPES 8
@ -333,10 +333,10 @@ index 7813df5..8a17aea 100644
struct min_lookup
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 8864965..58da08c 100644
index a51ca53..b68e921 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -388,8 +388,20 @@ enum wined3d_render_state
@@ -390,8 +390,20 @@ enum wined3d_render_state
WINED3D_RS_BLENDOPALPHA = 209,
WINED3D_RS_DEPTHCLIP = 210,
WINED3D_RS_DEPTHBIASCLAMP = 211,
@ -359,5 +359,5 @@ index 8864965..58da08c 100644
enum wined3d_blend
{
--
2.7.4
1.9.1