Rebase against 205228eb80089c38b25e7249073021e7806d2bfa.

[dinput-DIPROP_USERNAME]
Removed patch to implement dinput device property DIPROP_USERNAME (accepted
upstream).

[kernel32-GetFinalPathNameByHandle]
Removed patch to add support for GetFinalPathNameByHandle (accepted upstream).

[ntoskrnl-Stubs]
Removed patches for KeDelayExecutionThread and PsRemoveLoadImageNotifyRoutine
stubs (accepted upstream).

[server-Parent_Process]
Removed patch to avoid holding reference on parent process in wineserver
(accepted upstream).

[wined3d-Geforce_425M]
Removed patch to add wined3d detection for GeForce GT 425M (accepted upstream).

[winscard-SCardListReaders]
Removed patch to add stub for winscard.SCardListReadersA/W (accepted upstream).
This commit is contained in:
Sebastian Lackner 2016-06-25 19:44:24 +02:00
parent 35b9051d1c
commit 739a308958
20 changed files with 150 additions and 1240 deletions

View File

@ -1,177 +0,0 @@
From 4eb926239cec9c6dfa489056bb30d698039926a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@vr-web.de>
Date: Tue, 24 Nov 2015 21:13:50 +0100
Subject: dinput: Implement device property DIPROP_USERNAME.
https://bugs.winehq.org/show_bug.cgi?id=39667
Probably same issue as in https://bugs.winehq.org/show_bug.cgi?id=12432 .
(Attached backtrace seems equal.)
Steps to reproduce:
- start launcher
- "Configure Controller"
- leave dialog with "Cancel"
- crash
MotoGP 3 demo launcher uses ConfigureDevices for the key mapping.
This seems because the result of a GetProperty(DIPROP_USERNAME) is used
without checking.
---
dlls/dinput/device.c | 39 +++++++++++++++++++++++++++++++++++++++
dlls/dinput/device_private.h | 1 +
dlls/dinput8/tests/device.c | 29 +++++++++++++++++++++++++++--
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e525f01..41fb2c4 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -778,11 +778,13 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df)
{
+ static const WCHAR emptyW[] = { 0 };
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
DIDATAFORMAT data_format;
DIOBJECTDATAFORMAT *obj_df = NULL;
DIPROPDWORD dp;
DIPROPRANGE dpr;
+ DIPROPSTRING dps;
WCHAR username[MAX_PATH];
DWORD username_size = MAX_PATH;
int i, action = 0, num_actions = 0;
@@ -863,6 +865,13 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
else
lstrcpynW(username, lpszUserName, MAX_PATH);
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ lstrcpynW(dps.wsz, (dwFlags & DIDSAM_NOUSER) ? emptyW : username, sizeof(dps.wsz)/sizeof(WCHAR));
+ IDirectInputDevice8_SetProperty(iface, DIPROP_USERNAME, &dps.diph);
+
/* Save the settings to disk */
save_mapping_settings(iface, lpdiaf, username);
@@ -1100,6 +1109,9 @@ ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
/* Free action mapping */
HeapFree(GetProcessHeap(), 0, This->action_map);
+ /* Free username */
+ HeapFree(GetProcessHeap(), 0, This->username);
+
EnterCriticalSection( &This->dinput->crit );
list_remove( &This->entry );
LeaveCriticalSection( &This->dinput->crit );
@@ -1251,6 +1263,17 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
TRACE("buffersize = %d\n", pd->dwData);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ ps->wsz[0] = 0;
+ if (This->username)
+ lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
case (DWORD_PTR) DIPROP_VIDPID:
FIXME("DIPROP_VIDPID not implemented\n");
return DIERR_UNSUPPORTED;
@@ -1324,6 +1347,22 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
LeaveCriticalSection(&This->crit);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPCDIPROPSTRING ps = (LPCDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ if (!This->username)
+ This->username = HeapAlloc(GetProcessHeap(), 0, sizeof(ps->wsz));
+ if (!This->username)
+ return DIERR_OUTOFMEMORY;
+
+ This->username[0] = 0;
+ if (ps->wsz)
+ lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
default:
WARN("Unknown property %s\n", debugstr_guid(rguid));
return DIERR_UNSUPPORTED;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 52bbec4..44fa46a 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -81,6 +81,7 @@ struct IDirectInputDeviceImpl
/* Action mapping */
int num_actions; /* number of actions mapped */
ActionMap *action_map; /* array of mappings */
+ WCHAR *username; /* set by 'SetActionMap' */
};
extern BOOL get_app_key(HKEY*, HKEY*) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 6495559..b5e27ad 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -223,8 +223,8 @@ static BOOL CALLBACK enumeration_callback(const DIDEVICEINSTANCEA *lpddi, IDirec
dps.wsz[0] = '\0';
hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_USERNAME, &dps.diph);
- todo_wine ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
- todo_wine ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
/* Test buffer size */
memset(&dp, 0, sizeof(dp));
@@ -275,6 +275,7 @@ static void test_action_mapping(void)
HINSTANCE hinst = GetModuleHandleA(NULL);
IDirectInput8A *pDI = NULL;
DIACTIONFORMATA af;
+ DIPROPSTRING dps;
struct enum_data data = {pDI, &af, NULL, NULL, NULL, 0};
HWND hwnd;
@@ -342,6 +343,30 @@ static void test_action_mapping(void)
af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+
+ /* test DIDSAM_NOUSER */
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] != 0, "Expected any username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, DIDSAM_NOUSER);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] == 0, "Expected empty username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
}
if (data.mouse != NULL)
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [39667] Implement dinput device property DIPROP_USERNAME

View File

