Rebase against b618a6c6a73deb78fa4d823b805fe03b99621cfd

This also disables a single patch which is causing an assert in
user32: struct user_thread_info

xxx9-user32-Cache-the-result-of-GetForegroundWindow.patch
This commit is contained in:
Alistair Leslie-Hughes 2018-11-06 08:14:26 +11:00
parent ec85f08e87
commit e4a3b5fc9d
12 changed files with 85 additions and 288 deletions

View File

@ -1 +1,2 @@
Fixes: [34906] Use video memory for rendering targets if possible
Disabled: True

View File

@ -1,42 +0,0 @@
From ffc4081c4705362d89632dc82ed251c440e1c00f Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucianposton@pm.me>
Date: Mon, 21 May 2018 19:40:03 -0700
Subject: [PATCH 3/6] dwrite: Skip failing font metrics test for Goha
Signed-off-by: Lucian Poston <lucianposton@pm.me>
---
dlls/dwrite/tests/layout.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 7542cad8d7..c8f3f5a00f 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -620,6 +620,7 @@ static HRESULT WINAPI testrenderer_DrawUnderline(IDWriteTextRenderer *iface,
{
struct renderer_context *ctxt = (struct renderer_context*)context;
struct drawcall_entry entry = { 0 };
+ static const WCHAR gohaW[] = {'G','o','h','a','-','T','i','b','e','b',' ','Z','e','m','e','n',0};
if (ctxt)
TEST_MEASURING_MODE(ctxt, underline->measuringMode);
@@ -635,9 +636,13 @@ static HRESULT WINAPI testrenderer_DrawUnderline(IDWriteTextRenderer *iface,
IDWriteFontFace_GetMetrics(fontface, &metrics);
ok(emsize == metrics.designUnitsPerEm, "Unexpected font size %f\n", emsize);
- /* Expected height is in design units, allow some absolute difference from it. Seems to only happen on Vista */
- ok(fabs(metrics.capHeight - underline->runHeight) < 2.0f, "Expected runHeight %u, got %f, family %s\n",
- metrics.capHeight, underline->runHeight, wine_dbgstr_w(ctxt->familyW));
+ if (lstrcmpW(gohaW, ctxt->familyW)) {
+ /* Expected height is in design units, allow some absolute difference from it. Seems to only happen on Vista */
+ ok(fabs(metrics.capHeight - underline->runHeight) < 2.0f, "Expected runHeight %u, got %f, family %s\n",
+ metrics.capHeight, underline->runHeight, wine_dbgstr_w(ctxt->familyW));
+ } else {
+ skip("%s is an invalid font, rejected by windows.\n", wine_dbgstr_w(gohaW));
+ }
IDWriteFontFace_Release(fontface);
}
--
2.18.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "09a81b30f8ca458db22d73c33545f02fd510702a"
echo "b618a6c6a73deb78fa4d823b805fe03b99621cfd"
}
# Show version information
@ -127,7 +127,6 @@ patch_enable_all ()
enable_ddraw_FlipToGDISurface="$1"
enable_ddraw_IDirect3DTexture2_Load="$1"
enable_ddraw_Prevent_viewport_crash="$1"
enable_ddraw_Rendering_Targets="$1"
enable_ddraw_Silence_FIXMEs="$1"
enable_ddraw_Write_Vtable="$1"
enable_dinput_Deadlock="$1"
@ -280,7 +279,6 @@ patch_enable_all ()
enable_server_Stored_ACLs="$1"
enable_server_Timestamp_Compat="$1"
enable_server_device_manager_destroy="$1"
enable_server_send_hardware_message="$1"
enable_setupapi_CM_Request_Device_Eject="$1"
enable_setupapi_DiskSpaceList="$1"
enable_setupapi_Display_Device="$1"
@ -546,9 +544,6 @@ patch_enable ()
ddraw-Prevent_viewport_crash)
enable_ddraw_Prevent_viewport_crash="$2"
;;
ddraw-Rendering_Targets)
enable_ddraw_Rendering_Targets="$2"
;;
ddraw-Silence_FIXMEs)
enable_ddraw_Silence_FIXMEs="$2"
;;
@ -1005,9 +1000,6 @@ patch_enable ()
server-device_manager_destroy)
enable_server_device_manager_destroy="$2"
;;
server-send_hardware_message)
enable_server_send_hardware_message="$2"
;;
setupapi-CM_Request_Device_Eject)
enable_setupapi_CM_Request_Device_Eject="$2"
;;
@ -3264,21 +3256,6 @@ if test "$enable_ddraw_Prevent_viewport_crash" -eq 1; then
) >> "$patchlist"
fi
# Patchset ddraw-Rendering_Targets
# |
# | This patchset fixes the following Wine bugs:
# | * [#34906] Use video memory for rendering targets if possible
# |
# | Modified files:
# | * dlls/ddraw/ddraw.c, dlls/ddraw/ddraw_private.h, dlls/ddraw/device.c, dlls/ddraw/surface.c
# |
if test "$enable_ddraw_Rendering_Targets" -eq 1; then
patch_apply ddraw-Rendering_Targets/0001-ddraw-Create-rendering-targets-in-video-memory-if-po.patch
(
printf '%s\n' '+ { "Michael Müller", "ddraw: Create rendering targets in video memory if possible.", 1 },';
) >> "$patchlist"
fi
# Patchset ddraw-Silence_FIXMEs
# |
# | Modified files:
@ -3418,14 +3395,12 @@ fi
if test "$enable_dwrite_FontFallback" -eq 1; then
patch_apply dwrite-FontFallback/0001-dwrite-Test-IDWriteTextFormat-with-nonexistent-font.patch
patch_apply dwrite-FontFallback/0002-dwrite-Test-GetMetrics-with-custom-fontcollection.patch
patch_apply dwrite-FontFallback/0003-dwrite-Skip-failing-font-metrics-test-for-Goha.patch
patch_apply dwrite-FontFallback/0004-dwrite-Use-font-fallback-when-mapping-characters.patch
patch_apply dwrite-FontFallback/0005-dwrite-Use-MapCharacters-for-non-visual-characters.patch
patch_apply dwrite-FontFallback/0006-dwrite-Use-MapCharacters-for-dummy-line-metrics.patch
(
printf '%s\n' '+ { "Lucian Poston", "dwrite: Test IDWriteTextFormat with nonexistent font.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "dwrite: Test GetMetrics with custom fontcollection.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "dwrite: Skip failing font metrics test for Goha.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "dwrite: Use font fallback when mapping characters.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "dwrite: Use MapCharacters for non-visual characters.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "dwrite: Use MapCharacters for dummy line metrics.", 1 },';
@ -5819,7 +5794,6 @@ if test "$enable_server_Shared_Memory" -eq 1; then
patch_apply server-Shared_Memory/0006-ntdll-Only-enable-wineserver-shared-memory-communica.patch
patch_apply server-Shared_Memory/0007-server-Store-a-list-of-associated-queues-for-each-th.patch
patch_apply server-Shared_Memory/0008-user32-Get-rid-of-wineserver-call-for-GetActiveWindo.patch
patch_apply server-Shared_Memory/0009-user32-Cache-the-result-of-GetForegroundWindow.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Implement virtual_map_shared_memory.", 1 },';
printf '%s\n' '+ { "Michael Müller", "server: Implement support for global and local shared memory blocks based on memfd.", 1 },';
@ -5829,7 +5803,6 @@ if test "$enable_server_Shared_Memory" -eq 1; then
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Only enable wineserver shared memory communication when a special environment variable is set.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "server: Store a list of associated queues for each thread input.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "user32: Get rid of wineserver call for GetActiveWindow, GetFocus, GetCapture.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "user32: Cache the result of GetForegroundWindow.", 1 },';
) >> "$patchlist"
fi
@ -5928,21 +5901,6 @@ if test "$enable_server_device_manager_destroy" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-send_hardware_message
# |
# | This patchset fixes the following Wine bugs:
# | * [#43102] Improve handling of hooks for normal (non-injected) hardware messages
# |
# | Modified files:
# | * server/queue.c
# |
if test "$enable_server_send_hardware_message" -eq 1; then
patch_apply server-send_hardware_message/0001-server-Improve-handling-of-hooks-for-normal-non-inje.patch
(
printf '%s\n' '+ { "Michael Müller", "server: Improve handling of hooks for normal (non-injected) hardware messages.", 1 },';
) >> "$patchlist"
fi
# Patchset setupapi-CM_Request_Device_Eject
# |
# | This patchset fixes the following Wine bugs:
@ -7317,14 +7275,12 @@ fi
# Patchset wined3d-Silence_FIXMEs
# |
# | Modified files:
# | * dlls/wined3d/resource.c, dlls/wined3d/surface.c, dlls/wined3d/texture.c
# | * dlls/wined3d/surface.c, dlls/wined3d/texture.c
# |
if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then
patch_apply wined3d-Silence_FIXMEs/0003-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
patch_apply wined3d-Silence_FIXMEs/0004-wined3d-Print-FIXME-only-once-in-surface_cpu_blt.patch
patch_apply wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch
(
printf '%s\n' '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
printf '%s\n' '+ { "Christian Costa", "wined3d: Print FIXME only once in surface_cpu_blt.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence extremely noisy FIXME in wined3d_texture_add_dirty_region.", 1 },';
) >> "$patchlist"

