Rebase against e2aa30f21def839866b09e74b5ddd843f7e70c87.

This commit is contained in:
Alistair Leslie-Hughes 2021-05-06 08:14:30 +10:00
parent 1ebf4bd23f
commit 046b1ab22c
7 changed files with 104 additions and 46 deletions

View File

@ -0,0 +1,58 @@
From e18fe7fddfdde4a97f9a5e76203ab34f62a1cc4d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 6 May 2021 08:36:06 +1000
Subject: [PATCH] Revert "wined3d: No longer export
wined3d_device_set_render_state()."
This reverts commit 2b924c7f4168345cef498e0c36c471d3c9c088e9.
---
dlls/wined3d/device.c | 4 +++-
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b317206518b..aa998642e2e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1686,9 +1686,11 @@ struct wined3d_rasterizer_state * CDECL wined3d_device_context_get_rasterizer_st
return context->state->rasterizer_state;
}
-static void wined3d_device_set_render_state(struct wined3d_device *device,
+void CDECL wined3d_device_set_render_state(struct wined3d_device *device,
enum wined3d_render_state state, DWORD value)
{
+ TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value);
+
if (state > WINEHIGHEST_RENDER_STATE)
{
WARN("Unhandled render state %#x.\n", state);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index b7382e9a2a0..fe035ea37bf 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -126,6 +126,7 @@
@ cdecl wined3d_device_set_ps_resource_view(ptr long ptr)
@ cdecl wined3d_device_set_ps_sampler(ptr long ptr)
@ cdecl wined3d_device_set_rasterizer_state(ptr ptr)
+@ cdecl wined3d_device_set_render_state(ptr long long)
@ cdecl wined3d_device_set_rendertarget_view(ptr long ptr long)
@ cdecl wined3d_device_set_scissor_rects(ptr long ptr)
@ cdecl wined3d_device_set_software_vertex_processing(ptr long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index c6cf17ad732..abede0accb3 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2495,6 +2495,8 @@ void __cdecl wined3d_device_set_ps_resource_view(struct wined3d_device *device,
void __cdecl wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler);
void __cdecl wined3d_device_set_rasterizer_state(struct wined3d_device *device,
struct wined3d_rasterizer_state *rasterizer_state);
+void __cdecl wined3d_device_set_render_state(struct wined3d_device *device,
+ enum wined3d_render_state state, DWORD value);
HRESULT __cdecl wined3d_device_set_rendertarget_view(struct wined3d_device *device,
unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport);
void __cdecl wined3d_device_set_scissor_rects(struct wined3d_device *device,
--
2.30.2

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "cda4abac9859ed42c29e8cb2746201a578431a5e"
echo "e2aa30f21def839866b09e74b5ddd843f7e70c87"
}
# Show version information
@ -1670,7 +1670,7 @@ fi
# | Modified files:
# | * configure.ac, dlls/d3d11/device.c, dlls/nvapi/Makefile.in, dlls/nvapi/nvapi.c, dlls/nvapi/nvapi.spec,
# | dlls/nvapi/tests/Makefile.in, dlls/nvapi/tests/nvapi.c, dlls/nvapi64/Makefile.in, dlls/nvapi64/nvapi64.spec,
# | include/Makefile.in, include/nvapi.h, include/wine/wined3d.h
# | dlls/wined3d/device.c, dlls/wined3d/wined3d.spec, include/Makefile.in, include/nvapi.h, include/wine/wined3d.h
# |
if test "$enable_nvapi_Stub_DLL" -eq 1; then
patch_apply nvapi-Stub_DLL/0001-nvapi-First-implementation.patch
@ -1693,6 +1693,7 @@ if test "$enable_nvapi_Stub_DLL" -eq 1; then
patch_apply nvapi-Stub_DLL/0018-nvapi-Add-stub-for-NvAPI_GPU_GetGpuCoreCount.patch
patch_apply nvapi-Stub_DLL/0019-nvapi-Implement-NvAPI_D3D11_SetDepthBoundsTest.patch
patch_apply nvapi-Stub_DLL/0020-nvapi-Implement-NvAPI_D3D11_CreateDevice-and-NvAPI_D.patch
patch_apply nvapi-Stub_DLL/0021-Revert-wined3d-No-longer-export-wined3d_device_set_r.patch
fi
# Patchset d3d11-Deferred_Context

View File

@ -1,4 +1,4 @@
From c6fffd9e7e10b3ac95aed8165ecffd1e1da30f61 Mon Sep 17 00:00:00 2001
From dc65316fb38101e2b0c0d3047553c06b3e951d7f Mon Sep 17 00:00:00 2001
From: Derek Lesho <dereklesho52@Gmail.com>
Date: Tue, 25 Jun 2019 22:37:34 -0400
Subject: [PATCH] winex11.drv: Add support for absolute RawMotion events.
@ -19,18 +19,18 @@ however use the valuator mode to distinguish between relative movements
and absolute position events.
---
dlls/user32/rawinput.c | 7 ++-
dlls/winex11.drv/mouse.c | 96 +++++++++++++++++++++-------------
dlls/winex11.drv/mouse.c | 94 +++++++++++++++++++++-------------
dlls/winex11.drv/window.c | 3 +-
dlls/winex11.drv/x11drv.h | 18 +++----
dlls/winex11.drv/x11drv_main.c | 2 +
server/queue.c | 4 +-
6 files changed, 81 insertions(+), 49 deletions(-)
6 files changed, 80 insertions(+), 48 deletions(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index 91315692ac5..2e3f4301a4d 100644
index af9d6acb70e..f51f3666778 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -296,7 +296,12 @@ BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_ms
@@ -301,7 +301,12 @@ BOOL rawinput_from_hardware_message(RAWINPUT *rawinput, const struct hardware_ms
rawinput->header.hDevice = WINE_MOUSE_HANDLE;
rawinput->header.wParam = 0;
@ -79,21 +79,20 @@ index 0558467a805..dcc9fe82fd1 100644
- {
- valuator_data = &thread_data->y_rel_valuator;
- }
-
+ class->label == x11drv_atom( Abs_Y ) ||
+ (!class->label && class->number == 1))
+ thread_data->y_pos_valuator = *class;
+ }
- if (valuator_data) {
- valuator_data->number = class->number;
- valuator_data->min = class->min;
- valuator_data->max = class->max;
- }
+ class->label == x11drv_atom( Abs_Y ) ||
+ (!class->label && class->number == 1))
+ thread_data->y_pos_valuator = *class;
}
+
+ if (thread_data->x_pos_valuator.number < 0 || thread_data->y_pos_valuator.number < 0)
+ {
+ WARN("Only one X/Y axis found, ignoring RawMotion events\n");
+ }
}
+ else if (thread_data->x_pos_valuator.mode != thread_data->y_pos_valuator.mode)
+ {
+ WARN("Relative/Absolute mismatch between X/Y axis, ignoring RawMotion events\n");
@ -193,7 +192,7 @@ index 0558467a805..dcc9fe82fd1 100644
}
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 4005e3df387..13ab69ec0ef 100644
index b2c5f4016fe..3ef6eb6ecd0 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -37,6 +37,8 @@
@ -214,7 +213,7 @@ index 4005e3df387..13ab69ec0ef 100644
#include "wine/server.h"
#include "mwm.h"
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 910a6c6cc18..3155d23baf0 100644
index 5f096b5d086..c1ed6eea1de 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -32,6 +32,9 @@
@ -227,7 +226,7 @@ index 910a6c6cc18..3155d23baf0 100644
#define BOOL X_BOOL
#define BYTE X_BYTE
@@ -319,13 +322,6 @@ struct x11drv_escape_flush_gl_drawable
@@ -320,13 +323,6 @@ struct x11drv_escape_flush_gl_drawable
* X11 USER driver
*/
@ -241,10 +240,10 @@ index 910a6c6cc18..3155d23baf0 100644
enum xi2_state
{
xi_unavailable = -1,
@@ -349,11 +345,13 @@ struct x11drv_thread_data
@@ -350,11 +346,13 @@ struct x11drv_thread_data
Window clip_window; /* window used for cursor clipping */
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
DWORD clip_reset; /* time when clipping was last reset */
HKL kbd_layout; /* active keyboard layout */
+#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
enum xi2_state xi2_state; /* XInput2 state */
- struct x11drv_valuator_data x_rel_valuator;
@ -257,7 +256,7 @@ index 910a6c6cc18..3155d23baf0 100644
};
extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN;
@@ -438,6 +436,8 @@ enum x11drv_atoms
@@ -439,6 +437,8 @@ enum x11drv_atoms
XATOM_RAW_CAP_HEIGHT,
XATOM_Rel_X,
XATOM_Rel_Y,
@ -267,7 +266,7 @@ index 910a6c6cc18..3155d23baf0 100644
XATOM_WM_DELETE_WINDOW,
XATOM_WM_STATE,
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index d8576949aea..5a1c672b143 100644
index 369515bba71..6f1e8c6cfb6 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -142,6 +142,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
@ -280,10 +279,10 @@ index d8576949aea..5a1c672b143 100644
"WM_DELETE_WINDOW",
"WM_STATE",
diff --git a/server/queue.c b/server/queue.c
index 9008f8e90ff..4c68da8f737 100644
index 9da4cb48d0e..b305bec2d2d 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1851,8 +1851,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -1932,8 +1932,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
msg_data->info = input->mouse.info;
msg_data->flags = flags;
msg_data->rawinput.type = RIM_TYPEMOUSE;