@ -1,251 +0,0 @@
From afd33fadd45f1073ac0b8734d7003ba46b5d1269 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Aug 2014 20:24:14 +0200
Subject: kernel32: Implement GetFinalPathNameByHandle.
---
.../api-ms-win-core-file-l1-1-0.spec | 4 +-
.../api-ms-win-core-file-l1-2-0.spec | 4 +-
dlls/kernel32/file.c | 182 +++++++++++++++++++++
dlls/kernel32/kernel32.spec | 4 +-
4 files changed, 188 insertions(+), 6 deletions(-)
diff --git a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
index 9e5b809..61e8038 100644
--- a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
+++ b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
index ebfd52e..cddf112 100644
--- a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
+++ b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 006db1c..b3cc8c3 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -2829,3 +2829,185 @@ DWORD WINAPI K32GetDeviceDriverFileNameW(void *image_base, LPWSTR file_name, DWO
return 0;
}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleW (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleW(HANDLE file, LPWSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR buffer[sizeof(OBJECT_NAME_INFORMATION) + MAX_PATH + 1];
+ OBJECT_NAME_INFORMATION *info = (OBJECT_NAME_INFORMATION*)&buffer;
+ WCHAR drive_part[MAX_PATH];
+ DWORD drive_part_len;
+ NTSTATUS status;
+ DWORD result = 0;
+ ULONG dummy;
+ WCHAR *ptr;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ /* check for invalid arguments */
+ if (!path)
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+ else if (file == INVALID_HANDLE_VALUE)
+ {
+ SetLastError( ERROR_INVALID_HANDLE );
+ return 0;
+ }
+ else if (flags & ~(FILE_NAME_OPENED | VOLUME_NAME_GUID | VOLUME_NAME_NONE | VOLUME_NAME_NT))
+ {
+ WARN("Invalid or unsupported flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ /* get object name */
+ status = NtQueryObject( file, ObjectNameInformation, &buffer, sizeof(buffer) - sizeof(WCHAR), &dummy );
+ if (status != STATUS_SUCCESS)
+ {
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return 0;
+ }
+ else if (info->Name.Length < 4 * sizeof(WCHAR) || info->Name.Buffer[0] != '\\' ||
+ info->Name.Buffer[1] != '?' || info->Name.Buffer[2] != '?' || info->Name.Buffer[3] != '\\' )
+ {
+ FIXME("Unexpected object name: %s\n", debugstr_wn(info->Name.Buffer, info->Name.Length / sizeof(WCHAR)));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+
+ /* add terminating null character, remove "\\??\\" */
+ info->Name.Buffer[info->Name.Length / sizeof(WCHAR)] = 0;
+ info->Name.Length -= 4 * sizeof(WCHAR);
+ info->Name.Buffer += 4;
+
+ /* FILE_NAME_OPENED is not supported yet, and would require Wineserver changes */
+ if (flags & FILE_NAME_OPENED)
+ {
+ FIXME("FILE_NAME_OPENED not supported\n");
+ flags &= ~FILE_NAME_OPENED;
+ }
+
+ /* Get information required for VOLUME_NAME_NONE, VOLUME_NAME_GUID and VOLUME_NAME_NT */
+ if (flags == VOLUME_NAME_NONE || flags == VOLUME_NAME_GUID || flags == VOLUME_NAME_NT)
+ {
+ if (!GetVolumePathNameW( info->Name.Buffer, drive_part, MAX_PATH ))
+ return 0;
+
+ drive_part_len = strlenW(drive_part);
+ if (!drive_part_len || drive_part_len > strlenW(info->Name.Buffer) ||
+ drive_part[drive_part_len-1] != '\\' ||
+ strncmpiW( info->Name.Buffer, drive_part, drive_part_len ))
+ {
+ FIXME("Path %s returned by GetVolumePathNameW does not match file path %s\n",
+ debugstr_w(drive_part), debugstr_w(info->Name.Buffer));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+ }
+
+ if (flags == VOLUME_NAME_NONE)
+ {
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(ptr);
+ if (result < charcount)
+ memcpy(path, ptr, (result + 1) * sizeof(WCHAR));
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_GUID)
+ {
+ WCHAR volume_prefix[51];
+
+ /* GetVolumeNameForVolumeMountPointW sets error code on failure */
+ if (!GetVolumeNameForVolumeMountPointW( drive_part, volume_prefix, 50 ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len;
+ result = strlenW(volume_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, volume_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_NT)
+ {
+ WCHAR nt_prefix[MAX_PATH];
+
+ /* QueryDosDeviceW sets error code on failure */
+ drive_part[drive_part_len - 1] = 0;
+ if (!QueryDosDeviceW( drive_part, nt_prefix, MAX_PATH ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(nt_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, nt_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_DOS)
+ {
+ static const WCHAR dos_prefix[] = {'\\','\\','?','\\', '\0'};
+
+ result = strlenW(dos_prefix) + strlenW(info->Name.Buffer);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, dos_prefix);
+ strcatW(path, info->Name.Buffer);
+ }
+ else result++;
+ }
+ else
+ {
+ /* Windows crashes here, but we prefer returning ERROR_INVALID_PARAMETER */
+ WARN("Invalid combination of flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleA (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleA(HANDLE file, LPSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR *str;
+ DWORD result;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ if (!path || !charcount)
+ return GetFinalPathNameByHandleW(file, (LPWSTR)path, charcount, flags);
+
+ str = HeapAlloc( GetProcessHeap(), 0, charcount * sizeof(WCHAR) );
+ if (!str)
+ {
+ SetLastError( ERROR_NOT_ENOUGH_MEMORY );
+ return 0;
+ }
+
+ result = GetFinalPathNameByHandleW(file, (LPWSTR)str, charcount, flags);
+ if (result)
+ {
+ if (result < charcount)
+ {
+ result = FILE_name_WtoA( str, result, path, charcount - 1 );
+ path[result] = 0;
+ }
+ else result--; /* Why does Windows do this? */
+ }
+
+ HeapFree( GetProcessHeap(), 0, str );
+ return result;
+}
\ No newline at end of file
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index bb72041..b7bead0 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -682,8 +682,8 @@
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFileType(long)
-# @ stub GetFinalPathNameByHandleA
-# @ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long)
+@ stdcall GetFinalPathNameByHandleW(long ptr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
--
2.4.0

View File

@ -1 +0,0 @@
Fixes: [34851] Support for GetFinalPathNameByHandle

View File

@ -1,63 +0,0 @@
From ce5aa07ac893aa38e72bb82c3e6dd2496ef4e1f5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Sat, 31 Jan 2015 12:17:54 +0100
Subject: ntoskrnl.exe: Add stub for KeDelayExecutionThread.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
include/ddk/wdm.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 0d6f730..c90b351 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1308,6 +1308,19 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
return NULL;
}
+
+/***********************************************************************
+ * KeDelayExecutionThread (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE WaitMode, BOOLEAN Alertable,
+ PLARGE_INTEGER Interval)
+{
+ FIXME("(%d, %d, %p): stub\n", WaitMode, Alertable, Interval);
+
+ return STATUS_SUCCESS;
+}
+
+
/***********************************************************************
* KeInitializeEvent (NTOSKRNL.EXE.@)
*/
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 25624a6..bae3678 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -518,7 +518,7 @@
@ stub KeClearEvent
@ stub KeConnectInterrupt
@ stub KeDcacheFlushCount
-@ stub KeDelayExecutionThread
+@ stdcall KeDelayExecutionThread(long long ptr)
@ stub KeDeregisterBugCheckCallback
@ stub KeDeregisterBugCheckReasonCallback
@ stub KeDetachProcess
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index f2eb6a5..0d13337 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1219,6 +1219,7 @@ void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,PLARGE_INTEGER);
PKTHREAD WINAPI KeGetCurrentThread(void);
void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
void WINAPI KeQueryTickCount(LARGE_INTEGER*);
--
2.2.2

View File

@ -1,46 +0,0 @@
From 0a2999e8266717769d3a8c245b70861552ad62fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 3 Apr 2015 17:08:20 +0200
Subject: ntoskrnl.exe: Add stub for PsRemoveLoadImageNotifyRoutine.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 23c4c62..2692f47 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2285,6 +2285,15 @@ NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT DeviceObject, ULONG Acti
}
/*****************************************************
+ * PsRemoveLoadImageNotifyRoutine (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI PsRemoveLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
+{
+ FIXME("(%p) stub\n", routine);
+ return STATUS_SUCCESS;
+}
+
+/*****************************************************
* PsSetLoadImageNotifyRoutine (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 4d4320c..a284393 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -899,7 +899,7 @@
@ stub PsReferenceImpersonationToken
@ stub PsReferencePrimaryToken
@ stdcall PsRemoveCreateThreadNotifyRoutine(ptr)
-@ stub PsRemoveLoadImageNotifyRoutine
+@ stdcall PsRemoveLoadImageNotifyRoutine(ptr)
@ stub PsRestoreImpersonation
@ stub PsReturnPoolQuota
@ stub PsReturnProcessNonPagedPoolQuota
--
2.6.2

View File

@ -2,11 +2,9 @@ Fixes: [32186] Add stub for ntoskrnl.KeWaitForMultipleObjects
Fixes: Implement stub for ntoskrnl.IoGetAttachedDeviceReference
Fixes: Implement stubs for ntoskrnl.Ex{Acquire,Release}FastMutexUnsafe
Fixes: Implement stubs for ntoskrnl.ObReferenceObjectByPointer and ntoskrnl.ObDereferenceObject
Fixes: Implement stub for ntoskrnl.KeDelayExecutionThread.
Fixes: Fix wrong defition of ntoskrnl.IoReleaseCancelSpinLock function.
Fixes: Add stub for ntoskrnl.ExAcquireResourceExclusiveLite
Fixes: Add stub for ntoskrnl.ExReleaseResourceForThread
Fixes: Add stub for ntoskrnl.ExDeleteResourceLite
Fixes: Add stub for ntoskrnl.Mm{Map,Unmap}LockedPages
Fixes: Implement ntoskrnl.KeInitializeMutex
Fixes: Add stub for ntoskrnl.PsRemoveLoadImageNotifyRoutine

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "24a730187e08699b51c698d4fed58ba2947f0c5d"
echo "205228eb80089c38b25e7249073021e7806d2bfa"
}
# Show version information
@ -126,7 +126,6 @@ patch_enable_all ()
enable_ddraw_Write_Vtable="$1"
enable_ddraw_ZBufferBitDepths="$1"
enable_ddraw_d3d_execute_buffer="$1"
enable_dinput_DIPROP_USERNAME="$1"
enable_dinput_Initialize="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
@ -154,7 +153,6 @@ patch_enable_all ()
enable_kernel32_CopyFileEx="$1"
enable_kernel32_Cwd_Startup_Info="$1"
enable_kernel32_FreeUserPhysicalPages="$1"
enable_kernel32_GetFinalPathNameByHandle="$1"
enable_kernel32_GetLargestConsoleWindowSize="$1"
enable_kernel32_LocaleNameToLCID="$1"
enable_kernel32_Named_Pipe="$1"
@ -304,7 +302,6 @@ patch_enable_all ()
enable_wined3d_CSMT_Helper="$1"
enable_wined3d_CSMT_Main="$1"
enable_wined3d_DXTn="$1"
enable_wined3d_Geforce_425M="$1"
enable_wined3d_MESA_GPU_Info="$1"
enable_wined3d_Revert_PixelFormat="$1"
enable_wined3d_UnhandledBlendFactor="$1"
@ -326,7 +323,6 @@ patch_enable_all ()
enable_wininet_Internet_Settings="$1"
enable_wininet_ParseX509EncodedCertificateForListBoxEntry="$1"
enable_winmm_Delay_Import_Depends="$1"
enable_winscard_SCardListReaders="$1"
enable_winspool_drv_SetPrinterW="$1"
enable_winsta_WinStationEnumerateW="$1"
enable_wpcap_Dynamic_Linking="$1"
@ -490,9 +486,6 @@ patch_enable ()
ddraw-d3d_execute_buffer)
enable_ddraw_d3d_execute_buffer="$2"
;;
dinput-DIPROP_USERNAME)
enable_dinput_DIPROP_USERNAME="$2"
;;
dinput-Initialize)
enable_dinput_Initialize="$2"
;;
@ -574,9 +567,6 @@ patch_enable ()
kernel32-FreeUserPhysicalPages)
enable_kernel32_FreeUserPhysicalPages="$2"
;;
kernel32-GetFinalPathNameByHandle)
enable_kernel32_GetFinalPathNameByHandle="$2"
;;
kernel32-GetLargestConsoleWindowSize)
enable_kernel32_GetLargestConsoleWindowSize="$2"
;;
@ -1024,9 +1014,6 @@ patch_enable ()
wined3d-DXTn)
enable_wined3d_DXTn="$2"
;;
wined3d-Geforce_425M)
enable_wined3d_Geforce_425M="$2"
;;
wined3d-MESA_GPU_Info)
enable_wined3d_MESA_GPU_Info="$2"
;;
@ -1090,9 +1077,6 @@ patch_enable ()
winmm-Delay_Import_Depends)
enable_winmm_Delay_Import_Depends="$2"
;;
winscard-SCardListReaders)
enable_winscard_SCardListReaders="$2"
;;
winspool.drv-SetPrinterW)
enable_winspool_drv_SetPrinterW="$2"
;;
@ -2899,21 +2883,6 @@ if test "$enable_ddraw_d3d_execute_buffer" -eq 1; then
) >> "$patchlist"
fi
# Patchset dinput-DIPROP_USERNAME
# |
# | This patchset fixes the following Wine bugs:
# | * [#39667] Implement dinput device property DIPROP_USERNAME
# |
# | Modified files:
# | * dlls/dinput/device.c, dlls/dinput/device_private.h, dlls/dinput8/tests/device.c
# |
if test "$enable_dinput_DIPROP_USERNAME" -eq 1; then
patch_apply dinput-DIPROP_USERNAME/0001-dinput-Implement-device-property-DIPROP_USERNAME.patch
(
echo '+ { "Bernhard Übelacker", "dinput: Implement device property DIPROP_USERNAME.", 1 },';
) >> "$patchlist"
fi
# Patchset dinput-Initialize
# |
# | This patchset fixes the following Wine bugs:
@ -3463,22 +3432,6 @@ if test "$enable_kernel32_FreeUserPhysicalPages" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-GetFinalPathNameByHandle
# |
# | This patchset fixes the following Wine bugs:
# | * [#34851] Support for GetFinalPathNameByHandle
# |
# | Modified files:
# | * dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec, dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-
# | file-l1-2-0.spec, dlls/kernel32/file.c, dlls/kernel32/kernel32.spec
# |
if test "$enable_kernel32_GetFinalPathNameByHandle" -eq 1; then
patch_apply kernel32-GetFinalPathNameByHandle/0001-kernel32-Implement-GetFinalPathNameByHandle.patch
(
echo '+ { "Michael Müller", "kernel32: Implement GetFinalPathNameByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-GetLargestConsoleWindowSize
# |
# | This patchset fixes the following Wine bugs:
@ -4553,27 +4506,23 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
patch_apply ntoskrnl-Stubs/0002-ntoskrnl.exe-Add-stub-for-IoGetAttachedDeviceReferen.patch
patch_apply ntoskrnl-Stubs/0003-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch
patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch
patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Add-stub-for-KeDelayExecutionThread.patch
patch_apply ntoskrnl-Stubs/0006-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch
patch_apply ntoskrnl-Stubs/0007-ntoskrnl.exe-Improve-KeInitializeSemaphore-stub.patch
patch_apply ntoskrnl-Stubs/0008-ntoskrnl.exe-Improve-KeInitializeTimerEx-stub.patch
patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Fix-IoReleaseCancelSpinLock-argument.patch
patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch
patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Implement-KeInitializeMutex.patch
patch_apply ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-stub-for-PsRemoveLoadImageNotifyRou.patch
(
echo '+ { "Austin English", "ntoskrnl.exe: Add KeWaitForMultipleObjects stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for IoGetAttachedDeviceReference.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ObReferenceObjectByPointer and ObDereferenceObject.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for KeDelayExecutionThread.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeSemaphore stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeTimerEx stub.", 1 },';
echo '+ { "Christian Costa", "ntoskrnl.exe: Fix IoReleaseCancelSpinLock argument.", 1 },';
echo '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },';
echo '+ { "Michael Müller", "ntoskrnl.exe: Add stub for PsRemoveLoadImageNotifyRoutine.", 1 },';
) >> "$patchlist"
fi
@ -4951,25 +4900,17 @@ fi
# Patchset server-Parent_Process
# |
# | This patchset fixes the following Wine bugs:
# | * [#37087] Do not hold reference on parent process in wineserver
# |
# | Modified files:
# | * dlls/kernel32/tests/process.c, server/console.c, server/process.c, server/process.h, server/snapshot.c, server/thread.c,
# | server/token.c
# | * dlls/kernel32/tests/process.c, server/process.c, server/token.c
# |
if test "$enable_server_Parent_Process" -eq 1; then
patch_apply server-Parent_Process/0001-kernel32-tests-Remove-unnecessary-call-to-GetExitCod.patch
patch_apply server-Parent_Process/0002-kernel32-tests-Add-test-for-process-object-destructi.patch
patch_apply server-Parent_Process/0003-server-token_duplicate-should-not-reference-the-orig.patch
patch_apply server-Parent_Process/0004-server-Increase-size-of-PID-table-to-512-to-reduce-r.patch
patch_apply server-Parent_Process/0005-server-Do-not-hold-reference-on-parent-process.patch
patch_apply server-Parent_Process/0002-server-token_duplicate-should-not-reference-the-orig.patch
patch_apply server-Parent_Process/0003-server-Increase-size-of-PID-table-to-512-to-reduce-r.patch
(
echo '+ { "Sebastian Lackner", "kernel32/tests: Remove unnecessary call to GetExitCodeProcess in process tests.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add test for process object destruction.", 1 },';
echo '+ { "Sebastian Lackner", "server: Token_duplicate should not reference the original token, which will get destroyed on process exit.", 1 },';
echo '+ { "Sebastian Lackner", "server: Increase size of PID table to 512 to reduce risk of collisions.", 1 },';
echo '+ { "Sebastian Lackner", "server: Do not hold reference on parent process.", 1 },';
) >> "$patchlist"
fi
@ -5839,21 +5780,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Geforce_425M
# |
# | This patchset fixes the following Wine bugs:
# | * [#35054] Add wined3d detection for GeForce GT 425M
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Geforce_425M" -eq 1; then
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
(
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-MESA_GPU_Info
# |
# | This patchset has the following (direct or indirect) dependencies:
@ -6550,21 +6476,6 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then
) >> "$patchlist"
fi
# Patchset winscard-SCardListReaders
# |
# | This patchset fixes the following Wine bugs:
# | * [#26978] Add stub for winscard.SCardListReadersA/W
# |
# | Modified files:
# | * dlls/winscard/winscard.c, dlls/winscard/winscard.spec
# |
if test "$enable_winscard_SCardListReaders" -eq 1; then
patch_apply winscard-SCardListReaders/0001-winscard-add-stubs-for-SCardListReadersA-W.patch
(
echo '+ { "Austin English", "winscard: Add stubs for SCardListReadersA/W.", 1 },';
) >> "$patchlist"
fi
# Patchset winspool.drv-SetPrinterW
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,236 +0,0 @@
From c1fbb588bfe27085e0751c561c76339938575d56 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 12 Dec 2015 15:08:40 +0100
Subject: kernel32/tests: Add test for process object destruction.
---
dlls/kernel32/tests/process.c | 159 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 159 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 5e7fecb..d7518f7 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -33,11 +33,14 @@
#include "wincon.h"
#include "winnls.h"
#include "winternl.h"
+#include "tlhelp32.h"
#include "wine/test.h"
/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
+/* THREAD_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
+#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff)
#define expect_eq_d(expected, actual) \
do { \
@@ -80,6 +83,11 @@ static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, P
static BOOL (WINAPI *pProcessIdToSessionId)(DWORD,DWORD*);
static DWORD (WINAPI *pWTSGetActiveConsoleSessionId)(void);
static BOOL (WINAPI *pGetLogicalProcessorInformationEx)(LOGICAL_PROCESSOR_RELATIONSHIP,SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*,DWORD*);
+static HANDLE (WINAPI *pCreateToolhelp32Snapshot)(DWORD, DWORD);
+static BOOL (WINAPI *pProcess32First)(HANDLE, PROCESSENTRY32*);
+static BOOL (WINAPI *pProcess32Next)(HANDLE, PROCESSENTRY32*);
+static BOOL (WINAPI *pThread32First)(HANDLE, THREADENTRY32*);
+static BOOL (WINAPI *pThread32Next)(HANDLE, THREADENTRY32*);
/* ############################### */
static char base[MAX_PATH];
@@ -239,6 +247,11 @@ static BOOL init(void)
pProcessIdToSessionId = (void *)GetProcAddress(hkernel32, "ProcessIdToSessionId");
pWTSGetActiveConsoleSessionId = (void *)GetProcAddress(hkernel32, "WTSGetActiveConsoleSessionId");
pGetLogicalProcessorInformationEx = (void *)GetProcAddress(hkernel32, "GetLogicalProcessorInformationEx");
+ pCreateToolhelp32Snapshot = (void *)GetProcAddress(hkernel32, "CreateToolhelp32Snapshot");
+ pProcess32First = (void *)GetProcAddress(hkernel32, "Process32First");
+ pProcess32Next = (void *)GetProcAddress(hkernel32, "Process32Next");
+ pThread32First = (void *)GetProcAddress(hkernel32, "Thread32First");
+ pThread32Next = (void *)GetProcAddress(hkernel32, "Thread32Next");
return TRUE;
}
@@ -290,6 +303,8 @@ static void doChild(const char* file, const char* option)
char bufA[MAX_PATH];
WCHAR bufW[MAX_PATH];
HANDLE hFile = CreateFileA(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
+ HANDLE snapshot;
+ PROCESSENTRY32 pe;
BOOL ret;
if (hFile == INVALID_HANDLE_VALUE) return;
@@ -344,6 +359,26 @@ static void doChild(const char* file, const char* option)
childPrintf(hFile, "CommandLineA=%s\n", encodeA(GetCommandLineA()));
childPrintf(hFile, "CommandLineW=%s\n\n", encodeW(GetCommandLineW()));
+ /* output toolhelp information */
+ snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError());
+ memset(&pe, 0, sizeof(pe));
+ pe.dwSize = sizeof(pe);
+ if (pProcess32First(snapshot, &pe))
+ {
+ while (pe.th32ProcessID != GetCurrentProcessId())
+ if (!pProcess32Next(snapshot, &pe)) break;
+ }
+ CloseHandle(snapshot);
+ ok(pe.th32ProcessID == GetCurrentProcessId(), "failed to find current process in snapshot\n");
+ childPrintf(hFile,
+ "[Toolhelp]\ncntUsage=%u\nth32DefaultHeapID=%lu\n"
+ "th32ModuleID=%u\ncntThreads=%u\nth32ParentProcessID=%u\n"
+ "pcPriClassBase=%u\ndwFlags=%u\nszExeFile=%s\n\n",
+ pe.cntUsage, pe.th32DefaultHeapID, pe.th32ModuleID,
+ pe.cntThreads, pe.th32ParentProcessID, pe.pcPriClassBase,
+ pe.dwFlags, encodeA(pe.szExeFile));
+
/* output of environment (Ansi) */
ptrA_save = ptrA = GetEnvironmentStringsA();
if (ptrA)
@@ -1068,6 +1103,112 @@ static void test_Directory(void)
ok(!TerminateProcess(info.hProcess, 0), "Child process should not exist\n");
}
+static void test_Toolhelp(void)
+{
+ char buffer[MAX_PATH];
+ STARTUPINFOA startup;
+ PROCESS_INFORMATION info;
+ HANDLE process, thread, snapshot;
+ PROCESSENTRY32 pe;
+ THREADENTRY32 te;
+ DWORD ret;
+ int i;
+
+ memset(&startup, 0, sizeof(startup));
+ startup.cb = sizeof(startup);
+ startup.dwFlags = STARTF_USESHOWWINDOW;
+ startup.wShowWindow = SW_SHOWNORMAL;
+
+ get_file_name(resfile);
+ sprintf(buffer, "\"%s\" tests/process.c dump \"%s\"", selfname, resfile);
+ ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed\n");
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+ CloseHandle(info.hProcess);
+ CloseHandle(info.hThread);
+
+ WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ okChildInt("Toolhelp", "cntUsage", 0);
+ okChildInt("Toolhelp", "th32DefaultHeapID", 0);
+ okChildInt("Toolhelp", "th32ModuleID", 0);
+ okChildInt("Toolhelp", "th32ParentProcessID", GetCurrentProcessId());
+ todo_wine okChildInt("Toolhelp", "pcPriClassBase", 8);
+ okChildInt("Toolhelp", "dwFlags", 0);
+
+ release_memory();
+ DeleteFileA(resfile);
+
+ get_file_name(resfile);
+ sprintf(buffer, "\"%s\" tests/process.c nested \"%s\"", selfname, resfile);
+ ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed\n");
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+
+ process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, info.dwProcessId);
+ ok(process != NULL, "OpenProcess failed %u\n", GetLastError());
+ CloseHandle(process);
+
+ CloseHandle(info.hProcess);
+ CloseHandle(info.hThread);
+
+ for (i = 0; i < 20; i++)
+ {
+ SetLastError(0xdeadbeef);
+ process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, info.dwProcessId);
+ ok(process || GetLastError() == ERROR_INVALID_PARAMETER, "OpenProcess failed %u\n", GetLastError());
+ if (!process) break;
+ CloseHandle(process);
+ Sleep(100);
+ }
+ /* The following test fails randomly on some Windows versions */
+ todo_wine ok(i < 20 || broken(i == 20), "process object not released\n");
+
+ snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError());
+ memset(&pe, 0, sizeof(pe));
+ pe.dwSize = sizeof(pe);
+ if (pProcess32First(snapshot, &pe))
+ {
+ while (pe.th32ParentProcessID != info.dwProcessId)
+ if (!pProcess32Next(snapshot, &pe)) break;
+ }
+ CloseHandle(snapshot);
+ ok(pe.th32ParentProcessID == info.dwProcessId, "failed to find nested child process\n");
+
+ process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, pe.th32ProcessID);
+ ok(process != NULL, "OpenProcess failed %u\n", GetLastError());
+
+ snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
+ ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError());
+ memset(&te, 0, sizeof(te));
+ te.dwSize = sizeof(te);
+ if (pThread32First(snapshot, &te))
+ {
+ while (te.th32OwnerProcessID != pe.th32ProcessID)
+ if (!pThread32Next(snapshot, &te)) break;
+ }
+ CloseHandle(snapshot);
+ ok(te.th32OwnerProcessID == pe.th32ProcessID, "failed to find suspended thread\n");
+
+ thread = OpenThread(THREAD_ALL_ACCESS_NT4, FALSE, te.th32ThreadID);
+ ok(thread != NULL, "OpenThread failed %u\n", GetLastError());
+ ret = ResumeThread(thread);
+ ok(ret == 1, "expected 1, got %u\n", ret);
+ CloseHandle(thread);
+
+ ok(WaitForSingleObject(process, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+ CloseHandle(process);
+
+ WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ okChildInt("Toolhelp", "cntUsage", 0);
+ okChildInt("Toolhelp", "th32DefaultHeapID", 0);
+ okChildInt("Toolhelp", "th32ModuleID", 0);
+ okChildInt("Toolhelp", "th32ParentProcessID", info.dwProcessId);
+ todo_wine okChildInt("Toolhelp", "pcPriClassBase", 8);
+ okChildInt("Toolhelp", "dwFlags", 0);
+
+ release_memory();
+ DeleteFileA(resfile);
+}
+
static BOOL is_str_env_drive_dir(const char* str)
{
return str[0] == '=' && str[1] >= 'A' && str[1] <= 'Z' && str[2] == ':' &&
@@ -3024,6 +3165,23 @@ START_TEST(process)
Sleep(100);
return;
}
+ else if (!strcmp(myARGV[2], "nested") && myARGC >= 4)
+ {
+ char buffer[MAX_PATH];
+ STARTUPINFOA startup;
+ PROCESS_INFORMATION info;
+
+ memset(&startup, 0, sizeof(startup));
+ startup.cb = sizeof(startup);
+ startup.dwFlags = STARTF_USESHOWWINDOW;
+ startup.wShowWindow = SW_SHOWNORMAL;
+
+ sprintf(buffer, "\"%s\" tests/process.c dump \"%s\"", selfname, myARGV[3]);
+ ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startup, &info), "CreateProcess\n");
+ CloseHandle(info.hProcess);
+ CloseHandle(info.hThread);
+ return;
+ }
ok(0, "Unexpected command %s\n", myARGV[2]);
return;
@@ -3034,6 +3192,7 @@ START_TEST(process)
test_Startup();
test_CommandLine();
test_Directory();
+ test_Toolhelp();
test_Environment();
test_SuspendFlag();
test_DebuggingFlag();
--
2.7.1

View File

@ -1,127 +0,0 @@
From 8d0b9020200ee933ed02fae3235fee2ade651394 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 10 Dec 2015 05:55:41 +0100
Subject: server: Do not hold reference on parent process.
---
dlls/kernel32/tests/process.c | 2 +-
server/console.c | 3 +--
server/process.c | 7 +++----
server/process.h | 2 +-
server/snapshot.c | 2 +-
server/thread.c | 2 +-
6 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 8e0f0c2..9c07d09 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -1158,7 +1158,7 @@ static void test_Toolhelp(void)
Sleep(100);
}
/* The following test fails randomly on some Windows versions */
- todo_wine ok(i < 20 || broken(i == 20), "process object not released\n");
+ ok(i < 20 || broken(i == 20), "process object not released\n");
snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError());
diff --git a/server/console.c b/server/console.c
index a57b2fe..3d0e0e0 100644
--- a/server/console.c
+++ b/server/console.c
@@ -1425,13 +1425,12 @@ DECL_HANDLER(alloc_console)
case 0:
/* renderer is current, console to be attached to parent process */
renderer = current;
- if (!(process = current->process->parent))
+ if (!(process = get_process_from_id( current->process->parent_id )))
{
if (fd != -1) close( fd );
set_error( STATUS_ACCESS_DENIED );
return;
}
- grab_object( process );
attach = 1;
break;
case 0xffffffff:
diff --git a/server/process.c b/server/process.c
index 1b41037..8ecc32e 100644
--- a/server/process.c
+++ b/server/process.c
@@ -504,7 +504,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
close( fd );
goto error;
}
- process->parent = NULL;
+ process->parent_id = 0;
process->debugger = NULL;
process->handles = NULL;
process->msg_fd = NULL;
@@ -556,7 +556,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
else
{
struct process *parent = parent_thread->process;
- process->parent = (struct process *)grab_object( parent );
+ process->parent_id = parent->id;
process->handles = inherit_all ? copy_handle_table( process, parent )
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
@@ -623,7 +623,6 @@ static void process_destroy( struct object *obj )
release_object( process->job );
}
if (process->console) release_object( process->console );
- if (process->parent) release_object( process->parent );
if (process->msg_fd) release_object( process->msg_fd );
list_remove( &process->entry );
if (process->idle_event) release_object( process->idle_event );
@@ -1352,7 +1351,7 @@ DECL_HANDLER(get_process_info)
if ((process = get_process_from_handle( req->handle, PROCESS_QUERY_LIMITED_INFORMATION )))
{
reply->pid = get_process_id( process );
- reply->ppid = process->parent ? get_process_id( process->parent ) : 0;
+ reply->ppid = process->parent_id;
reply->exit_code = process->exit_code;
reply->priority = process->priority;
reply->affinity = process->affinity;
diff --git a/server/process.h b/server/process.h
index fa7f60d..34b6ea6 100644
--- a/server/process.h
+++ b/server/process.h
@@ -56,7 +56,7 @@ struct process
{
struct object obj; /* object header */
struct list entry; /* entry in system-wide process list */
- struct process *parent; /* parent process */
+ process_id_t parent_id; /* parent process id (at the time of creation) */
struct list thread_list; /* thread list */
struct thread *debugger; /* thread debugging this process */
struct handle_table *handles; /* handle entries */
diff --git a/server/snapshot.c b/server/snapshot.c
index dd00bd1..bec281d 100644
--- a/server/snapshot.c
+++ b/server/snapshot.c
@@ -113,7 +113,7 @@ static int snapshot_next_process( struct snapshot *snapshot, struct next_process
ptr = &snapshot->processes[snapshot->process_pos++];
reply->count = ptr->count;
reply->pid = get_process_id( ptr->process );
- reply->ppid = ptr->process->parent ? get_process_id( ptr->process->parent ) : 0;
+ reply->ppid = ptr->process->parent_id;
reply->threads = ptr->threads;
reply->priority = ptr->priority;
reply->handles = ptr->handles;
diff --git a/server/thread.c b/server/thread.c
index bad2231..176cf44 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1300,7 +1300,7 @@ DECL_HANDLER(init_thread)
process->peb = req->entry;
process->cpu = req->cpu;
reply->info_size = init_process( current );
- if (!process->parent)
+ if (!process->parent_id)
process->affinity = current->affinity = get_thread_affinity( current );
else
set_thread_affinity( current, current->affinity );
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [37087] Do not hold reference on parent process in wineserver

View File

@ -1,4 +1,4 @@
From 0c74d61fdaa16fbb70f443f6863d864024b8e615 Mon Sep 17 00:00:00 2001
From 5ccc071c84bdd923bf73b04c4affe5a5775bc9cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 13:30:59 +0100
Subject: wined3d: Use resource buffer mapping facilities in surfaces.
@ -9,10 +9,10 @@ Subject: wined3d: Use resource buffer mapping facilities in surfaces.
2 files changed, 23 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 5f0a98e..dda77f0 100644
index 16c4ab9..5204fee 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -544,6 +544,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -560,6 +560,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
case WINED3D_LOCATION_SYSMEM:
return resource->heap_memory;
@ -25,7 +25,7 @@ index 5f0a98e..dda77f0 100644
default:
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return NULL;
@@ -566,6 +572,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -582,6 +588,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
return;
case WINED3D_LOCATION_SYSMEM:
@ -35,7 +35,7 @@ index 5f0a98e..dda77f0 100644
default:
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 62f74bd..583fa59 100644
index 30cdc81..b56092b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -716,36 +716,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
@ -75,7 +75,7 @@ index 62f74bd..583fa59 100644
if (surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
{
TRACE("Not dirtified, nothing to do.\n");
@@ -2623,6 +2597,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
@@ -2610,6 +2584,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{
@ -84,7 +84,7 @@ index 62f74bd..583fa59 100644
TRACE("surface %p.\n", surface);
if (!surface->resource.map_count)
@@ -2632,6 +2608,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
@@ -2619,6 +2595,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
}
--surface->resource.map_count;
@ -97,7 +97,7 @@ index 62f74bd..583fa59 100644
surface->surface_ops->surface_unmap(surface);
return WINED3D_OK;
@@ -2643,8 +2625,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2630,8 +2612,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
const struct wined3d_format *format = surface->resource.format;
unsigned int fmt_flags = surface->container->resource.format_flags;
struct wined3d_device *device = surface->resource.device;
@ -107,9 +107,9 @@ index 62f74bd..583fa59 100644
BYTE *base_memory;
TRACE("surface %p, map_desc %p, box %p, flags %#x.\n",
@@ -2686,6 +2667,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
}
@@ -2675,6 +2656,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
flags = wined3d_resource_sanitize_map_flags(&surface->resource, flags);
+ if (device->d3d_initialized)
+ context = context_acquire(device, NULL);
@ -117,7 +117,7 @@ index 62f74bd..583fa59 100644
surface_prepare_map_memory(surface);
if (flags & WINED3D_MAP_DISCARD)
{
@@ -2695,51 +2679,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2684,51 +2668,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
@ -173,5 +173,5 @@ index 62f74bd..583fa59 100644
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
--
2.6.0
2.8.0

View File

@ -1,4 +1,4 @@
From 4ca448b9c9fb4ed0e94eaa82b98d7677d486a92c Mon Sep 17 00:00:00 2001
From 2dfc41f8c047b6363d9bb0d31c8589d6ea6447af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 18:00:23 +0200
Subject: wined3d: Use resource_map for surface_map.
@ -23,10 +23,10 @@ index 7743a40..74cb6c1 100644
if (device->d3d_initialized)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f00f6c3..3f7f54c 100644
index 1f003ba..3e17f33 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2428,28 +2428,18 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
@@ -2406,28 +2406,18 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{
@ -60,7 +60,7 @@ index f00f6c3..3f7f54c 100644
}
HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2457,18 +2447,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2435,18 +2425,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
const struct wined3d_format *format = surface->resource.format;
unsigned int fmt_flags = surface->container->resource.format_flags;
@ -79,7 +79,7 @@ index f00f6c3..3f7f54c 100644
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
&& !surface_check_block_align(surface, box))
@@ -2480,11 +2458,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2458,11 +2436,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
return WINED3DERR_INVALIDCALL;
}
@ -91,9 +91,9 @@ index f00f6c3..3f7f54c 100644
/* Performance optimization: Count how often a surface is mapped, if it is
* mapped regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
@@ -2500,72 +2473,22 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
}
@@ -2480,72 +2453,22 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
flags = wined3d_resource_sanitize_map_flags(&surface->resource, flags);
- if (device->d3d_initialized)
- context = context_acquire(device, NULL);
@ -189,5 +189,5 @@ index a237bf6..0e97cd1 100644
static ULONG volume_resource_incref(struct wined3d_resource *resource)
--
2.6.2
2.8.0

View File

@ -3720,7 +3720,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -5563,9 +5563,15 @@
@@ -5604,9 +5604,15 @@
DebugBreak();
}
@ -5959,15 +5959,15 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
/* Performance optimization: Count how often a surface is mapped, if it is
* mapped regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
@@ -2472,6 +3037,7 @@
}
}
@@ -2474,6 +3039,7 @@
flags = wined3d_resource_sanitize_map_flags(&surface->resource, flags);
+#if defined(STAGING_CSMT)
if (box)
{
surface->lockedRect.left = box->left;
@@ -2553,6 +3119,179 @@
@@ -2555,6 +3121,179 @@
void wined3d_surface_releasedc_cs(struct wined3d_surface *surface)
{
if (surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY || (surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
@ -6147,7 +6147,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& surface->resource.map_binding != WINED3D_LOCATION_DIB))
{
/* The game Salammbo modifies the surface contents without mapping the surface between
@@ -2568,6 +3307,7 @@
@@ -2570,6 +3309,7 @@
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@ -6155,7 +6155,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
if (context)
@@ -2593,6 +3333,13 @@
@@ -2595,6 +3335,13 @@
surface->flags &= ~SFLAG_DCINUSE;
wined3d_cs_emit_releasedc(surface->resource.device->cs, surface);
@ -6169,7 +6169,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -2609,9 +3356,14 @@
@@ -2611,9 +3358,14 @@
int i;
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@ -6184,7 +6184,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface != old_ctx->current_rt)
{
@@ -2651,8 +3403,13 @@
@@ -2653,8 +3405,13 @@
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@ -6198,7 +6198,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2669,6 +3426,10 @@
@@ -2671,6 +3428,10 @@
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
@ -6209,7 +6209,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -2895,8 +3656,13 @@
@@ -2897,8 +3658,13 @@
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -6223,7 +6223,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Uses the hardware to stretch and flip the image */
@@ -2964,7 +3730,11 @@
@@ -2966,7 +3732,11 @@
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -6235,7 +6235,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3161,6 +3931,7 @@
@@ -3163,6 +3933,7 @@
checkGLcall("glDeleteTextures(1, &backup)");
}
@ -6243,7 +6243,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.cs_multithreaded)
gl_info->gl_ops.gl.p_glFinish();
else if (wined3d_settings.strict_draw_ordering)
@@ -3172,6 +3943,17 @@
@@ -3174,6 +3945,17 @@
* and has a drawable, this path is never entered. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
@ -6261,7 +6261,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3226,9 +4008,15 @@
@@ -3228,9 +4010,15 @@
gl_info = context->gl_info;
@ -6277,7 +6277,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_texture_load(src_surface->container, context, FALSE);
/* Activate the destination context, set it up for blitting */
@@ -3271,9 +4059,13 @@
@@ -3273,9 +4061,13 @@
/* Leave the opengl state valid for blitting */
device->blitter->unset_shader(context->gl_info);
@ -6291,7 +6291,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|| (dst_surface->container->swapchain
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
@@ -3303,8 +4095,13 @@
@@ -3305,8 +4097,13 @@
enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
@ -6305,7 +6305,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
@@ -3495,6 +4292,7 @@
@@ -3497,6 +4294,7 @@
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@ -6313,7 +6313,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB))
|| (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
&& (location & WINED3D_LOCATION_TEXTURE_RGB)))
@@ -3503,6 +4301,15 @@
@@ -3505,6 +4303,15 @@
surface->ds_current_size.cx = w;
surface->ds_current_size.cy = h;
surface->resource.locations = location;
@ -6329,7 +6329,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3517,7 +4324,11 @@
@@ -3519,7 +4326,11 @@
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@ -6341,7 +6341,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3544,6 +4355,7 @@
@@ -3546,6 +4357,7 @@
}
wined3d_surface_prepare(surface, context, location);
@ -6349,7 +6349,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
@@ -3558,6 +4370,22 @@
@@ -3560,6 +4372,22 @@
{
FIXME("No up to date depth stencil location.\n");
surface->resource.locations |= location;
@ -6372,7 +6372,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3621,9 +4449,13 @@
@@ -3623,9 +4451,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -6386,7 +6386,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else if (location == WINED3D_LOCATION_DRAWABLE)
@@ -3639,9 +4471,13 @@
@@ -3641,9 +4473,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -6400,7 +6400,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else
@@ -3649,6 +4485,7 @@
@@ -3651,6 +4487,7 @@
ERR("Invalid location (%#x) specified.\n", location);
}
@ -6408,7 +6408,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.locations |= location;
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
@@ -3681,6 +4518,124 @@
@@ -3683,6 +4520,124 @@
FIXME("Can't load surface %p with location flags %s into sysmem.\n",
surface, wined3d_debug_location(surface->resource.locations));
@ -6533,7 +6533,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3689,12 +4644,14 @@
@@ -3691,12 +4646,14 @@
{
RECT r;
@ -6548,7 +6548,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& wined3d_resource_is_offscreen(&surface->container->resource))
{
@@ -3703,7 +4660,11 @@
@@ -3705,7 +4662,11 @@
}
surface_get_rect(surface, NULL, &r);
@ -6560,7 +6560,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -3718,6 +4679,7 @@
@@ -3720,6 +4681,7 @@
struct wined3d_device *device = surface->resource.device;
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
@ -6568,7 +6568,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
UINT width, src_row_pitch, src_slice_pitch, dst_pitch;
struct wined3d_bo_address data;
struct wined3d_format format;
@@ -3744,6 +4706,24 @@
@@ -3746,6 +4708,24 @@
}
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
@ -6593,7 +6593,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
@@ -3759,6 +4739,7 @@
@@ -3761,6 +4741,7 @@
return WINED3D_OK;
}
@ -6601,7 +6601,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
&& (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
@@ -3766,6 +4747,15 @@
@@ -3768,6 +4749,15 @@
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ?
@ -6617,7 +6617,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -3780,6 +4770,7 @@
@@ -3782,6 +4772,7 @@
if (srgb)
{
@ -6625,7 +6625,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding))
== WINED3D_LOCATION_TEXTURE_RGB)
{
@@ -3814,6 +4805,42 @@
@@ -3816,6 +4807,42 @@
width = surface->resource.width;
wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
@ -6668,7 +6668,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -3822,7 +4849,11 @@
@@ -3824,7 +4851,11 @@
/* 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. */
@ -6680,7 +6680,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
TRACE("Removing the pbo attached to surface %p.\n", surface);
@@ -3831,6 +4862,7 @@
@@ -3833,6 +4864,7 @@
else
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
@ -6688,7 +6688,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_prepare_map_memory(&surface->resource, context);
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
wined3d_resource_free_bo(&surface->resource);
@@ -3838,6 +4870,14 @@
@@ -3840,6 +4872,14 @@
}
wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data);
@ -6703,7 +6703,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -3852,9 +4892,15 @@
@@ -3854,9 +4894,15 @@
context_release(context);
return E_OUTOFMEMORY;
}
@ -6719,7 +6719,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
data.addr = mem;
}
else if (conversion)
@@ -3874,6 +4920,7 @@
@@ -3876,6 +4922,7 @@
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -6727,7 +6727,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
width, height, palette, &texture->async.gl_color_key);
src_row_pitch = dst_pitch;
@@ -3882,6 +4929,16 @@
@@ -3884,6 +4931,16 @@
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
@ -6744,7 +6744,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HeapFree(GetProcessHeap(), 0, mem);
@@ -3895,11 +4952,19 @@
@@ -3897,11 +4954,19 @@
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
DWORD src_location;
@ -6764,7 +6764,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
else /* surface_blt_fbo will load the source location if necessary. */
src_location = WINED3D_LOCATION_TEXTURE_RGB;
@@ -3908,41 +4973,87 @@
@@ -3910,41 +4975,87 @@
surface, src_location, &rect, surface, dst_location, &rect);
}
@ -6861,7 +6861,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
switch (location)
@@ -3956,7 +5067,11 @@
@@ -3958,7 +5069,11 @@
case WINED3D_LOCATION_DRAWABLE:
if (FAILED(hr = surface_load_drawable(surface, context)))
@ -6873,7 +6873,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -3968,7 +5083,11 @@
@@ -3970,7 +5085,11 @@
case WINED3D_LOCATION_TEXTURE_SRGB:
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
@ -6885,7 +6885,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
default:
@@ -3976,12 +5095,21 @@
@@ -3978,12 +5097,21 @@
break;
}
@ -6907,7 +6907,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
@@ -4090,6 +5218,7 @@
@@ -4092,6 +5220,7 @@
const RECT *dst_rect, const struct wined3d_color *color)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -6915,7 +6915,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view, *view_ptr = &view;
struct wined3d_fb_state fb = {&view_ptr, NULL, 1};
struct wined3d_texture *texture = dst_surface->container;
@@ -4110,6 +5239,21 @@
@@ -4112,6 +5241,21 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@ -6937,7 +6937,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4118,6 +5262,7 @@
@@ -4120,6 +5264,7 @@
const RECT *dst_rect, float depth)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -6945,7 +6945,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view;
struct wined3d_fb_state fb = {NULL, &view};
struct wined3d_texture *texture = dst_surface->container;
@@ -4133,6 +5278,20 @@
@@ -4135,6 +5280,20 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0);
@ -6966,7 +6966,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4169,8 +5328,13 @@
@@ -4171,8 +5330,13 @@
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -6980,7 +6980,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
const struct blit_shader ffp_blit = {
@@ -4326,6 +5490,7 @@
@@ -4328,6 +5492,7 @@
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
@ -6988,7 +6988,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
unsigned int src_fmt_flags, dst_fmt_flags;
@@ -4360,6 +5525,28 @@
@@ -4362,6 +5527,28 @@
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
src_data = dst_data;
src_row_pitch = dst_row_pitch;
@ -7017,7 +7017,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = dst_surface->resource.format;
dst_format = src_format;
dst_fmt_flags = dst_surface->container->resource.format_flags;
@@ -4371,12 +5558,14 @@
@@ -4373,12 +5560,14 @@
dst_fmt_flags = dst_surface->container->resource.format_flags;
if (src_surface)
{
@ -7032,7 +7032,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_surface->resource.format->id != src_surface->resource.format->id)
{
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
@@ -4387,9 +5576,13 @@
@@ -4389,9 +5578,13 @@
}
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
}
@ -7046,7 +7046,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = src_surface->resource.format;
src_fmt_flags = src_surface->container->resource.format_flags;
}
@@ -4399,8 +5592,12 @@
@@ -4401,8 +5594,12 @@
src_fmt_flags = dst_fmt_flags;
}
@ -7059,7 +7059,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
bpp = dst_surface->resource.format->byte_count;
@@ -4411,12 +5608,24 @@
@@ -4413,12 +5610,24 @@
width = (dst_rect->right - dst_rect->left) * bpp;
if (src_surface)
@ -7084,7 +7084,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
{
@@ -4451,7 +5660,11 @@
@@ -4453,7 +5662,11 @@
}
hr = surface_cpu_blt_compressed(sbase, dbuf,
@ -7096,7 +7096,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format, flags, fx);
goto release;
}
@@ -4459,7 +5672,11 @@
@@ -4461,7 +5674,11 @@
/* First, all the 'source-less' blits */
if (flags & WINEDDBLT_COLORFILL)
{
@ -7108,7 +7108,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
flags &= ~WINEDDBLT_COLORFILL;
}
@@ -4509,6 +5726,7 @@
@@ -4511,6 +5728,7 @@
for (y = 0; y < dstheight; ++y)
{
memcpy(dbuf, sbuf, width);
@ -7116,7 +7116,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf += src_row_pitch;
dbuf += dst_row_pitch;
}
@@ -4522,6 +5740,21 @@
@@ -4524,6 +5742,21 @@
{
sbuf -= src_row_pitch;
dbuf -= dst_row_pitch;
@ -7138,7 +7138,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
memcpy(dbuf, sbuf, width);
}
}
@@ -4531,8 +5764,13 @@
@@ -4533,8 +5766,13 @@
for (y = 0; y < dstheight; ++y)
{
memmove(dbuf, sbuf, width);
@ -7152,7 +7152,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4541,9 +5779,15 @@
@@ -4543,9 +5781,15 @@
/* Stretching in y direction only. */
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7168,7 +7168,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4553,6 +5797,7 @@
@@ -4555,6 +5799,7 @@
int last_sy = -1;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7176,7 +7176,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf = sbase + (sy >> 16) * src_row_pitch;
if ((sy >> 16) == (last_sy >> 16))
@@ -4560,6 +5805,15 @@
@@ -4562,6 +5807,15 @@
/* This source row is the same as last source row -
* Copy the already stretched row. */
memcpy(dbuf, dbuf - dst_row_pitch, width);
@ -7192,7 +7192,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4606,6 +5860,7 @@
@@ -4608,6 +5862,7 @@
}
#undef STRETCH_ROW
}
@ -7200,7 +7200,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dbuf += dst_row_pitch;
last_sy = sy;
}
@@ -4614,6 +5869,16 @@
@@ -4616,6 +5871,16 @@
else
{
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
@ -7217,7 +7217,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
@@ -4663,7 +5928,11 @@
@@ -4665,7 +5930,11 @@
LONG tmpxy;
dTopLeft = dbuf;
dTopRight = dbuf + ((dstwidth - 1) * bpp);
@ -7229,7 +7229,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
@@ -4740,6 +6009,7 @@
@@ -4742,6 +6011,7 @@
flags &= ~(WINEDDBLT_DDFX);
}
@ -7237,7 +7237,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
#define COPY_COLORKEY_FX(type) \
do { \
const type *s; \
@@ -4761,6 +6031,29 @@
@@ -4763,6 +6033,29 @@
d = (type *)(((BYTE *)d) + dstyinc); \
} \
} while(0)
@ -7267,7 +7267,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
switch (bpp)
{
@@ -4779,7 +6072,11 @@
@@ -4781,7 +6074,11 @@
BYTE *d = dbuf, *dx;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7279,7 +7279,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dx = d;
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
{
@@ -4810,10 +6107,12 @@
@@ -4812,10 +6109,12 @@
}
}
@ -7292,7 +7292,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
error:
if (flags && FIXME_ON(d3d_surface))
{
@@ -4821,6 +6120,7 @@
@@ -4823,6 +6122,7 @@
}
release:
@ -7300,7 +7300,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_data)
{
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
@@ -4839,6 +6139,14 @@
@@ -4841,6 +6141,14 @@
wined3d_texture_decref(src_texture);
if (context)
context_release(context);
@ -7315,7 +7315,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -4883,6 +6191,7 @@
@@ -4885,6 +6193,7 @@
cpu_blit_blit_surface,
};
@ -7323,7 +7323,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
@@ -4890,6 +6199,16 @@
@@ -4892,6 +6201,16 @@
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
@ -7340,7 +7340,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -4901,6 +6220,106 @@
@@ -4903,6 +6222,106 @@
| WINEDDBLT_DONOTWAIT
| WINEDDBLT_ALPHATEST;
@ -7447,7 +7447,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -4943,8 +6362,13 @@
@@ -4945,8 +6364,13 @@
}
scale = src_surface
@ -7461,7 +7461,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->container->resource.format_flags
@@ -4964,6 +6388,7 @@
@@ -4966,6 +6390,7 @@
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -7469,7 +7469,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
@@ -4974,6 +6399,24 @@
@@ -4976,6 +6401,24 @@
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding,
src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect)))
return;
@ -7494,7 +7494,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
else
@@ -4982,8 +6425,13 @@
@@ -4984,8 +6427,13 @@
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -7508,7 +7508,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5004,8 +6452,13 @@
@@ -5006,8 +6454,13 @@
palette, fx->u5.dwFillColor, &color))
goto fallback;
@ -7522,7 +7522,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -5027,8 +6480,13 @@
@@ -5029,8 +6482,13 @@
{
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST;
}
@ -7536,7 +7536,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
/* Upload */
if (scale)
@@ -5037,6 +6495,7 @@
@@ -5039,6 +6497,7 @@
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -7544,7 +7544,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
POINT dst_point = {dst_rect->left, dst_rect->top};
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect)))
@@ -5049,6 +6508,19 @@
@@ -5051,6 +6510,19 @@
context_release(context);
}
return;
@ -7564,7 +7564,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -5072,6 +6544,7 @@
@@ -5074,6 +6546,7 @@
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -7572,7 +7572,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
}
@@ -5280,6 +6753,54 @@
@@ -5282,6 +6755,54 @@
wined3d_surface_location_invalidated,
wined3d_surface_load_location,
};
@ -7627,7 +7627,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
@@ -5341,7 +6862,11 @@
@@ -5343,7 +6864,11 @@
}
surface->container = container;
@ -7639,7 +7639,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5373,9 +6898,14 @@
@@ -5375,9 +6900,14 @@
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -7654,7 +7654,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
return hr;
@@ -5402,7 +6932,11 @@
@@ -5404,7 +6934,11 @@
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);
@ -9378,7 +9378,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
@@ -2028,7 +2087,11 @@
@@ -2047,7 +2106,11 @@
struct wined3d_state
{
DWORD flags;
@ -9390,7 +9390,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2073,6 +2136,7 @@
@@ -2092,6 +2155,7 @@
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
};
@ -9398,7 +9398,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_gl_bo
{
GLuint name;
@@ -2081,6 +2145,7 @@
@@ -2100,6 +2164,7 @@
UINT size;
};
@ -9406,7 +9406,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2136,11 +2201,23 @@
@@ -2155,11 +2220,23 @@
struct wined3d_rendertarget_view *back_buffer_view;
struct wined3d_swapchain **swapchains;
UINT swapchain_count;
@ -9430,7 +9430,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* For rendering to a texture using glCopyTexImage */
GLuint depth_blt_texture;
@@ -2151,6 +2228,9 @@
@@ -2170,6 +2247,9 @@
UINT xScreenSpace;
UINT yScreenSpace;
UINT cursorWidth, cursorHeight;
@ -9440,7 +9440,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HCURSOR hardwareCursor;
/* The Wine logo texture */
@@ -2182,6 +2262,7 @@
@@ -2201,6 +2281,7 @@
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -9448,7 +9448,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
@@ -2193,6 +2274,11 @@
@@ -2212,6 +2293,11 @@
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_delete_opengl_contexts_cs(struct wined3d_device *device,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -9460,7 +9460,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2212,9 +2298,11 @@
@@ -2231,9 +2317,11 @@
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
@ -9472,7 +9472,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_resource
@@ -2239,6 +2327,7 @@
@@ -2258,6 +2346,7 @@
UINT depth;
UINT size;
DWORD priority;
@ -9480,7 +9480,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
struct wined3d_gl_bo *buffer, *map_buffer;
@@ -2246,6 +2335,10 @@
@@ -2265,6 +2354,10 @@
DWORD locations;
LONG access_fence;
BOOL unmap_dirtify;
@ -9491,7 +9491,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *parent;
const struct wined3d_parent_ops *parent_ops;
@@ -2270,6 +2363,7 @@
@@ -2289,6 +2382,7 @@
void *parent, const struct wined3d_parent_ops *parent_ops,
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -9499,7 +9499,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_changed(struct wined3d_resource *resource,
@@ -2318,6 +2412,15 @@
@@ -2337,6 +2431,15 @@
{
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
}
@ -9515,7 +9515,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
@@ -2402,7 +2505,9 @@
@@ -2421,7 +2524,9 @@
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
@ -9525,7 +9525,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_texture_bind(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
@@ -2436,9 +2541,16 @@
@@ -2455,9 +2560,16 @@
struct wined3d_resource resource;
struct wined3d_texture *container;
@ -9542,7 +9542,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
@@ -2446,6 +2558,7 @@
@@ -2465,6 +2577,7 @@
return CONTAINING_RECORD(resource, struct wined3d_volume, resource);
}
@ -9550,7 +9550,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
@@ -2461,6 +2574,27 @@
@@ -2480,6 +2593,27 @@
struct wined3d_surface_dib
{
HBITMAP DIBsection;
@ -9578,7 +9578,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT bitmap_size;
};
@@ -2486,7 +2620,11 @@
@@ -2505,7 +2639,11 @@
struct wined3d_surface_ops
{
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
@ -9590,7 +9590,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_surface
@@ -2494,12 +2632,26 @@
@@ -2513,12 +2651,26 @@
struct wined3d_resource resource;
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
@ -9617,7 +9617,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
GLenum texture_target;
@@ -2543,11 +2695,22 @@
@@ -2562,11 +2714,22 @@
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
@ -9640,7 +9640,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
DWORD location) DECLSPEC_HIDDEN;
@@ -2559,6 +2722,7 @@
@@ -2578,6 +2741,7 @@
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
@ -9648,7 +9648,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
@@ -2573,6 +2737,17 @@
@@ -2592,6 +2756,17 @@
void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@ -9666,7 +9666,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2594,8 +2769,10 @@
@@ -2613,8 +2788,10 @@
GLuint name;
};
@ -9677,7 +9677,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -2624,8 +2801,10 @@
@@ -2643,8 +2820,10 @@
BOOL half_float_conv_needed;
};
@ -9688,7 +9688,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2693,6 +2872,7 @@
@@ -2712,6 +2891,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -9696,7 +9696,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2743,6 +2923,32 @@
@@ -2762,6 +2942,32 @@
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
@ -9729,7 +9729,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -2792,6 +2998,7 @@
@@ -2811,6 +3017,7 @@
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
@ -9737,7 +9737,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -2855,6 +3062,7 @@
@@ -2874,6 +3081,7 @@
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
@ -9745,7 +9745,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
@@ -2869,8 +3077,12 @@
@@ -2888,8 +3096,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -9758,7 +9758,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -2884,12 +3096,16 @@
@@ -2903,12 +3115,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@ -9775,7 +9775,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -2916,7 +3132,9 @@
@@ -2935,7 +3151,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -9785,7 +9785,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -2941,11 +3159,15 @@
@@ -2960,11 +3178,15 @@
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -9801,7 +9801,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -2984,8 +3206,10 @@
@@ -3003,8 +3225,10 @@
return surface_from_resource(resource);
}
@ -9812,7 +9812,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -2998,8 +3222,12 @@
@@ -3017,8 +3241,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@ -9825,7 +9825,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -3038,8 +3266,10 @@
@@ -3057,8 +3285,10 @@
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -9836,7 +9836,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3242,7 +3472,9 @@
@@ -3261,7 +3491,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;