View File

@ -1,18 +1,19 @@
From 7b3dee95d9c9cd181dd17ea5c34f5b7746885763 Mon Sep 17 00:00:00 2001
From e346f494c426a300082db6dd8f7ec42cb892e241 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 19 Mar 2015 02:07:24 +0100
Subject: user32: Avoid unnecessary wineserver calls in PeekMessage/GetMessage.
Subject: [PATCH] user32: Avoid unnecessary wineserver calls in
PeekMessage/GetMessage.
---
dlls/user32/message.c | 13 +++++++++++++
dlls/user32/user_private.h | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
dlls/user32/message.c | 14 ++++++++++++++
dlls/user32/user_private.h | 5 +++++
2 files changed, 19 insertions(+)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index d2e6a75..7c6d04b 100644
index dcfb251..92cfd25 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2739,6 +2739,18 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
@@ -2755,6 +2755,18 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
unsigned int hw_id = 0; /* id of previous hardware message */
void *buffer;
size_t buffer_size = 256;
@ -31,16 +32,17 @@ index d2e6a75..7c6d04b 100644
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, buffer_size ))) return FALSE;
@@ -2751,6 +2763,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
size_t size = 0;
const message_data_t *msg_data = buffer;
@@ -2769,6 +2781,8 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
thread_info->msg_source = prev_source;
+ if (shm) thread_info->last_get_msg = GetTickCount();
+
SERVER_START_REQ( get_message )
{
req->flags = flags;
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 7d33d9d..3690a88 100644
index bf02ee5..fdbd77b 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -165,6 +165,8 @@ struct wm_char_mapping_data
@ -52,24 +54,15 @@ index 7d33d9d..3690a88 100644
/* this is the structure stored in TEB->Win32ClientInfo */
/* no attempt is made to keep the layout compatible with the Windows one */
struct user_thread_info
@@ -176,7 +178,7 @@ struct user_thread_info
WORD recursion_count; /* SendMessage recursion counter */
WORD message_count; /* Get/PeekMessage loop counter */
WORD hook_call_depth; /* Number of recursively called hook procs */
- BOOL hook_unicode; /* Is current hook unicode? */
+ WORD hook_unicode; /* Is current hook unicode? */
HHOOK hook; /* Current hook */
struct received_message_info *receive_info; /* Message being currently received */
struct wm_char_mapping_data *wmchar_data; /* Data for WM_CHAR mappings */
@@ -184,6 +186,7 @@ struct user_thread_info
@@ -185,6 +187,7 @@ struct user_thread_info
DWORD GetMessageTimeVal; /* Value for GetMessageTime */
DWORD GetMessagePosVal; /* Value for GetMessagePos */
ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
UINT active_hooks; /* Bitmap of active hooks */
+ DWORD last_get_msg; /* Last time of Get/PeekMessage call */
struct user_key_state_info *key_state; /* Cache of global key state */
HWND top_window; /* Desktop window */
HWND msg_window; /* HWND_MESSAGE parent window */
@@ -192,6 +195,8 @@ struct user_thread_info
@@ -193,6 +196,8 @@ struct user_thread_info
C_ASSERT( sizeof(struct user_thread_info) <= sizeof(((TEB *)0)->Win32ClientInfo) );
@ -79,5 +72,5 @@ index 7d33d9d..3690a88 100644
extern BOOL (WINAPI *imm_register_window)(HWND) DECLSPEC_HIDDEN;
extern void (WINAPI *imm_unregister_window)(HWND) DECLSPEC_HIDDEN;
--
2.7.4
1.9.1

View File

@ -1,73 +0,0 @@
From 2818967ffcc15779d8e0398eaf2f834f05fa21bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 27 Jun 2017 02:08:50 +0200
Subject: [PATCH] server: Improve handling of hooks for normal (non-injected)
hardware messages.
---
server/queue.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index 919e0cc350..16832c7aa4 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1716,7 +1716,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
struct hardware_msg_data *msg_data;
struct message *msg;
unsigned int i, time, flags;
- int wait = 0, x, y;
+ int hooked = 0, x, y;
static const unsigned int messages[] =
{
@@ -1822,13 +1822,13 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
/* specify a sender only when sending the last message */
if (!(flags & ((1 << ARRAY_SIZE( messages )) - 1)))
{
- if (!(wait = send_hook_ll_message( desktop, msg, input, sender )))
+ if (!(hooked = send_hook_ll_message( desktop, msg, input, sender )))
queue_hardware_message( desktop, msg, 0 );
}
else if (!send_hook_ll_message( desktop, msg, input, NULL ))
queue_hardware_message( desktop, msg, 0 );
}
- return wait;
+ return hooked && sender;
}
/* queue a hardware message for a keyboard event */
@@ -1840,7 +1840,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
struct message *msg;
unsigned char vkey = input->kbd.vkey;
unsigned int message_code, time;
- int wait;
+ int hooked;
if (!(time = input->kbd.time)) time = get_tick_count();
@@ -1973,10 +1973,10 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
msg_data->flags |= (flags & (KF_EXTENDED | KF_ALTDOWN | KF_UP)) >> 8;
}
- if (!(wait = send_hook_ll_message( desktop, msg, input, sender )))
+ if (!(hooked = send_hook_ll_message( desktop, msg, input, sender )))
queue_hardware_message( desktop, msg, 1 );
- return wait;
+ return hooked && sender;
}
/* queue a hardware message for a custom type of event */
@@ -2494,7 +2494,7 @@ DECL_HANDLER(send_hardware_message)
{
struct thread *thread = NULL;
struct desktop *desktop;
- struct msg_queue *sender = get_current_queue();
+ struct msg_queue *sender = (req->flags & SEND_HWMSG_INJECTED) ? get_current_queue() : NULL;
data_size_t size = min( 256, get_reply_max_size() );
if (!(desktop = get_thread_desktop( current, 0 ))) return;
--
2.19.1

View File

@ -1 +0,0 @@
Fixes: [43102] Improve handling of hooks for normal (non-injected) hardware messages

View File

@ -1,4 +1,4 @@
From 23971e63a98708060727389e92a3464425543d7c Mon Sep 17 00:00:00 2001
From 17b88e4a8e7d499d53d7c38a452a024c8f3658d8 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Mon, 17 Sep 2018 17:26:21 +0200
Subject: [PATCH] user32: Added GetPointerType stub
@ -12,10 +12,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45765
4 files changed, 31 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index c1c812d..647258b 100644
index d28cd9f..058f47a 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -741,6 +741,18 @@ BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
@@ -664,6 +664,18 @@ BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
return TRUE;
}
@ -35,27 +35,27 @@ index c1c812d..647258b 100644
static const WCHAR imeW[] = {'I','M','E',0};
const struct builtin_class_descr IME_builtin_class =
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 5fa15af..7338cb3 100644
index b43e076..db27085 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -78,6 +78,7 @@ static struct {
} key_status;
@@ -79,6 +79,7 @@ static struct {
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source );
+static BOOL (WINAPI *pGetPointerType)(UINT32, POINTER_INPUT_TYPE*);
static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD);
static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
static int (WINAPI *pGetWindowRgnBox)(HWND, LPRECT);
@@ -163,6 +164,7 @@ static void init_function_pointers(void)
trace("GetProcAddress(%s) failed\n", #func);
GET_PROC(SendInput)
+ GET_PROC(GetPointerType)
GET_PROC(GetMouseMovePointsEx)
GET_PROC(GetRawInputDeviceList)
GET_PROC(GetWindowRgnBox)
@@ -2874,6 +2876,16 @@ static void test_OemKeyScan(void)
}
@@ -165,6 +166,7 @@ static void init_function_pointers(void)
GET_PROC(SendInput);
GET_PROC(GetCurrentInputMessageSource);
GET_PROC(GetMouseMovePointsEx);
+ GET_PROC(GetPointerType);
GET_PROC(GetRawInputDeviceList);
GET_PROC(GetWindowRgnBox);
#undef GET_PROC
@@ -2935,6 +2937,16 @@ static void test_input_message_source(void)
UnregisterClassA( cls.lpszClassName, GetModuleHandleA(0) );
}
+static void test_GetPointerType(void)
@ -70,11 +70,11 @@ index 5fa15af..7338cb3 100644
+
START_TEST(input)
{
init_function_pointers();
@@ -2908,4 +2920,9 @@ START_TEST(input)
test_GetRawInputDeviceList();
else
win_skip("GetRawInputDeviceList is not available\n");
POINT pos;
@@ -2979,4 +2991,9 @@ START_TEST(input)
win_skip("GetCurrentInputMessageSource is not available\n");
SetCursorPos( pos.x, pos.y );
+
+ if(pGetPointerType)
+ test_GetPointerType();
@ -82,10 +82,10 @@ index 5fa15af..7338cb3 100644
+ win_skip("GetPointerType is not available\n");
}
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 61e0e4e..216a755 100644
index d5b8597..f9a4ae2 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -355,6 +355,7 @@
@@ -356,6 +356,7 @@
@ stdcall GetParent(long)
@ stdcall GetPhysicalCursorPos(ptr)
@ stdcall GetPointerDevices(ptr ptr)
@ -94,10 +94,10 @@ index 61e0e4e..216a755 100644
@ stdcall GetProcessDefaultLayout(ptr)
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
diff --git a/include/winuser.h b/include/winuser.h
index 2c05f26..c5bb679 100644
index 693965a..1b8e01e 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3805,6 +3805,7 @@ WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
@@ -3828,6 +3828,7 @@ WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
WINUSERAPI HWND WINAPI GetOpenClipboardWindow(void);
WINUSERAPI HWND WINAPI GetParent(HWND);
WINUSERAPI BOOL WINAPI GetPhysicalCursorPos(POINT*);

