Rebase against 749f8c25e262cb049289e7c96bb390edcafa1021.

This commit is contained in:
Zebediah Figura 2021-04-16 17:42:09 -05:00
parent 30c9d5a0f8
commit 20303a53ec
7 changed files with 111 additions and 103 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "39263558a2088940aaacd6eda19ca23d40b63495"
echo "749f8c25e262cb049289e7c96bb390edcafa1021"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 4b24ceb11c3b77ecd1e00d7145be370f7192bbbb Mon Sep 17 00:00:00 2001
From d39f9ed6bba9a603b415c3882e89fd9c8cc4ae10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 19 Mar 2021 14:16:16 +0100
Subject: [PATCH] hidclass.sys: Use __wine_send_input to send device
@ -27,7 +27,7 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/dlls/hidclass.sys/Makefile.in b/dlls/hidclass.sys/Makefile.in
index be4af747853..2f9f30f8bef 100644
index 58bb2b5088f..ced4196d24a 100644
--- a/dlls/hidclass.sys/Makefile.in
+++ b/dlls/hidclass.sys/Makefile.in
@@ -1,6 +1,6 @@
@ -35,52 +35,52 @@ index be4af747853..2f9f30f8bef 100644
IMPORTLIB = hidclass
-IMPORTS = hal ntoskrnl
+IMPORTS = hal ntoskrnl user32
DELAYIMPORTS = setupapi hid
DELAYIMPORTS = setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c
index a499aec93bb..8e539dfe6b7 100644
index 6e13596a32c..0fce6685b62 100644
--- a/dlls/hidclass.sys/pnp.c
+++ b/dlls/hidclass.sys/pnp.c
@@ -25,6 +25,7 @@
@@ -26,6 +26,7 @@
#include "ddk/hidtypes.h"
#include "ddk/wdm.h"
#include "regstr.h"
+#include "winuser.h"
#include "wine/debug.h"
#include "wine/asm.h"
#include "wine/list.h"
@@ -69,6 +70,9 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH
@@ -101,6 +102,9 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH
return status;
}
+/* make sure bRawData can hold two bytes without requiring additional allocation */
+C_ASSERT(offsetof(RAWINPUT, data.hid.bRawData[2]) < sizeof(RAWINPUT));
+
NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *bus_pdo)
{
WCHAR device_id[MAX_DEVICE_ID_LEN], instance_id[MAX_DEVICE_ID_LEN];
@@ -79,6 +83,8 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
BASE_DEVICE_EXTENSION *ext = NULL;
WCHAR device_id[MAX_DEVICE_ID_LEN], instance_id[MAX_DEVICE_ID_LEN], pdo_name[255];
@@ -112,6 +116,8 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
minidriver *minidriver;
HID_DESCRIPTOR descriptor;
BYTE *reportDescriptor;
+ RAWINPUT rawinput;
+ INPUT input;
INT i;
if ((status = get_device_id(PDO, BusQueryDeviceID, device_id)))
@@ -187,6 +193,21 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if ((status = get_device_id(bus_pdo, BusQueryDeviceID, device_id)))
@@ -238,6 +244,21 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
HID_StartDeviceThread(device);
HID_StartDeviceThread(child_pdo);
+ rawinput.header.dwType = RIM_TYPEHID;
+ rawinput.header.dwSize = offsetof(RAWINPUT, data.hid.bRawData[2]);
+ rawinput.header.hDevice = ULongToHandle(ext->rawinput_handle);
+ rawinput.header.hDevice = ULongToHandle(pdo_ext->u.pdo.rawinput_handle);
+ rawinput.header.wParam = GIDC_ARRIVAL;
+ rawinput.data.hid.dwCount = 1;
+ rawinput.data.hid.dwSizeHid = 2;
+ rawinput.data.hid.bRawData[0] = ext->preparseData->caps.UsagePage;
+ rawinput.data.hid.bRawData[1] = ext->preparseData->caps.Usage;
+ rawinput.data.hid.bRawData[0] = pdo_ext->u.pdo.preparsed_data->caps.UsagePage;
+ rawinput.data.hid.bRawData[1] = pdo_ext->u.pdo.preparsed_data->caps.Usage;
+
+ input.type = INPUT_HARDWARE;
+ input.u.hi.uMsg = WM_INPUT_DEVICE_CHANGE;
@ -88,31 +88,31 @@ index a499aec93bb..8e539dfe6b7 100644
+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0);
+ __wine_send_input(0, &input, &rawinput);
+
fdo->Flags &= ~DO_DEVICE_INITIALIZING;
return STATUS_SUCCESS;
}
@@ -194,6 +215,21 @@ static NTSTATUS remove_device(minidriver *minidriver, DEVICE_OBJECT *device, IRP
{
BASE_DEVICE_EXTENSION *ext = device->DeviceExtension;
NTSTATUS rc = STATUS_NOT_SUPPORTED;
+ RAWINPUT rawinput;
+ INPUT input;
@@ -384,6 +405,21 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
case IRP_MN_REMOVE_DEVICE:
{
IRP *queued_irp;
+ RAWINPUT rawinput;
+ INPUT input;
+
+ rawinput.header.dwType = RIM_TYPEHID;
+ rawinput.header.dwSize = offsetof(RAWINPUT, data.hid.bRawData[0]);
+ rawinput.header.hDevice = ULongToHandle(ext->rawinput_handle);
+ rawinput.header.wParam = GIDC_REMOVAL;
+ rawinput.data.hid.dwCount = 0;
+ rawinput.data.hid.dwSizeHid = 0;
+ rawinput.header.dwType = RIM_TYPEHID;
+ rawinput.header.dwSize = offsetof(RAWINPUT, data.hid.bRawData[0]);
+ rawinput.header.hDevice = ULongToHandle(ext->u.pdo.rawinput_handle);
+ rawinput.header.wParam = GIDC_REMOVAL;
+ rawinput.data.hid.dwCount = 0;
+ rawinput.data.hid.dwSizeHid = 0;
+
+ input.type = INPUT_HARDWARE;
+ input.u.hi.uMsg = WM_INPUT_DEVICE_CHANGE;
+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16);
+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0);
+ __wine_send_input(0, &input, &rawinput);
+ input.type = INPUT_HARDWARE;
+ input.u.hi.uMsg = WM_INPUT_DEVICE_CHANGE;
+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16);
+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0);
+ __wine_send_input(0, &input, &rawinput);
rc = IoSetDeviceInterfaceState(&ext->link_name, FALSE);
if (rc)
IoSetDeviceInterfaceState(&ext->u.pdo.link_name, FALSE);
if (ext->u.pdo.is_mouse)
--
2.30.2