View File

@ -1,45 +0,0 @@
From 3e9c58f0bd7ae338375adc8b4a94c0d7cb0d8f8f Mon Sep 17 00:00:00 2001
From: Jarkko Korpi <jarkko_korpi@hotmail.com>
Date: Sun, 12 Jul 2015 17:41:59 +0300
Subject: wined3d: Add detection for NVIDIA GeForce 425M.
---
dlls/wined3d/directx.c | 2 ++
dlls/wined3d/wined3d_private.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ce23c47..daefa0f 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1237,6 +1237,7 @@ static const struct gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS350M, "NVIDIA GeForce GTS 350M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_410M, "NVIDIA GeForce 410M", DRIVER_NVIDIA_GEFORCE8, 512},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT420, "NVIDIA GeForce GT 420", DRIVER_NVIDIA_GEFORCE8, 2048},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT425M, "NVIDIA GeForce GT 425M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT430, "NVIDIA GeForce GT 430", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT440, "NVIDIA GeForce GT 440", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS450, "NVIDIA GeForce GTS 450", DRIVER_NVIDIA_GEFORCE8, 1024},
@@ -1745,6 +1746,7 @@ cards_nvidia_binary[] =
{"GTS 450", CARD_NVIDIA_GEFORCE_GTS450}, /* Geforce 400 - midend low */
{"GT 440", CARD_NVIDIA_GEFORCE_GT440}, /* Geforce 400 - lowend */
{"GT 430", CARD_NVIDIA_GEFORCE_GT430}, /* Geforce 400 - lowend */
+ {"GT 425M", CARD_NVIDIA_GEFORCE_GT425M}, /* Geforce 400 - lowend mobile */
{"GT 420", CARD_NVIDIA_GEFORCE_GT420}, /* Geforce 400 - lowend */
{"410M", CARD_NVIDIA_GEFORCE_410M}, /* Geforce 400 - lowend mobile */
{"GT 330", CARD_NVIDIA_GEFORCE_GT330}, /* Geforce 300 - highend */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a1331d3..b1e6124 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1564,6 +1564,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GTS350M = 0x0cb0,
CARD_NVIDIA_GEFORCE_410M = 0x1055,
CARD_NVIDIA_GEFORCE_GT420 = 0x0de2,
+ CARD_NVIDIA_GEFORCE_GT425M = 0x0df0,
CARD_NVIDIA_GEFORCE_GT430 = 0x0de1,
CARD_NVIDIA_GEFORCE_GT440 = 0x0de0,
CARD_NVIDIA_GEFORCE_GTS450 = 0x0dc4,
--
2.4.5