View File

@ -1,34 +1,33 @@
From 3c3d791ef1bd01769fd9b07ccc4df384ee9909aa Mon Sep 17 00:00:00 2001
From 6d305aa851638a81ec74de02d1f1da5d74257d22 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 29 May 2017 06:04:18 +0200
Subject: [PATCH 3/5] user32/tests: Add tests for window region of layered
windows.
Subject: [PATCH] user32/tests: Add tests for window region of layered windows.
---
dlls/user32/tests/input.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 3a3e611..39c4c83 100644
index cdaf321..83daccb 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -80,6 +80,7 @@ static struct {
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
@@ -81,6 +81,7 @@ static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source );
static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD);
static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
+static int (WINAPI *pGetWindowRgnBox)(HWND, LPRECT);
#define MAXKEYEVENTS 12
#define MAXKEYMESSAGES MAXKEYEVENTS /* assuming a key event generates one
@@ -164,6 +165,7 @@ static void init_function_pointers(void)
GET_PROC(SendInput)
GET_PROC(GetMouseMovePointsEx)
GET_PROC(GetRawInputDeviceList)
+ GET_PROC(GetWindowRgnBox)
@@ -165,6 +166,7 @@ static void init_function_pointers(void)
GET_PROC(GetCurrentInputMessageSource);
GET_PROC(GetMouseMovePointsEx);
GET_PROC(GetRawInputDeviceList);
+ GET_PROC(GetWindowRgnBox);
#undef GET_PROC
}
@@ -1929,6 +1931,9 @@ static void test_Input_mouse(void)
@@ -1924,6 +1926,9 @@ static void test_Input_mouse(void)
DWORD thread_id;
WNDCLASSA wclass;
POINT pt, pt_org;
@ -38,7 +37,7 @@ index 3a3e611..39c4c83 100644
MSG msg;
BOOL ret;
@@ -2167,6 +2172,12 @@ static void test_Input_mouse(void)
@@ -2162,6 +2167,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -51,7 +50,7 @@ index 3a3e611..39c4c83 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -2193,6 +2204,12 @@ static void test_Input_mouse(void)
@@ -2188,6 +2199,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -64,7 +63,7 @@ index 3a3e611..39c4c83 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -2221,6 +2238,12 @@ static void test_Input_mouse(void)
@@ -2216,6 +2233,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -77,7 +76,7 @@ index 3a3e611..39c4c83 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -2247,6 +2270,12 @@ static void test_Input_mouse(void)
@@ -2242,6 +2265,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -90,7 +89,7 @@ index 3a3e611..39c4c83 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -2274,6 +2303,12 @@ static void test_Input_mouse(void)
@@ -2269,6 +2298,12 @@ static void test_Input_mouse(void)
while (wait_for_message(&msg)) DispatchMessageA(&msg);
Sleep(100);
@ -103,7 +102,7 @@ index 3a3e611..39c4c83 100644
got_button_down = got_button_up = FALSE;
simulate_click(TRUE, 150, 150);
while (wait_for_message(&msg))
@@ -2295,6 +2330,41 @@ static void test_Input_mouse(void)
@@ -2290,6 +2325,41 @@ static void test_Input_mouse(void)
ok(got_button_down, "expected WM_LBUTTONDOWN message\n");
ok(got_button_up, "expected WM_LBUTTONUP message\n");
@ -146,5 +145,5 @@ index 3a3e611..39c4c83 100644
SetCursorPos(pt_org.x, pt_org.y);
--
2.7.4
1.9.1