View File

@ -1,4 +1,4 @@
From a5bff960bdb07ad110189c2ea7394370ac28b512 Mon Sep 17 00:00:00 2001
From 7158d919b04dc9229064370be73e3bc01fb3f782 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 23 Jan 2020 11:00:19 +0100
Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows.
@ -26,7 +26,7 @@ index b517e44e150..6f46ef505c9 100644
X11DRV_init_desktop( win, width, height );
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 99943478729..217c1eca857 100644
index 9de7ffa3f3c..14770d3364a 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -245,6 +245,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
@ -185,7 +185,7 @@ index ce77c7e5985..2550af3cb9c 100644
}
else if (prev_clip_hwnd)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index baaa30d74e3..4005e3df387 100644
index cfac86c224d..b2c5f4016fe 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -375,6 +375,7 @@ static void sync_window_style( struct x11drv_win_data *data )
@ -196,7 +196,7 @@ index baaa30d74e3..4005e3df387 100644
}
}
@@ -1573,6 +1574,7 @@ static void create_whole_window( struct x11drv_win_data *data )
@@ -1591,6 +1592,7 @@ static void create_whole_window( struct x11drv_win_data *data )
data->vis.visual, mask, &attr );
if (!data->whole_window) goto done;
@ -204,7 +204,7 @@ index baaa30d74e3..4005e3df387 100644
set_initial_wm_hints( data->display, data->whole_window );
set_wm_hints( data );
@@ -1879,6 +1881,7 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
@@ -1897,6 +1899,7 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
data->clip_window = XCreateWindow( data->display, root_window, 0, 0, 1, 1, 0, 0,
InputOnly, default_visual.visual,
CWOverrideRedirect | CWEventMask, &attr );
@ -213,7 +213,7 @@ index baaa30d74e3..4005e3df387 100644
SetPropA( hwnd, clip_window_prop, (HANDLE)data->clip_window );
X11DRV_InitClipboard();
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 16a8a6be2be..7ea60fa495a 100644
index 6f254368ab7..b014fd6ae11 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -197,6 +197,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
@ -225,7 +225,7 @@ index 16a8a6be2be..7ea60fa495a 100644
extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image,
const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits,
@@ -324,6 +326,14 @@ struct x11drv_valuator_data
@@ -325,6 +327,14 @@ struct x11drv_valuator_data
int number;
};
@ -240,10 +240,10 @@ index 16a8a6be2be..7ea60fa495a 100644
struct x11drv_thread_data
{
Display *display;
@@ -339,7 +349,7 @@ struct x11drv_thread_data
@@ -340,7 +350,7 @@ struct x11drv_thread_data
Window clip_window; /* window used for cursor clipping */
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
DWORD clip_reset; /* time when clipping was last reset */
HKL kbd_layout; /* active keyboard layout */
- enum { xi_unavailable = -1, xi_unknown, xi_disabled, xi_enabled } xi2_state; /* XInput2 state */
+ enum xi2_state xi2_state; /* XInput2 state */
void *xi2_devices; /* list of XInput2 devices (valid when state is enabled) */

View File

@ -1,4 +1,4 @@
From 3addef6ede746e418be37c5f288027bb0247f37c Mon Sep 17 00:00:00 2001
From e71967fd27b8fb686311dfc1463fe32956d1d23f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 2 Aug 2019 02:24:32 -0400
Subject: [PATCH] winex11.drv: Advertise XInput2 version 2.1 support.
@ -125,12 +125,12 @@ index 2550af3cb9c..0d41438c5c7 100644
x_rel = &thread_data->x_rel_valuator;
y_rel = &thread_data->y_rel_valuator;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 7ea60fa495a..df8a53bb228 100644
index b014fd6ae11..e7e75d4d072 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -350,12 +350,9 @@ struct x11drv_thread_data
@@ -351,12 +351,9 @@ struct x11drv_thread_data
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
DWORD clip_reset; /* time when clipping was last reset */
HKL kbd_layout; /* active keyboard layout */
enum xi2_state xi2_state; /* XInput2 state */
- void *xi2_devices; /* list of XInput2 devices (valid when state is enabled) */
- int xi2_device_count;

View File

@ -1,4 +1,4 @@
From a88aed6df65592b55fde5ecee55b090149c362bb Mon Sep 17 00:00:00 2001
From f75111bb0bcc4478dab7b00ddf66362bf29b0624 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 19 Dec 2019 22:34:44 +0100
Subject: [PATCH] winex11.drv: Keep track of pointer and device button
@ -16,10 +16,10 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
4 files changed, 106 insertions(+), 8 deletions(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 01620c5e4a4..272f728def9 100644
index ce10f6ee1a3..390b36e7695 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1976,13 +1976,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
@@ -1942,13 +1942,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
{
HWND hwnd;
@ -35,7 +35,7 @@ index 01620c5e4a4..272f728def9 100644
+ hwnd = GetFocus();
+ if (!hwnd) hwnd = GetActiveWindow();
+ PostMessageW(hwnd, WM_INPUTLANGCHANGEREQUEST,
+ 0 /*FIXME*/, (LPARAM)X11DRV_GetKeyboardLayout(0));
+ 0 /*FIXME*/, (LPARAM)GetKeyboardLayout(0));
+ break;
+
+ case MappingPointer:
@ -46,7 +46,7 @@ index 01620c5e4a4..272f728def9 100644
- hwnd = GetFocus();
- if (!hwnd) hwnd = GetActiveWindow();
- PostMessageW(hwnd, WM_INPUTLANGCHANGEREQUEST,
- 0 /*FIXME*/, (LPARAM)X11DRV_GetKeyboardLayout(0));
- 0 /*FIXME*/, (LPARAM)GetKeyboardLayout(0));
return TRUE;
}
@ -196,10 +196,10 @@ index 0d41438c5c7..fc5fd29d7b6 100644
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index df8a53bb228..afa990b7e68 100644
index e7e75d4d072..2e5a045415e 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -643,6 +643,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
@@ -646,6 +646,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
@ -208,10 +208,10 @@ index df8a53bb228..afa990b7e68 100644
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 43c30ab369c..d8576949aea 100644
index f1e50f56659..11ecf7aeed8 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -616,6 +616,7 @@ static BOOL process_attach(void)
@@ -617,6 +617,7 @@ static BOOL process_attach(void)
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
#endif
X11DRV_InitKeyboard( gdi_display );

View File

@ -1 +1 @@
cda4abac9859ed42c29e8cb2746201a578431a5e
e2aa30f21def839866b09e74b5ddd843f7e70c87