View File

@ -1 +0,0 @@
Fixes: [35054] Add wined3d detection for GeForce GT 425M

View File

@ -1,49 +0,0 @@
From e0e2272251fbefafd7b5b46838aa37aca293f5e4 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Sun, 1 May 2011 13:48:32 -0500
Subject: winscard: add stubs for SCardListReadersA/W
Fixes http://bugs.winehq.org/show_bug.cgi?id=26978
---
dlls/winscard/winscard.c | 12 ++++++++++++
dlls/winscard/winscard.spec | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/winscard/winscard.c b/dlls/winscard/winscard.c
index bcf8129..cf7d52d 100644
--- a/dlls/winscard/winscard.c
+++ b/dlls/winscard/winscard.c
@@ -129,3 +129,15 @@ void WINAPI SCardReleaseStartedEvent(void)
{
FIXME("stub\n");
}
+
+LONG WINAPI SCardListReadersA(SCARDCONTEXT context, LPCSTR groups, LPSTR readers, LPDWORD buflen)
+{
+ FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_a(groups), readers, buflen);
+ return SCARD_F_INTERNAL_ERROR;
+}
+
+LONG WINAPI SCardListReadersW(SCARDCONTEXT context, LPCWSTR groups, LPWSTR readers, LPDWORD buflen)
+{
+ FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_w(groups), readers, buflen);
+ return SCARD_F_INTERNAL_ERROR;
+}
diff --git a/dlls/winscard/winscard.spec b/dlls/winscard/winscard.spec
index 8ecf988..5fd8903 100644
--- a/dlls/winscard/winscard.spec
+++ b/dlls/winscard/winscard.spec
@@ -40,8 +40,8 @@
@ stub SCardListInterfacesW
@ stub SCardListReaderGroupsA
@ stub SCardListReaderGroupsW
-@ stub SCardListReadersA
-@ stub SCardListReadersW
+@ stdcall SCardListReadersA(long str ptr ptr)
+@ stdcall SCardListReadersW(long wstr ptr ptr)
@ stub SCardLocateCardsA
@ stub SCardLocateCardsByATRA
@ stub SCardLocateCardsByATRW
--
2.4.2

View File

@ -1 +0,0 @@
Fixes: [26978] Add stub for winscard.SCardListReadersA/W