View File

@ -1,36 +0,0 @@
From 018b5f5d6211aa706e5aef762acb98d39240d9f1 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sun, 20 Jul 2014 22:29:02 +0200
Subject: wined3d: Silence repeated resource_check_usage FIXME. (try 2)
---
dlls/wined3d/resource.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 2f44d36..5988c82 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -50,7 +50,7 @@ static DWORD resource_access_from_pool(enum wined3d_pool pool)
static void resource_check_usage(DWORD usage)
{
- static const DWORD handled = WINED3DUSAGE_RENDERTARGET
+ static DWORD handled = WINED3DUSAGE_RENDERTARGET
| WINED3DUSAGE_DEPTHSTENCIL
| WINED3DUSAGE_WRITEONLY
| WINED3DUSAGE_DYNAMIC
@@ -66,7 +66,10 @@ static void resource_check_usage(DWORD usage)
* driver. */
if (usage & ~handled)
+ {
FIXME("Unhandled usage flags %#x.\n", usage & ~handled);
+ handled |= usage;
+ }
if ((usage & (WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY)) == WINED3DUSAGE_DYNAMIC)
WARN_(d3d_perf)("WINED3DUSAGE_DYNAMIC used without WINED3DUSAGE_WRITEONLY.\n");
}
--
1.8.3.2