View File

@ -1,4 +1,4 @@
From 7819fe251e3f12eda8ee615aa735b1870a49e3b9 Mon Sep 17 00:00:00 2001
From 478c213d97d8894d734d8f711f6d4c75d9ea84fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 5 Mar 2021 10:41:20 +0100
Subject: [PATCH] hidclass.sys: Send rawinput messages with HID report.
@ -9,10 +9,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
1 file changed, 35 insertions(+)
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index 9a3c92b3576..551816aa4fe 100644
index ec34b6b8068..887d7212c89 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -254,6 +254,39 @@ static NTSTATUS copy_packet_into_buffer(HID_XFER_PACKET *packet, BYTE* buffer, U
@@ -171,6 +171,39 @@ static NTSTATUS copy_packet_into_buffer(HID_XFER_PACKET *packet, BYTE* buffer, U
return STATUS_BUFFER_OVERFLOW;
}
@ -25,13 +25,13 @@ index 9a3c92b3576..551816aa4fe 100644
+ INPUT input;
+
+ data_size = offsetof(RAWINPUT, data.hid.bRawData) + packet->reportBufferLen;
+ if (!(id = ext->preparseData->reports[0].reportID)) data_size += 1;
+ if (!(id = ext->u.pdo.preparsed_data->reports[0].reportID)) data_size += 1;
+
+ rawinput = HeapAlloc(GetProcessHeap(), 0, data_size);
+
+ rawinput->header.dwType = RIM_TYPEHID;
+ rawinput->header.dwSize = data_size;
+ rawinput->header.hDevice = ULongToHandle(ext->rawinput_handle);
+ rawinput->header.hDevice = ULongToHandle(ext->u.pdo.rawinput_handle);
+ rawinput->header.wParam = RIM_INPUT;
+ rawinput->data.hid.dwCount = 1;
+ rawinput->data.hid.dwSizeHid = data_size - offsetof(RAWINPUT, data.hid.bRawData);
@ -52,18 +52,18 @@ index 9a3c92b3576..551816aa4fe 100644
static void HID_Device_processQueue(DEVICE_OBJECT *device)
{
IRP *irp;
@@ -337,6 +370,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
if (irp->IoStatus.u.Status == STATUS_SUCCESS)
@@ -242,6 +275,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
if (irp_status.u.Status == STATUS_SUCCESS)
{
RingBuffer_Write(ext->ring_buffer, packet);
RingBuffer_Write(ext->u.pdo.ring_buffer, packet);
+ HID_Device_sendRawInput(device, packet);
HID_Device_processQueue(device);
}
@@ -383,6 +417,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
@@ -282,6 +316,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
else
packet->reportId = 0;
RingBuffer_Write(ext->ring_buffer, packet);
RingBuffer_Write(ext->u.pdo.ring_buffer, packet);
+ HID_Device_sendRawInput(device, packet);
HID_Device_processQueue(device);
}

View File

@ -1,20 +1,20 @@
From 613004e02a06a93598c45f323fe5b4cd9c989194 Mon Sep 17 00:00:00 2001
From 5e5233a4389f6e4b89337c502c91ea003cd48c5c Mon Sep 17 00:00:00 2001
From: Arkadiusz Hiler <ahiler@codeweavers.com>
Date: Wed, 10 Feb 2021 13:23:33 +0100
Subject: [PATCH] hidclass.sys: Assign rawinput handles through device
properties.
---
dlls/hidclass.sys/device.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
dlls/hidclass.sys/device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index 551816aa4fe..fb571bea314 100644
index 887d7212c89..fafb7118e99 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -33,11 +33,14 @@
#include "initguid.h"
@@ -32,11 +32,14 @@
#include "ddk/hidtypes.h"
#include "ddk/wdm.h"
#include "devguid.h"
+#include "devpkey.h"
#include "ntddmou.h"
@ -24,16 +24,24 @@ index 551816aa4fe..fb571bea314 100644
+DEFINE_DEVPROPKEY(DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda, 0x63, 0x6f, 0xb5, 0x9f, 0x08, 0x98, 2);
+
NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device)
{
WCHAR dev_name[255];
@@ -144,6 +147,15 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device)
/* user32 reserves 1 & 2 for winemouse and winekeyboard,
* keep this in sync with user_private.h */
#define WINE_MOUSE_HANDLE 1
@@ -55,6 +58,7 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device)
HDEVINFO devinfo;
BASE_DEVICE_EXTENSION *ext;
USAGE usage, page;
+ NTSTATUS status;
ext = device->DeviceExtension;
page = ext->u.pdo.preparsed_data->caps.UsagePage;
@@ -93,6 +97,15 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device)
else
ext->rawinput_handle = alloc_rawinput_handle();
ext->u.pdo.rawinput_handle = alloc_rawinput_handle();
+ status = IoSetDevicePropertyData(device, &DEVPROPKEY_HID_HANDLE, LOCALE_NEUTRAL,
+ PLUGPLAY_PROPERTY_PERSISTENT, DEVPROP_TYPE_UINT32,
+ sizeof(ext->rawinput_handle), &ext->rawinput_handle);
+ sizeof(ext->u.pdo.rawinput_handle), &ext->u.pdo.rawinput_handle);
+ if (status != STATUS_SUCCESS)
+ {
+ FIXME("failed to set device property %x\n", status);

View File

@ -1,4 +1,4 @@
From f7bb329873ec91a2ed7adbca8b5fac5f774e324d Mon Sep 17 00:00:00 2001
From c1c1e256848179a46ebf8f10183b68c9f1a087ee Mon Sep 17 00:00:00 2001
From: Arkadiusz Hiler <ahiler@codeweavers.com>
Date: Mon, 22 Feb 2021 15:41:46 +0200
Subject: [PATCH] user32: Use device handles assigned by hidclass.sys.
@ -10,7 +10,7 @@ family.
1 file changed, 51 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index ea8d15ac97b..91315692ac5 100644
index 0af44536677..4444a3b3e57 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -38,14 +38,18 @@
@ -26,13 +26,13 @@ index ea8d15ac97b..91315692ac5 100644
+
struct device
{
WCHAR *path;
SP_DEVICE_INTERFACE_DETAIL_DATA_W *detail;
HANDLE file;
+ HANDLE handle;
RID_DEVICE_INFO info;
PHIDP_PREPARSED_DATA data;
};
@@ -91,11 +95,13 @@ static BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int
@@ -91,10 +95,12 @@ static BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int
static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
{
@ -41,13 +41,12 @@ index ea8d15ac97b..91315692ac5 100644
+ UINT32 handle;
struct device *device;
HANDLE file;
WCHAR *path;
- DWORD size;
+ DWORD idx, size, type;
SetupDiGetDeviceInterfaceDetailW(set, iface, NULL, 0, &size, NULL);
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
@@ -109,7 +115,27 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
@@ -108,7 +114,27 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
return FALSE;
}
detail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);
@ -68,7 +67,7 @@ index ea8d15ac97b..91315692ac5 100644
+ {
+ if (rawinput_devices[idx].handle == ULongToHandle(handle))
+ {
+ TRACE("Discarding %s as it's a duplicate of %s.\n", debugstr_w(detail->DevicePath), debugstr_w(rawinput_devices[idx].path));
+ TRACE("Discarding %s as it's a duplicate of %s.\n", debugstr_w(detail->DevicePath), debugstr_w(rawinput_devices[idx].detail->DevicePath));
+ heap_free(detail);
+ return NULL;
+ }
@ -76,14 +75,15 @@ index ea8d15ac97b..91315692ac5 100644
TRACE("Found HID device %s.\n", debugstr_w(detail->DevicePath));
@@ -143,14 +169,13 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
device->path = path;
@@ -134,6 +160,7 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
device->detail = detail;
device->file = file;
device->info.cbSize = sizeof(RID_DEVICE_INFO);
+ device->handle = ULongToHandle(handle);
device->data = NULL;
return device;
}
@@ -141,8 +168,6 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
static void find_devices(void)
{
@ -92,7 +92,7 @@ index ea8d15ac97b..91315692ac5 100644
SP_DEVICE_INTERFACE_DATA iface = { sizeof(iface) };
struct device *device;
HIDD_ATTRIBUTES attr;
@@ -159,10 +184,6 @@ static void find_devices(void)
@@ -151,10 +176,6 @@ static void find_devices(void)
HDEVINFO set;
DWORD idx;
@ -103,7 +103,7 @@ index ea8d15ac97b..91315692ac5 100644
HidD_GetHidGuid(&hid_guid);
EnterCriticalSection(&rawinput_devices_cs);
@@ -223,6 +244,26 @@ static void find_devices(void)
@@ -216,6 +237,26 @@ static void find_devices(void)
}
@ -130,7 +130,7 @@ index ea8d15ac97b..91315692ac5 100644
struct rawinput_thread_data *rawinput_thread_data(void)
{
struct user_thread_info *thread_info = get_user_thread_info();
@@ -396,7 +437,7 @@ UINT WINAPI GetRawInputDeviceList(RAWINPUTDEVICELIST *devices, UINT *device_coun
@@ -389,7 +430,7 @@ UINT WINAPI GetRawInputDeviceList(RAWINPUTDEVICELIST *devices, UINT *device_coun
for (i = 0; i < rawinput_devices_count; ++i)
{
@ -139,7 +139,7 @@ index ea8d15ac97b..91315692ac5 100644
devices[2 + i].dwType = rawinput_devices[i].info.dwType;
}
@@ -668,7 +709,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
@@ -661,7 +702,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
static const RID_DEVICE_INFO_MOUSE mouse_info = {1, 5, 0, FALSE};
RID_DEVICE_INFO info;

View File

@ -1,4 +1,4 @@
From e9fe2d9a9c65ad4b0f86f80bbabce4fb90085e60 Mon Sep 17 00:00:00 2001
From 9379d1dcd14d684a07763f28b20384c8a65bd146 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 25 Feb 2019 15:05:12 +0300
Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
@ -15,10 +15,10 @@ Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
7 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 53a83ad887b..ed4ce18bb61 100644
index 3ef9361886d..86dd47383df 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -6545,13 +6545,10 @@ static void test_vertex_shader_constant(void)
@@ -6936,13 +6936,10 @@ static void test_vertex_shader_constant(void)
ok(consts_swvp == 8192, "Unexpected consts_swvp %u.\n", consts_swvp);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -32,7 +32,7 @@ index 53a83ad887b..ed4ce18bb61 100644
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -6576,7 +6573,6 @@ static void test_vertex_shader_constant(void)
@@ -6967,7 +6964,6 @@ static void test_vertex_shader_constant(void)
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 0);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -40,7 +40,7 @@ index 53a83ad887b..ed4ce18bb61 100644
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -6584,7 +6580,6 @@ static void test_vertex_shader_constant(void)
@@ -6975,7 +6971,6 @@ static void test_vertex_shader_constant(void)
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 1);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -49,10 +49,10 @@ index 53a83ad887b..ed4ce18bb61 100644
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 5218d8a2029..7c5951165ad 100644
index 40585d5257d..6377addec24 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -24880,7 +24880,6 @@ static void test_mvp_software_vertex_shaders(void)
@@ -24895,7 +24895,6 @@ static void test_mvp_software_vertex_shaders(void)
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, c_index, 1);
ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, (unsigned int)c_index[0], c_color, 1);
@ -61,19 +61,19 @@ index 5218d8a2029..7c5951165ad 100644
hr = IDirect3DDevice9_BeginScene(device);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a65411982a7..be548c5cc6c 100644
index bb1b949c3e1..e2618f20d16 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3580,7 +3580,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
@@ -3924,7 +3924,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
const struct wined3d_saved_states *changed = &stateblock->changed;
const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT;
struct wined3d_device_context *context = &device->cs->c;
- unsigned int i, j, start, idx;
+ unsigned int i, j, start, idx, vs_uniform_count;
struct wined3d_range range;
uint32_t map;
@@ -3591,9 +3591,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3935,9 +3935,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
if (changed->pixelShader)
wined3d_device_set_pixel_shader(device, state->ps);
@ -87,7 +87,7 @@ index a65411982a7..be548c5cc6c 100644
wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 5252baac34b..01a4eb9fa49 100644
index db9efa70186..50551f0a663 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1910,7 +1910,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@ -100,10 +100,10 @@ index 5252baac34b..01a4eb9fa49 100644
update_heap_entry(heap, i, priv->next_constant_version);
}
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 46588fa4246..5ff9f3cc3f8 100644
index 1f1ba262336..b939da02e61 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -714,8 +714,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
@@ -731,8 +731,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
const struct wined3d_stateblock *device_state)
{
const struct wined3d_stateblock_state *state = &device_state->stateblock_state;
@ -113,7 +113,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
DWORD map;
TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
@@ -731,9 +731,11 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
@@ -748,9 +748,11 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
stateblock->stateblock_state.vs = state->vs;
}
@ -126,7 +126,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
break;
memcpy(&stateblock->stateblock_state.vs_consts_f[range.offset], &state->vs_consts_f[range.offset],
@@ -977,8 +979,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
@@ -994,8 +996,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
struct wined3d_stateblock *device_state)
{
const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
@ -136,7 +136,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
DWORD map;
TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
@@ -988,9 +990,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
@@ -1005,9 +1007,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
if (stateblock->changed.pixelShader)
wined3d_stateblock_set_pixel_shader(device_state, state->ps);
@ -149,7 +149,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
break;
wined3d_stateblock_set_vs_consts_f(device_state, range.offset, range.size, &state->vs_consts_f[range.offset]);
}
@@ -1182,13 +1186,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
@@ -1199,13 +1203,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock,
unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
{
@ -167,7 +167,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
return WINED3DERR_INVALIDCALL;
memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
@@ -1937,7 +1942,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
@@ -2013,7 +2018,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
device_state->stateblock_state.light_state->light_map);
stateblock_savedstates_set_all(&stateblock->changed,
@ -176,7 +176,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
break;
case WINED3D_SBT_PIXEL_STATE:
@@ -1949,7 +1954,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
@@ -2025,7 +2030,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
device_state->stateblock_state.light_state->light_map);
stateblock_savedstates_set_vertex(&stateblock->changed,
@ -186,10 +186,10 @@ index 46588fa4246..5ff9f3cc3f8 100644
default:
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 47dac151e55..bdabd24d651 100644
index b37cc260c92..c2d66362966 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3614,7 +3614,7 @@ struct wined3d_state
@@ -3694,7 +3694,7 @@ struct wined3d_state
struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS];
struct wined3d_unordered_access_view *unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS];
@ -198,7 +198,7 @@ index 47dac151e55..bdabd24d651 100644
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
@@ -3766,6 +3766,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
@@ -3867,6 +3867,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_device_uninit_3d(struct wined3d_device *device) DECLSPEC_HIDDEN;
@ -214,7 +214,7 @@ index 47dac151e55..bdabd24d651 100644
struct wined3d_device_no3d
{
struct wined3d_device d;
@@ -4492,7 +4501,7 @@ struct wined3d_vertex_declaration
@@ -4590,7 +4599,7 @@ struct wined3d_vertex_declaration
struct wined3d_saved_states
{
@ -224,10 +224,10 @@ index 47dac151e55..bdabd24d651 100644
WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)];
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 86008c5ce24..90f6070aa1a 100644
index b3f803b2614..841fb9f9aee 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2166,7 +2166,7 @@ struct wined3d_stateblock_state
@@ -2189,7 +2189,7 @@ struct wined3d_stateblock_state
int base_vertex_index;
struct wined3d_shader *vs;
@ -237,5 +237,5 @@ index 86008c5ce24..90f6070aa1a 100644
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
--
2.28.0
2.30.2

View File

@ -1 +1 @@
39263558a2088940aaacd6eda19ca23d40b63495
749f8c25e262cb049289e7c96bb390edcafa1021