View File

@ -1,4 +1,4 @@
From 4044faddca34f8d7a8813e8ae35f7481de637c84 Mon Sep 17 00:00:00 2001
From 0a01c848f9f56a720d815fdd01a36b0f89672756 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,7 +17,7 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
10 files changed, 73 insertions(+), 71 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index e4c2c80..176df88 100644
index df754de..43cda2e 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -702,6 +702,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@ -86,10 +86,10 @@ index 6de3502..2051749 100644
/* glEnableIndexedEXT(GL_BLEND, ...) */
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 8199afa..ec8adbf 100644
index 9784f38..0a99231 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2768,7 +2768,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
@@ -2769,7 +2769,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_texture *rt = context->current_rt.texture;
DWORD rt_mask, *cur_mask;
@ -98,7 +98,7 @@ index 8199afa..ec8adbf 100644
SIZE rt_size;
TRACE("Setting up context %p for blitting.\n", context);
@@ -2873,10 +2873,8 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
@@ -2876,10 +2876,8 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE));
}
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@ -111,7 +111,7 @@ index 8199afa..ec8adbf 100644
context->last_was_rhw = TRUE;
context_invalidate_state(context, STATE_VDECL); /* because of last_was_rhw = TRUE */
@@ -4851,7 +4849,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@@ -4854,7 +4852,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;
@ -121,7 +121,7 @@ index 8199afa..ec8adbf 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 b50d667..7d9e40c 100644
index 5515b27..8ab43c6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -392,10 +392,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -138,7 +138,7 @@ index b50d667..7d9e40c 100644
checkGLcall("glClearColor");
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index fc076bb..65c1993 100644
index 42c109d..1941a6a 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1554,9 +1554,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
@ -201,7 +201,7 @@ index fc076bb..65c1993 100644
}
static void state_localviewer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
@@ -4678,18 +4665,26 @@ const struct StateEntryTemplate misc_state_template[] =
@@ -4681,18 +4668,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 },
@ -278,7 +278,7 @@ index 0b2ce50..7634ccc 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 71693ad..c54e4d5 100644
index 5f5c53a..3bb891e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -160,6 +160,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
@ -303,10 +303,10 @@ index 71693ad..c54e4d5 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 9ddfd5c..eb1e81a 100644
index 73e8cf2..2cbc990 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4739,7 +4739,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4751,7 +4751,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);
@ -314,7 +314,7 @@ index 9ddfd5c..eb1e81a 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4759,9 +4758,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4771,9 +4770,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);
@ -330,10 +330,10 @@ index 9ddfd5c..eb1e81a 100644
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
D3DSTATE_TO_STR(WINED3D_RS_WRAP8);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d5bf612..9f9b966 100644
index 5b7ddfc..608cc7c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -266,6 +266,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@@ -272,6 +272,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
#define MAX_UNORDERED_ACCESS_VIEWS 8
#define MAX_TGSM_REGISTERS 8192
#define MAX_VERTEX_BLENDS 4
@ -342,17 +342,17 @@ index d5bf612..9f9b966 100644
struct min_lookup
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 95549e9..a3dd0e7 100644
index 3575f7e..9b4bcd9 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -402,8 +402,20 @@ enum wined3d_render_state
WINED3D_RS_SRCBLENDALPHA = 207,
WINED3D_RS_DESTBLENDALPHA = 208,
WINED3D_RS_BLENDOPALPHA = 209,
+ WINED3D_RS_COLORWRITEENABLE4 = 211,
+ WINED3D_RS_COLORWRITEENABLE5 = 212,
+ WINED3D_RS_COLORWRITEENABLE6 = 213,
+ WINED3D_RS_COLORWRITEENABLE7 = 214,
+ WINED3D_RS_COLORWRITEENABLE4 = 210,
+ WINED3D_RS_COLORWRITEENABLE5 = 211,
+ WINED3D_RS_COLORWRITEENABLE6 = 212,
+ WINED3D_RS_COLORWRITEENABLE7 = 213,
};
-#define WINEHIGHEST_RENDER_STATE WINED3D_RS_BLENDOPALPHA
+#define WINEHIGHEST_RENDER_STATE WINED3D_RS_COLORWRITEENABLE7

View File

@ -30,7 +30,7 @@ index 87998d55..f4ff0027 100644
GL_EXTCALL(glGetCompressedTexImage(target, level, data->addr));
checkGLcall("glGetCompressedTexImage");
}
+ else if (data->buffer_object && texture->resource.usage & WINED3DUSAGE_RENDERTARGET)
+ else if (data->buffer_object && texture->resource.bind_flags & WINED3D_BIND_RENDER_TARGET)
+ {
+ /* PBO texture download is not accelerated on Mesa. Use glReadPixels if possible. */
+ TRACE("Downloading (glReadPixels) texture %p, %u, level %u, format %#x, type %#x, data %p.\n",