Compare commits

...

25 Commits
v2.0 ... v2.1

Author SHA1 Message Date
Sebastian Lackner
29d851bf3a Release 2.1. 2017-02-09 05:39:42 +01:00
Sebastian Lackner
481488be9f Added patch to revert changes to wined3d_buffer_upload_data. 2017-02-08 19:56:48 +01:00
Sebastian Lackner
74528271f3 wined3d-CSMT_Main: Reenable patchset. 2017-02-08 17:36:36 +01:00
Sebastian Lackner
06886567bc Added patch to implement MemorySectionName class in NtQueryVirtualMemory. 2017-02-07 11:54:25 +01:00
Sebastian Lackner
a12dca03ce Added patch to implement some processor group functions and SetThreadIdealProcessorEx. 2017-02-05 22:38:32 +01:00
Sebastian Lackner
f6d52a6a19 kernel32-SetFileCompletionNotificationModes: Update patchset. 2017-02-05 16:14:08 +01:00
Sebastian Lackner
6ab46f2760 Added patch to implement stub for advapi32.LookupSecurityDescriptorPartsA/W. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
cc8133fd8c Added patch to implement ProcessPriorityClass in NtQueryInformationProcess. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
9392a75d90 Added patch with stub for kernel32.GetPackageFullName. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
91eac1310f Added patch to implement ntdll.LdrEnumerateLoadedModules. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
0fb4e4b319 api-ms-win-Stub_DLLs: Update specfile. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
dbbf832f67 Added patch to implement stub for wevtapi.EvtNext. 2017-02-05 15:38:03 +01:00
Sebastian Lackner
e6ff2b49ac Added patch to set focus to dialog itself when it has no controls. 2017-02-05 07:20:17 +01:00
Sebastian Lackner
e4754f827a Rebase against e08ed6cac218fc09044d06d3cbe2a54f7ec898cf. 2017-02-04 07:47:58 +01:00
Sebastian Lackner
e374d7a750 windowscodecs-32bppPRGBA: Update patchset. 2017-02-02 22:48:15 +01:00
Sebastian Lackner
2e509b911f Rebase against 2a28e4d843ec5302f53a3168061fdf2ca30eb076. 2017-02-02 00:06:41 +01:00
Sebastian Lackner
c8b29193db server-PeekMessage: Update patchset. 2017-02-01 23:43:28 +01:00
Sebastian Lackner
52f7df8325 Added patch to handle begin == NULL in _vcomp_for_static_init. 2017-02-01 14:58:18 +01:00
Sebastian Lackner
25019ba42d Rebase against 36bb9d905ae10713bcd197958fb71aa86930a505. 2017-02-01 14:56:51 +01:00
Sebastian Lackner
72479040c5 Rebase against 2dd0fb880c005cd5660928d1646a117407cec238. 2017-01-31 11:19:50 +01:00
Sebastian Lackner
8f474115cd bcrypt-Improvements: Fix compilation on OSX when both gnutls and commoncrypto is available. 2017-01-29 12:46:25 +01:00
Sebastian Lackner
4a6f3210c9 Rebase against 152b24015308286441399f9fc2be57213c762c7a. 2017-01-27 23:24:02 +01:00
Sebastian Lackner
a6c14e35e7 Rebase against 96a48efeeade7359c8c84a8c3a0a9768fb2a6194. 2017-01-27 00:45:45 +01:00
Sebastian Lackner
db836be757 msvideo.dll16-DrawDibProfileDisplay: Fix spec file. 2017-01-26 15:13:40 +01:00
Sebastian Lackner
e7a0f0e60e Rebase against 76644a7c26f2c2b3a5968665c349b45bdb294387. 2017-01-25 22:09:05 +01:00
231 changed files with 8908 additions and 19004 deletions

View File

@@ -0,0 +1,61 @@
From bb079b53bc79d44987d5f7ac93d0e1d2c5b00698 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Wed, 9 Nov 2016 21:46:10 -0600
Subject: advapi32: add LookupSecurityDescriptorPartsA/W stubs
Fixes https://bugs.winehq.org/show_bug.cgi?id=41682
---
dlls/advapi32/advapi32.spec | 4 ++--
dlls/advapi32/security.c | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 6c57c88adf7..88d8634ef64 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -415,8 +415,8 @@
@ stdcall LookupPrivilegeNameW(wstr ptr ptr ptr)
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
-# @ stub LookupSecurityDescriptorPartsA
-# @ stub LookupSecurityDescriptorPartsW
+@ stdcall LookupSecurityDescriptorPartsA(ptr ptr ptr ptr ptr ptr ptr)
+@ stdcall LookupSecurityDescriptorPartsW(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall LsaAddAccountRights(ptr ptr ptr long)
@ stub LsaAddPrivilegesToAccount
# @ stub LsaClearAuditLog
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 3b5d7a42b6f..01e8ea02706 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -6199,3 +6199,27 @@ BOOL WINAPI SaferSetLevelInformation(SAFER_LEVEL_HANDLE handle, SAFER_OBJECT_INF
FIXME("(%p %u %p %u) stub\n", handle, infotype, buffer, size);
return FALSE;
}
+
+/******************************************************************************
+ * LookupSecurityDescriptorPartsA [ADVAPI32.@]
+ */
+DWORD WINAPI LookupSecurityDescriptorPartsA(TRUSTEEA *owner, TRUSTEEA *group, ULONG *access_count,
+ EXPLICIT_ACCESSA *access_list, ULONG *audit_count,
+ EXPLICIT_ACCESSA *audit_list, SECURITY_DESCRIPTOR *descriptor)
+{
+ FIXME("(%p %p %p %p %p %p %p) stub\n", owner, group, access_count,
+ access_list, audit_count, audit_list, descriptor);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/******************************************************************************
+ * LookupSecurityDescriptorPartsW [ADVAPI32.@]
+ */
+DWORD WINAPI LookupSecurityDescriptorPartsW(TRUSTEEW *owner, TRUSTEEW *group, ULONG *access_count,
+ EXPLICIT_ACCESSW *access_list, ULONG *audit_count,
+ EXPLICIT_ACCESSW *audit_list, SECURITY_DESCRIPTOR *descriptor)
+{
+ FIXME("(%p %p %p %p %p %p %p) stub\n", owner, group, access_count,
+ access_list, audit_count, audit_list, descriptor);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
--
2.11.0

View File

@@ -0,0 +1 @@
Fixes: [41682] Add stub for advapi32.LookupSecurityDescriptorPartsA/W

View File

@@ -1,4 +1,4 @@
From 616c17cc58a4943d3a367704943e737d5713740d Mon Sep 17 00:00:00 2001
From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 7 Apr 2015 11:23:34 +0800
Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
@@ -8,7 +8,7 @@ Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
1 file changed, 31 insertions(+)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 258b8ca..93afa20 100644
index 1b270a80829..b8dedbd6d58 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -29,6 +29,7 @@
@@ -19,8 +19,8 @@ index 258b8ca..93afa20 100644
#include "advapi32_misc.h"
#include "wine/debug.h"
@@ -554,6 +555,21 @@ NTSTATUS WINAPI LsaLookupSids(
heap_free(name);
@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids(
domain.MaximumLength = sizeof(WCHAR);
}
}
+ else
@@ -41,9 +41,9 @@ index 258b8ca..93afa20 100644
}
/* now we have full length needed for both */
@@ -593,6 +609,21 @@ NTSTATUS WINAPI LsaLookupSids(
heap_free(domain.Buffer);
}
@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids(
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
heap_free(domain.Buffer);
}
+ else
+ {
@@ -64,5 +64,5 @@ index 258b8ca..93afa20 100644
name_buffer += name_size;
}
--
2.3.5
2.11.0

View File

@@ -1,4 +1,4 @@
From 51fb5229fdb33887fe25440defc8df09d1623abb Mon Sep 17 00:00:00 2001
From 306414ced0169b9ee4de34706e9235acb1bd93d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 Jan 2016 13:01:15 +0100
Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
@@ -13,7 +13,7 @@ Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
create mode 100644 dlls/kernelbase/misc.c
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
index b9caed0..2beb34b 100644
index b9caed090b2..2beb34bafdb 100644
--- a/dlls/kernelbase/Makefile.in
+++ b/dlls/kernelbase/Makefile.in
@@ -1 +1,4 @@
@@ -22,7 +22,7 @@ index b9caed0..2beb34b 100644
+C_SRCS = \
+ misc.c
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index f104030..e09112e 100644
index f104030ab25..74ff728cbc8 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1,3 +1,6 @@
@@ -96,7 +96,7 @@ index f104030..e09112e 100644
-@ stub BaseReleaseProcessDllPath
-@ stub BaseReleaseProcessExePath
+@ stub BaseDumpAppcompatCache
+@ stub BaseFlushAppcompatCache
+@ stdcall BaseFlushAppcompatCache() kernel32.BaseFlushAppcompatCache
+@ stub BaseFormatObjectAttributes
+@ stub BaseFreeAppCompatDataForProcess
+@ stub BaseGetNamedObjectDirectory
@@ -244,7 +244,7 @@ index f104030..e09112e 100644
+@ stdcall CreateWaitableTimerW(ptr long wstr) kernel32.CreateWaitableTimerW
@ stdcall CreateWellKnownSid(long ptr ptr ptr) advapi32.CreateWellKnownSid
+@ stub CtrlRoutine
+@ stdcall DeactivateActCtx(long ptr) kernel32.DeactivateActCtx
+@ stdcall DeactivateActCtx(long long) kernel32.DeactivateActCtx
+@ stdcall DebugActiveProcess(long) kernel32.DebugActiveProcess
+@ stdcall DebugActiveProcessStop(long) kernel32.DebugActiveProcessStop
@ stdcall DebugBreak() kernel32.DebugBreak
@@ -433,7 +433,7 @@ index f104030..e09112e 100644
@ stub GetCalendar
@ stdcall GetCalendarInfoEx(wstr long ptr long ptr long ptr) kernel32.GetCalendarInfoEx
@ stdcall GetCalendarInfoW(long long long ptr long ptr) kernel32.GetCalendarInfoW
+@ stdcall GetCommConfig(long ptr long) kernel32.GetCommConfig
+@ stdcall GetCommConfig(long ptr ptr) kernel32.GetCommConfig
+@ stdcall GetCommMask(long ptr) kernel32.GetCommMask
+@ stdcall GetCommModemStatus(long ptr) kernel32.GetCommModemStatus
+@ stdcall GetCommProperties(long ptr) kernel32.GetCommProperties
@@ -1354,7 +1354,7 @@ index f104030..e09112e 100644
+@ stub SetClientTimeZoneInformation
+@ stdcall SetCommBreak(long) kernel32.SetCommBreak
+@ stdcall SetCommConfig(long ptr long) kernel32.SetCommConfig
+@ stdcall SetCommMask(long ptr) kernel32.SetCommMask
+@ stdcall SetCommMask(long long) kernel32.SetCommMask
+@ stdcall SetCommState(long ptr) kernel32.SetCommState
+@ stdcall SetCommTimeouts(long ptr) kernel32.SetCommTimeouts
+@ stdcall SetComputerNameA(str) kernel32.SetComputerNameA
@@ -1715,7 +1715,7 @@ index f104030..e09112e 100644
+@ stub wprintf
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
new file mode 100644
index 0000000..be1591a
index 00000000000..be1591aee7e
--- /dev/null
+++ b/dlls/kernelbase/misc.c
@@ -0,0 +1,37 @@
@@ -1757,7 +1757,7 @@ index 0000000..be1591a
+ return FALSE;
+}
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 6b6ead2..7c2a9d1 100644
index 6b6ead26968..7c2a9d117e0 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -417,7 +417,7 @@
@@ -1770,10 +1770,10 @@ index 6b6ead2..7c2a9d1 100644
422 stdcall -noname SHGlobalCounterCreateNamedA(str long)
423 stdcall -noname SHGlobalCounterCreateNamedW(wstr long)
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 8e11529..eba8548 100755
index 1e2400e4c7f..a245aefe406 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -233,6 +233,7 @@ my @dll_groups =
@@ -249,6 +249,7 @@ my @dll_groups =
[
"kernel32",
"advapi32",
@@ -1782,5 +1782,5 @@ index 8e11529..eba8548 100755
"kernelbase",
"api-ms-win-core-bem-l1-1-0",
--
2.9.0
2.11.0

View File

@@ -1,42 +0,0 @@
From 64ce8c391c3706a2b3ce9b5f8f76710d5751a766 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 20 Oct 2016 17:48:24 +0800
Subject: avifil32: AVIFileGetStream should set stream to NULL in case of an
error.
---
dlls/avifil32/avifile.c | 1 +
dlls/avifil32/tests/api.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index f649d05..7a4caaa 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -316,6 +316,7 @@ static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile *iface, IAVIStream **avis, D
}
/* Sorry, but the specified stream doesn't exist */
+ *avis = NULL;
return AVIERR_NODATA;
}
diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c
index b3d822d..8a00865 100644
--- a/dlls/avifil32/tests/api.c
+++ b/dlls/avifil32/tests/api.c
@@ -373,6 +373,11 @@ static void test_default_data(void)
res = AVIFileOpenA(&pFile, filename, OF_SHARE_DENY_WRITE, 0L);
ok(res == 0, "Unable to open file: error=%u\n", res);
+ pStream0 = (void *)0xdeadbeef;
+ res = AVIFileGetStream(pFile, &pStream0, ~0, 0);
+ ok(res == AVIERR_NODATA, "expected AVIERR_NODATA, got %#x\n", res);
+ ok(pStream0 == NULL, "AVIFileGetStream should set stream to NULL\n");
+
res = AVIFileGetStream(pFile, &pStream0, 0, 0);
ok(res == 0, "Unable to open video stream: error=%u\n", res);
--
2.9.0

View File

@@ -1 +0,0 @@
Fixes: [41579] AVIFileGetStream should set stream to NULL in case of an error

View File

@@ -1,4 +1,4 @@
From c178117abacbf8644ae05429999ff8e8f8585a7e Mon Sep 17 00:00:00 2001
From 489a67ec803b382248134be53f3449c206e208ff Mon Sep 17 00:00:00 2001
From: Hans Leidekker <hans@codeweavers.com>
Date: Mon, 19 Dec 2016 19:38:52 +0100
Subject: bcrypt: Add AES provider.
@@ -53,7 +53,7 @@ index e299fe0cce8..962953e509b 100644
@ stub BCryptUnregisterConfigChangeNotify
@ stub BCryptUnregisterProvider
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 6023c942e49..5e066283f6e 100644
index 6023c942e49..5867dbdc3fa 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -49,6 +49,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -208,7 +208,7 @@ index 6023c942e49..5e066283f6e 100644
return BCryptDestroyHash( handle );
}
+#if defined(HAVE_GNUTLS_HASH)
+#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
+struct key
+{
+ struct object hdr;

View File

@@ -1,58 +0,0 @@
From 5c5620766e4e3be85bdec4aab689b9f5b42b2f2b Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
Date: Wed, 18 Jan 2017 21:35:28 +0100
Subject: d3d9: Fix DrawIndexedPrimitiveUP with non-zero min_vertex_idx.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
---
dlls/d3d9/device.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index e0bc5859c61..e646cb76c76 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2485,18 +2485,16 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
UINT primitive_count, const void *index_data, D3DFORMAT index_format,
const void *vertex_data, UINT vertex_stride)
{
- struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
- HRESULT hr;
UINT idx_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
+ struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
UINT idx_fmt_size = index_format == D3DFMT_INDEX16 ? 2 : 4;
+ UINT vtx_size = vertex_count * vertex_stride;
UINT idx_size = idx_count * idx_fmt_size;
struct wined3d_map_desc wined3d_map_desc;
struct wined3d_box wined3d_box = {0};
struct wined3d_resource *ib, *vb;
- UINT ib_pos;
-
- UINT vtx_size = vertex_count * vertex_stride;
- UINT vb_pos, align;
+ UINT vb_pos, ib_pos, align;
+ HRESULT hr;
TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, "
"index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n",
@@ -2536,7 +2534,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
if (FAILED(hr = wined3d_resource_map(vb, 0, &wined3d_map_desc, &wined3d_box,
vb_pos ? WINED3D_MAP_NOOVERWRITE : WINED3D_MAP_DISCARD)))
goto done;
- memcpy(wined3d_map_desc.data, vertex_data, vtx_size);
+ memcpy(wined3d_map_desc.data, (char *)vertex_data + min_vertex_idx * vertex_stride, vtx_size);
wined3d_resource_unmap(vb, 0);
device->vertex_buffer_pos = vb_pos + vtx_size;
@@ -2568,7 +2566,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
wined3d_device_set_index_buffer(device->wined3d_device, device->index_buffer,
wined3dformat_from_d3dformat(index_format), 0);
- wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride);
+ wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride - min_vertex_idx);
wined3d_device_set_primitive_type(device->wined3d_device, primitive_type);
hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, ib_pos / idx_fmt_size, idx_count);
--
2.11.0

View File

@@ -1,58 +0,0 @@
From 6ab43f9745b48a8646b54c1a072a07ddd96e333b Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
Date: Wed, 18 Jan 2017 21:35:29 +0100
Subject: d3d8: Fix DrawIndexedPrimitiveUP with non-zero min_vertex_idx.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
---
dlls/d3d8/device.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 43b8e2be4bb..805694b8536 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -2124,18 +2124,16 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
UINT primitive_count, const void *index_data, D3DFORMAT index_format,
const void *vertex_data, UINT vertex_stride)
{
- struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
- HRESULT hr;
UINT idx_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
+ struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
UINT idx_fmt_size = index_format == D3DFMT_INDEX16 ? 2 : 4;
+ UINT vtx_size = vertex_count * vertex_stride;
UINT idx_size = idx_count * idx_fmt_size;
struct wined3d_map_desc wined3d_map_desc;
struct wined3d_box wined3d_box = {0};
struct wined3d_resource *ib, *vb;
- UINT ib_pos;
-
- UINT vtx_size = vertex_count * vertex_stride;
- UINT vb_pos, align;
+ UINT vb_pos, ib_pos, align;
+ HRESULT hr;
TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, "
"index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n",
@@ -2168,7 +2166,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
if (FAILED(hr = wined3d_resource_map(vb, 0, &wined3d_map_desc, &wined3d_box,
vb_pos ? WINED3D_MAP_NOOVERWRITE : WINED3D_MAP_DISCARD)))
goto done;
- memcpy(wined3d_map_desc.data, vertex_data, vtx_size);
+ memcpy(wined3d_map_desc.data, (char *)vertex_data + min_vertex_idx * vertex_stride, vtx_size);
wined3d_resource_unmap(vb, 0);
device->vertex_buffer_pos = vb_pos + vtx_size;
@@ -2200,7 +2198,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
wined3d_device_set_index_buffer(device->wined3d_device, device->index_buffer,
wined3dformat_from_d3dformat(index_format), 0);
- wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride);
+ wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride - min_vertex_idx);
wined3d_device_set_primitive_type(device->wined3d_device, primitive_type);
hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, ib_pos / idx_fmt_size, idx_count);
--
2.11.0

View File

@@ -1,123 +0,0 @@
From c50f96ff6353cc65ed3e39b43fd7e46cf2678c69 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
Date: Wed, 18 Jan 2017 21:35:30 +0100
Subject: d3d9/tests: Add a test for DrawIndexedPrimitiveUP().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
---
dlls/d3d9/tests/visual.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a1064127d5a..be544f3b5c7 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -22244,6 +22244,99 @@ done:
DestroyWindow(window);
}
+static void test_drawindexedprimitiveup(void)
+{
+ static const struct vertex
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.1f}, 0xff0000ff},
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0xff0000ff},
+
+ {{-1.0f, -1.0f, 0.1f}, 0xff0000ff},
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ };
+ static const unsigned short indices[] = {0, 1, 2, 3, 4, 5, 6, 7};
+ IDirect3DDevice9 *device;
+ IDirect3D9 *d3d;
+ ULONG refcount;
+ D3DCOLOR color;
+ HWND window;
+ HRESULT hr;
+
+ window = create_window();
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+
+ if (!(device = create_device(d3d, window, window, TRUE)))
+ {
+ skip("Failed to create a D3D device.\n");
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
+ ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 4, 4, 2, indices + 4, D3DFMT_INDEX16, quad, sizeof(*quad));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 160, 120);
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 120);
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 160, 360);
+ ok(color_match(color, 0x00404080, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 360);
+ ok(color_match(color, 0x00bf4000, 1), "Got unexpected color 0x%08x.\n", color);
+
+ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 0, 4, 2, indices, D3DFMT_INDEX16, quad, sizeof(*quad));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 160, 120);
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 120);
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 160, 360);
+ ok(color_match(color, 0x00408040, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 360);
+ ok(color_match(color, 0x00bf0040, 1), "Got unexpected color 0x%08x.\n", color);
+
+ refcount = IDirect3DDevice9_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER9 identifier;
@@ -22372,4 +22465,5 @@ START_TEST(visual)
test_evict_bound_resources();
test_max_index16();
test_backbuffer_resize();
+ test_drawindexedprimitiveup();
}
--
2.11.0

View File

@@ -1,132 +0,0 @@
From 38c67dd093a7b64dc3730cf6b919f4bcf31c65f0 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
Date: Wed, 18 Jan 2017 21:35:31 +0100
Subject: d3d8/tests: Add a test for DrawIndexedPrimitiveUP().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
---
dlls/d3d8/tests/visual.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index c0ecc6a6fa6..57c89171b7d 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -9700,6 +9700,108 @@ done:
DestroyWindow(window);
}
+static void test_drawindexedprimitiveup(void)
+{
+ static const struct vertex
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.1f}, 0xff0000ff},
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0xff0000ff},
+
+ {{-1.0f, -1.0f, 0.1f}, 0xff0000ff},
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ };
+ static const unsigned short indices[] = {0, 1, 2, 3, 4, 5, 6, 7};
+ IDirect3DDevice8 *device;
+ IDirect3D8 *d3d;
+ ULONG refcount;
+ D3DCOLOR color;
+ HWND window;
+ HRESULT hr;
+
+ window = create_window();
+ d3d = Direct3DCreate8(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+
+ if (!(device = create_device(d3d, window, window, TRUE)))
+ {
+ skip("Failed to create a D3D device.\n");
+ IDirect3D8_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE);
+ ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
+ ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE);
+ ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
+ ok(SUCCEEDED(hr), "Failed to set alpha op, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE);
+ ok(SUCCEEDED(hr), "Failed to set alpha arg, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
+ ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 4, 4, 2, indices + 4, D3DFMT_INDEX16, quad, sizeof(*quad));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 160, 120);
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 120);
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 160, 360);
+ ok(color_match(color, 0x00404080, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 360);
+ ok(color_match(color, 0x00bf4000, 1), "Got unexpected color 0x%08x.\n", color);
+
+ hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 0, 4, 2, indices, D3DFMT_INDEX16, quad, sizeof(*quad));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 160, 120);
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 120);
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 160, 360);
+ ok(color_match(color, 0x00408040, 1), "Got unexpected color 0x%08x.\n", color);
+ color = getPixelColor(device, 480, 360);
+ ok(color_match(color, 0x00bf0040, 1), "Got unexpected color 0x%08x.\n", color);
+
+ refcount = IDirect3DDevice8_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D8_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER8 identifier;
@@ -9770,4 +9872,5 @@ START_TEST(visual)
test_edge_antialiasing_blending();
test_max_index16();
test_backbuffer_resize();
+ test_drawindexedprimitiveup();
}
--
2.11.0

View File

@@ -1 +0,0 @@
Fixes: [35993] Fix DrawIndexedPrimitiveUP with non-zero min_vertex_idx

View File

@@ -1,110 +0,0 @@
From 755979edcad39862f2555c557db85644eb23acb7 Mon Sep 17 00:00:00 2001
From: Andrey Gusev <andrey.goosev@gmail.com>
Date: Wed, 28 Dec 2016 16:43:13 +0200
Subject: d3dx11: Add D3DX11CreateShaderResourceViewFromMemory stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
---
dlls/d3dx11_42/Makefile.in | 1 +
dlls/d3dx11_42/d3dx11_42.spec | 2 +-
dlls/d3dx11_43/Makefile.in | 1 +
dlls/d3dx11_43/d3dx11_43.spec | 2 +-
dlls/d3dx11_43/shader.c | 36 ++++++++++++++++++++++++++++++++++++
5 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 dlls/d3dx11_43/shader.c
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
index d20f6600ecd..80eb4cdbce9 100644
--- a/dlls/d3dx11_42/Makefile.in
+++ b/dlls/d3dx11_42/Makefile.in
@@ -5,6 +5,7 @@ PARENTSRC = ../d3dx11_43
C_SRCS = \
async.c \
d3dx11_42.c \
+ shader.c \
texture.c
RC_SRCS = version.rc
diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec
index f97ec246bdf..f4a1b8edd3a 100644
--- a/dlls/d3dx11_42/d3dx11_42.spec
+++ b/dlls/d3dx11_42/d3dx11_42.spec
@@ -17,7 +17,7 @@
@ stub D3DX11CreateAsyncTextureProcessor
@ stub D3DX11CreateShaderResourceViewFromFileA
@ stub D3DX11CreateShaderResourceViewFromFileW
-@ stub D3DX11CreateShaderResourceViewFromMemory
+@ stdcall D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr)
@ stub D3DX11CreateShaderResourceViewFromResourceA
@ stub D3DX11CreateShaderResourceViewFromResourceW
@ stub D3DX11CreateTextureFromFileA
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
index d5c5b455480..8435a7c4aa5 100644
--- a/dlls/d3dx11_43/Makefile.in
+++ b/dlls/d3dx11_43/Makefile.in
@@ -5,6 +5,7 @@ IMPORTS = d3dcompiler
C_SRCS = \
async.c \
d3dx11_43.c \
+ shader.c \
texture.c
RC_SRCS = version.rc
diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec
index 217cad10b47..6ce570b2402 100644
--- a/dlls/d3dx11_43/d3dx11_43.spec
+++ b/dlls/d3dx11_43/d3dx11_43.spec
@@ -17,7 +17,7 @@
@ stub D3DX11CreateAsyncTextureProcessor
@ stub D3DX11CreateShaderResourceViewFromFileA
@ stub D3DX11CreateShaderResourceViewFromFileW
-@ stub D3DX11CreateShaderResourceViewFromMemory
+@ stdcall D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr)
@ stub D3DX11CreateShaderResourceViewFromResourceA
@ stub D3DX11CreateShaderResourceViewFromResourceW
@ stub D3DX11CreateTextureFromFileA
diff --git a/dlls/d3dx11_43/shader.c b/dlls/d3dx11_43/shader.c
new file mode 100644
index 00000000000..3420cc82f3b
--- /dev/null
+++ b/dlls/d3dx11_43/shader.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016 Andrey Gusev
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+#include "d3dx11.h"
+#include "d3dcompiler.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
+
+HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, const void *data,
+ SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
+ ID3D11ShaderResourceView **view, HRESULT *hresult)
+{
+ FIXME("device %p, data %p, data_size %lu, load_info %p, pump %p, view %p, hresult %p stub!\n",
+ device, data, data_size, load_info, pump, view, hresult);
+
+ return E_NOTIMPL;
+}
--
2.11.0

View File

@@ -1 +0,0 @@
Fixes: [42078] Add D3DX11CreateShaderResourceViewFromMemory stub

View File

@@ -1,4 +1,4 @@
From 499d0a3ccd24ffb60e5fe58dd054b71de1f3121f Mon Sep 17 00:00:00 2001
From 33854851913e9046eb6ea4cd765a2f0026729f07 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 1 Nov 2014 13:08:05 +0100
Subject: d3dx9_36: Add dxtn support.
@@ -29,7 +29,7 @@ Subject: d3dx9_36: Add dxtn support.
22 files changed, 120 insertions(+), 31 deletions(-)
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
index 7464bd1..bca7d82 100644
index 7464bd1f18f..bca7d826db0 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,5 +1,5 @@
@@ -40,7 +40,7 @@ index 7464bd1..bca7d82 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index 1531e66..5d847a2 100644
index 1531e66c1e6..5d847a2828b 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,5 +1,5 @@
@@ -51,7 +51,7 @@ index 1531e66..5d847a2 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 2a58c58..cf0c150 100644
index 2a58c58b8a1..cf0c1509693 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,5 +1,5 @@
@@ -62,7 +62,7 @@ index 2a58c58..cf0c150 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index 9ba1e2a..7cc647c 100644
index 9ba1e2ac5bd..7cc647c1647 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,5 +1,5 @@
@@ -73,7 +73,7 @@ index 9ba1e2a..7cc647c 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index 15dec71..bbf4140 100644
index 15dec71f2d7..bbf4140e723 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,5 +1,5 @@
@@ -84,7 +84,7 @@ index 15dec71..bbf4140 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index 5a5a8fc..1aa1663 100644
index 5a5a8fcad97..1aa1663ea06 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,5 +1,5 @@
@@ -95,7 +95,7 @@ index 5a5a8fc..1aa1663 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index bafcdb4..df8f87b 100644
index bafcdb49312..df8f87bfedf 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,5 +1,5 @@
@@ -106,7 +106,7 @@ index bafcdb4..df8f87b 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index f5df4d8..6ea8d15 100644
index f5df4d88ae0..6ea8d15b411 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,5 +1,5 @@
@@ -117,7 +117,7 @@ index f5df4d8..6ea8d15 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index cce9293..df0759f 100644
index cce9293063c..df0759fedfc 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,5 +1,5 @@
@@ -128,7 +128,7 @@ index cce9293..df0759f 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index c9b6587..ecf1b15 100644
index c9b6587e77b..ecf1b1598c9 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,5 +1,5 @@
@@ -139,7 +139,7 @@ index c9b6587..ecf1b15 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
index 822f621..2dcd721 100644
index 822f621008d..2dcd721c0a9 100644
--- a/dlls/d3dx9_34/Makefile.in
+++ b/dlls/d3dx9_34/Makefile.in
@@ -1,5 +1,5 @@
@@ -150,7 +150,7 @@ index 822f621..2dcd721 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
index 3c8df66..8c90f16 100644
index 3c8df661029..8c90f16b24f 100644
--- a/dlls/d3dx9_35/Makefile.in
+++ b/dlls/d3dx9_35/Makefile.in
@@ -1,5 +1,5 @@
@@ -161,7 +161,7 @@ index 3c8df66..8c90f16 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 24ce09d..6b78518 100644
index 24ce09daefa..6b78518dc71 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,6 +1,6 @@
@@ -173,7 +173,7 @@ index 24ce09d..6b78518 100644
C_SRCS = \
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 1bfe75a..4099cd5 100644
index fc747799d6d..f851e74ee76 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -27,6 +27,8 @@
@@ -225,8 +225,8 @@ index 1bfe75a..4099cd5 100644
}
else /* Stretching or format conversion. */
{
- if (((srcformatdesc->type != FORMAT_ARGB) && (srcformatdesc->type != FORMAT_INDEX)) ||
- (destformatdesc->type != FORMAT_ARGB))
- if (!is_conversion_from_supported(srcformatdesc)
- || !is_conversion_to_supported(destformatdesc))
+ dxtn_conversion_func pre_convert, post_convert;
+ void *tmp_src_memory = NULL, *tmp_dst_memory = NULL;
+ UINT tmp_src_pitch, tmp_dst_pitch;
@@ -234,10 +234,10 @@ index 1bfe75a..4099cd5 100644
+ pre_convert = get_dxtn_conversion_func(srcformatdesc->format, FALSE);
+ post_convert = get_dxtn_conversion_func(destformatdesc->format, TRUE);
+
+ if ((!pre_convert && (srcformatdesc->type != FORMAT_ARGB) && (srcformatdesc->type != FORMAT_INDEX)) ||
+ (!post_convert && (destformatdesc->type != FORMAT_ARGB)))
+ if ((!pre_convert && !is_conversion_from_supported(srcformatdesc)) ||
+ (!post_convert && !is_conversion_to_supported(destformatdesc)))
{
FIXME("Format conversion missing %#x -> %#x\n", src_format, surfdesc.Format);
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
return E_NOTIMPL;
@@ -1847,10 +1878,52 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
if (FAILED(IDirect3DSurface9_LockRect(dst_surface, &lockrect, dst_rect, 0)))
@@ -329,7 +329,7 @@ index 1bfe75a..4099cd5 100644
/************************************************************
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index f2855e8..2be48df 100644
index f2855e8ddb8..2be48dfddab 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1174,7 +1174,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
@@ -364,7 +364,7 @@ index f2855e8..2be48df 100644
check_release((IUnknown*)newsurf, 1);
check_release((IUnknown*)tex, 0);
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
index 672878f..9eecd32 100644
index 672878ff7e4..9eecd32899d 100644
--- a/dlls/d3dx9_37/Makefile.in
+++ b/dlls/d3dx9_37/Makefile.in
@@ -1,5 +1,5 @@
@@ -375,7 +375,7 @@ index 672878f..9eecd32 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
index 0b537c6..6bb7bac 100644
index 0b537c66b68..6bb7bac0513 100644
--- a/dlls/d3dx9_38/Makefile.in
+++ b/dlls/d3dx9_38/Makefile.in
@@ -1,5 +1,5 @@
@@ -386,7 +386,7 @@ index 0b537c6..6bb7bac 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
index 58d88f7..5d03e18 100644
index 58d88f78abc..5d03e18feb3 100644
--- a/dlls/d3dx9_39/Makefile.in
+++ b/dlls/d3dx9_39/Makefile.in
@@ -1,5 +1,5 @@
@@ -397,7 +397,7 @@ index 58d88f7..5d03e18 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
index a4417b5..8982d4e 100644
index a4417b5aa13..8982d4ec5e4 100644
--- a/dlls/d3dx9_40/Makefile.in
+++ b/dlls/d3dx9_40/Makefile.in
@@ -1,5 +1,5 @@
@@ -408,7 +408,7 @@ index a4417b5..8982d4e 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
index 0463175..e9f3d65 100644
index 0463175210a..e9f3d657e6c 100644
--- a/dlls/d3dx9_41/Makefile.in
+++ b/dlls/d3dx9_41/Makefile.in
@@ -1,5 +1,5 @@
@@ -419,7 +419,7 @@ index 0463175..e9f3d65 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
index 309324f..a55736d 100644
index 309324f4307..a55736d756f 100644
--- a/dlls/d3dx9_42/Makefile.in
+++ b/dlls/d3dx9_42/Makefile.in
@@ -1,5 +1,5 @@
@@ -430,7 +430,7 @@ index 309324f..a55736d 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
index 9c1a87d..c2e787c 100644
index 9c1a87da600..c2e787c5836 100644
--- a/dlls/d3dx9_43/Makefile.in
+++ b/dlls/d3dx9_43/Makefile.in
@@ -1,5 +1,5 @@
@@ -441,5 +441,5 @@ index 9c1a87d..c2e787c 100644
PARENTSRC = ../d3dx9_36
--
2.8.0
2.11.0

View File

@@ -1,269 +0,0 @@
From 0a0146b997a9c5d60fea6a4c6367e059241b942b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B3zef=20Kucia?= <jkucia@codeweavers.com>
Date: Tue, 17 Jan 2017 12:26:37 +0100
Subject: ddraw: Relax "dwSize" validation in ddraw_surface*_Lock().
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: JĂłzef Kucia <jkucia@codeweavers.com>
---
dlls/ddraw/ddraw_private.h | 6 +--
dlls/ddraw/surface.c | 91 ++++++++++++++++++++++++++--------------------
dlls/ddraw/tests/ddraw7.c | 4 --
3 files changed, 54 insertions(+), 47 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 0dc915cfcb2..a8ac865887d 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -628,10 +628,10 @@ struct member_info
/* Structure copy */
#define ME(x,f,e) { x, #x, (void (*)(const void *))(f), offsetof(STRUCT, e) }
-#define DD_STRUCT_COPY_BYSIZE_(to,from,from_size) \
+#define DD_STRUCT_COPY_BYSIZE_(to,from,to_size,from_size) \
do { \
DWORD __size = (to)->dwSize; \
- DWORD __resetsize = min(__size, sizeof(*to)); \
+ DWORD __resetsize = min(to_size, sizeof(*to)); \
DWORD __copysize = min(__resetsize, from_size); \
assert(to != from); \
memcpy(to, from, __copysize); \
@@ -639,7 +639,7 @@ struct member_info
(to)->dwSize = __size; /* restore size */ \
} while (0)
-#define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(from)->dwSize)
+#define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(to)->dwSize,(from)->dwSize)
HRESULT hr_ddraw_from_wined3d(HRESULT hr) DECLSPEC_HIDDEN;
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 7d1fc2edd34..cbe1eb7d98f 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -955,14 +955,15 @@ static HRESULT WINAPI ddraw_surface1_GetAttachedSurface(IDirectDrawSurface *ifac
*
*****************************************************************************/
static HRESULT surface_lock(struct ddraw_surface *surface,
- RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
+ RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size,
+ DWORD flags, HANDLE h)
{
- struct wined3d_box box;
struct wined3d_map_desc map_desc;
+ struct wined3d_box box;
HRESULT hr = DD_OK;
- TRACE("surface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
- surface, wine_dbgstr_rect(rect), surface_desc, flags, h);
+ TRACE("surface %p, rect %s, surface_desc %p, surface_desc_size %u, flags %#x, h %p.\n",
+ surface, wine_dbgstr_rect(rect), surface_desc, surface_desc_size, flags, h);
/* surface->surface_desc.dwWidth and dwHeight are changeable, thus lock */
wined3d_mutex_lock();
@@ -1026,7 +1027,7 @@ static HRESULT surface_lock(struct ddraw_surface *surface,
}
/* Windows does not set DDSD_LPSURFACE on locked surfaces. */
- DD_STRUCT_COPY_BYSIZE(surface_desc, &surface->surface_desc);
+ DD_STRUCT_COPY_BYSIZE_(surface_desc, &surface->surface_desc, surface_desc_size, surface->surface_desc.dwSize);
surface_desc->lpSurface = map_desc.data;
TRACE("locked surface returning description :\n");
@@ -1038,63 +1039,80 @@ static HRESULT surface_lock(struct ddraw_surface *surface,
return DD_OK;
}
+static BOOL surface_validate_lock_desc(struct ddraw_surface *surface,
+ const DDSURFACEDESC *desc, unsigned int *size)
+{
+ if (!desc)
+ return FALSE;
+
+ if (desc->dwSize == sizeof(DDSURFACEDESC) || desc->dwSize == sizeof(DDSURFACEDESC2))
+ {
+ *size = desc->dwSize;
+ return TRUE;
+ }
+
+ if (surface->version == 7
+ && surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE
+ && !(surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
+ {
+ if (desc->dwSize >= sizeof(DDSURFACEDESC2))
+ *size = sizeof(DDSURFACEDESC2);
+ else
+ *size = sizeof(DDSURFACEDESC);
+ return TRUE;
+ }
+
+ WARN("Invalid structure size %u.\n", desc->dwSize);
+ return FALSE;
+}
+
static HRESULT WINAPI ddraw_surface7_Lock(IDirectDrawSurface7 *iface,
RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
+ unsigned int surface_desc_size;
TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
iface, wine_dbgstr_rect(rect), surface_desc, flags, h);
- if (!surface_desc) return DDERR_INVALIDPARAMS;
- if (surface_desc->dwSize != sizeof(DDSURFACEDESC) &&
- surface_desc->dwSize != sizeof(DDSURFACEDESC2))
- {
- WARN("Invalid structure size %d, returning DDERR_INVALIDPARAMS\n", surface_desc->dwSize);
+ if (!surface_validate_lock_desc(surface, (DDSURFACEDESC *)surface_desc, &surface_desc_size))
return DDERR_INVALIDPARAMS;
- }
- return surface_lock(surface, rect, surface_desc, flags, h);
+
+ return surface_lock(surface, rect, surface_desc, surface_desc_size, flags, h);
}
static HRESULT WINAPI ddraw_surface4_Lock(IDirectDrawSurface4 *iface, RECT *rect,
DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
+ unsigned int surface_desc_size;
TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
iface, wine_dbgstr_rect(rect), surface_desc, flags, h);
- if (!surface_desc) return DDERR_INVALIDPARAMS;
- if (surface_desc->dwSize != sizeof(DDSURFACEDESC) &&
- surface_desc->dwSize != sizeof(DDSURFACEDESC2))
- {
- WARN("Invalid structure size %d, returning DDERR_INVALIDPARAMS\n", surface_desc->dwSize);
+ if (!surface_validate_lock_desc(surface, (DDSURFACEDESC *)surface_desc, &surface_desc_size))
return DDERR_INVALIDPARAMS;
- }
- return surface_lock(surface, rect, surface_desc, flags, h);
+
+ return surface_lock(surface, rect, surface_desc, surface_desc_size, flags, h);
}
static HRESULT WINAPI ddraw_surface3_Lock(IDirectDrawSurface3 *iface, RECT *rect,
DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
+ unsigned int surface_desc_size;
DDSURFACEDESC2 surface_desc2;
HRESULT hr;
TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
iface, wine_dbgstr_rect(rect), surface_desc, flags, h);
- if (!surface_desc) return DDERR_INVALIDPARAMS;
- if (surface_desc->dwSize != sizeof(DDSURFACEDESC) &&
- surface_desc->dwSize != sizeof(DDSURFACEDESC2))
- {
- WARN("Invalid structure size %d, returning DDERR_INVALIDPARAMS\n", surface_desc->dwSize);
+ if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
return DDERR_INVALIDPARAMS;
- }
surface_desc2.dwSize = surface_desc->dwSize;
surface_desc2.dwFlags = 0;
- hr = surface_lock(surface, rect, &surface_desc2, flags, h);
+ hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
DDSD2_to_DDSD(&surface_desc2, surface_desc);
surface_desc->dwSize = surface_desc2.dwSize;
return hr;
@@ -1104,23 +1122,19 @@ static HRESULT WINAPI ddraw_surface2_Lock(IDirectDrawSurface2 *iface, RECT *rect
DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
+ unsigned int surface_desc_size;
DDSURFACEDESC2 surface_desc2;
HRESULT hr;
TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
iface, wine_dbgstr_rect(rect), surface_desc, flags, h);
- if (!surface_desc) return DDERR_INVALIDPARAMS;
- if (surface_desc->dwSize != sizeof(DDSURFACEDESC) &&
- surface_desc->dwSize != sizeof(DDSURFACEDESC2))
- {
- WARN("Invalid structure size %d, returning DDERR_INVALIDPARAMS\n", surface_desc->dwSize);
+ if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
return DDERR_INVALIDPARAMS;
- }
surface_desc2.dwSize = surface_desc->dwSize;
surface_desc2.dwFlags = 0;
- hr = surface_lock(surface, rect, &surface_desc2, flags, h);
+ hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
DDSD2_to_DDSD(&surface_desc2, surface_desc);
surface_desc->dwSize = surface_desc2.dwSize;
return hr;
@@ -1130,22 +1144,19 @@ static HRESULT WINAPI ddraw_surface1_Lock(IDirectDrawSurface *iface, RECT *rect,
DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
+ unsigned int surface_desc_size;
DDSURFACEDESC2 surface_desc2;
HRESULT hr;
+
TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
iface, wine_dbgstr_rect(rect), surface_desc, flags, h);
- if (!surface_desc) return DDERR_INVALIDPARAMS;
- if (surface_desc->dwSize != sizeof(DDSURFACEDESC) &&
- surface_desc->dwSize != sizeof(DDSURFACEDESC2))
- {
- WARN("Invalid structure size %d, returning DDERR_INVALIDPARAMS\n", surface_desc->dwSize);
+ if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
return DDERR_INVALIDPARAMS;
- }
surface_desc2.dwSize = surface_desc->dwSize;
surface_desc2.dwFlags = 0;
- hr = surface_lock(surface, rect, &surface_desc2, flags, h);
+ hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
DDSD2_to_DDSD(&surface_desc2, surface_desc);
surface_desc->dwSize = surface_desc2.dwSize;
return hr;
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 7957f1733d5..bc35ae78199 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -5909,7 +5909,6 @@ static void test_surface_lock(void)
expected_hr = tests[i].caps & DDSCAPS_TEXTURE && !(tests[i].caps & DDSCAPS_VIDEOMEMORY)
? DD_OK : DDERR_INVALIDPARAMS;
hr = IDirectDrawSurface7_Lock(surface, NULL, &ddsd, DDLOCK_WAIT, NULL);
- todo_wine_if(expected_hr == D3D_OK)
ok(hr == expected_hr, "Got hr %#x, expected %#x, type %s.\n", hr, expected_hr, tests[i].name);
if (SUCCEEDED(hr))
{
@@ -12340,7 +12339,6 @@ static void test_surface_desc_size(void)
desc.blob[sizeof(DDSURFACEDESC2)] = 0xef;
hr = IDirectDrawSurface_Lock(surface, NULL, &desc.desc1, 0, 0);
expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS;
- todo_wine_if(ignore_size && !valid_size)
ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n",
hr, expected_hr, desc_sizes[j], surface_caps[i].name);
ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n",
@@ -12367,7 +12365,6 @@ static void test_surface_desc_size(void)
desc.blob[sizeof(DDSURFACEDESC2)] = 0xef;
hr = IDirectDrawSurface3_Lock(surface3, NULL, &desc.desc1, 0, 0);
expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS;
- todo_wine_if(ignore_size && !valid_size)
ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n",
hr, expected_hr, desc_sizes[j], surface_caps[i].name);
ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n",
@@ -12394,7 +12391,6 @@ static void test_surface_desc_size(void)
desc.blob[sizeof(DDSURFACEDESC2)] = 0xef;
hr = IDirectDrawSurface7_Lock(surface7, NULL, &desc.desc2, 0, 0);
expected_hr = ignore_size || valid_size ? DD_OK : DDERR_INVALIDPARAMS;
- todo_wine_if(ignore_size && !valid_size)
ok(hr == expected_hr, "Got hr %#x, expected %#x, dwSize %u, type %s.\n",
hr, expected_hr, desc_sizes[j], surface_caps[i].name);
ok(desc.dwSize == desc_sizes[j], "dwSize was changed from %u to %u, type %s.\n",
--
2.11.0

View File

@@ -1 +0,0 @@
Fixes: [14897] Relax dwSize validation ddraw_surface*_Lock

View File

@@ -0,0 +1,71 @@
From 21c71f172c52f18692e2601e40ae5e8d050de4a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 2 Feb 2017 20:49:15 +0100
Subject: kernel32: Add stub for GetPackageFullName.
---
.../api-ms-win-appmodel-runtime-l1-1-1.spec | 2 +-
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/version.c | 9 +++++++++
dlls/kernelbase/kernelbase.spec | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
index af7774d3679..066a674f8f5 100644
--- a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
+++ b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
@@ -10,7 +10,7 @@
@ stub GetCurrentPackagePath
@ stub GetPackageApplicationIds
@ stub GetPackageFamilyName
-@ stub GetPackageFullName
+@ stdcall GetPackageFullName(long ptr ptr) kernel32.GetPackageFullName
@ stub GetPackageId
@ stub GetPackageInfo
@ stub GetPackagePath
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 31811281e61..efb2bdddf32 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -772,7 +772,7 @@
@ stub GetPackageApplicationIds
@ stub GetPackageFamilyName
@ stub GetPackageFamilyNameFromToken
-@ stub GetPackageFullName
+@ stdcall GetPackageFullName(long ptr ptr)
@ stub GetPackageFullNameFromToken
@ stub GetPackageId
@ stub GetPackageInfo
diff --git a/dlls/kernel32/version.c b/dlls/kernel32/version.c
index 53f594eccab..72d1152d20f 100644
--- a/dlls/kernel32/version.c
+++ b/dlls/kernel32/version.c
@@ -216,3 +216,12 @@ LONG WINAPI GetCurrentPackageFamilyName(UINT32 *length, PWSTR name)
FIXME("(%p %p): stub\n", length, name);
return APPMODEL_ERROR_NO_PACKAGE;
}
+
+/***********************************************************************
+ * GetPackageFullName (KERNEL32.@)
+ */
+LONG WINAPI GetPackageFullName(HANDLE process, UINT32 *length, PWSTR name)
+{
+ FIXME("(%p %p %p): stub\n", process, length, name);
+ return APPMODEL_ERROR_NO_PACKAGE;
+}
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index a4951f1baa3..bdfc067cf6d 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -569,7 +569,7 @@
@ stub GetPackageContext
@ stub GetPackageFamilyName
@ stub GetPackageFamilyNameFromToken
-@ stub GetPackageFullName
+@ stdcall GetPackageFullName(long ptr ptr) kernel32.GetPackageFullName
@ stub GetPackageFullNameFromToken
@ stub GetPackageId
@ stub GetPackageInfo
--
2.11.0

View File

@@ -0,0 +1,3 @@
Fixes: Add stub for kernel32.GetPackageFullName
Depends: kernel32-GetCurrentPackageFamilyName
Depends: api-ms-win-Stub_DLLs

View File

@@ -1,4 +1,4 @@
From cdb1ae761d777e7a1cf4c73edd946c94d1e73700 Mon Sep 17 00:00:00 2001
From ddcad4846ab1fe881bed762210f369c621bbb2de Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 05:01:11 +0200
Subject: ntdll: Add handling for partially received messages in NtReadFile.
@@ -18,10 +18,10 @@ Changes in v4:
2 files changed, 30 insertions(+), 55 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 5f5553b..3811ccd 100644
index 71d75be90e8..ae37afd2ee7 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -305,9 +305,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -313,9 +313,7 @@ static void test_CreateNamedPipe(int pipemode)
else
{
SetLastError(0xdeadbeef);
@@ -31,7 +31,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n");
}
ok(readden == 4, "read got %d bytes\n", readden);
@@ -328,15 +326,11 @@ static void test_CreateNamedPipe(int pipemode)
@@ -336,15 +334,11 @@ static void test_CreateNamedPipe(int pipemode)
else
{
SetLastError(0xdeadbeef);
@@ -47,7 +47,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n");
}
ok(readden == 4, "read got %d bytes\n", readden);
@@ -398,9 +392,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -406,9 +400,7 @@ static void test_CreateNamedPipe(int pipemode)
ok(readden == sizeof(obuf) + sizeof(obuf2), "read 4 got %d bytes\n", readden);
}
else {
@@ -58,7 +58,7 @@ index 5f5553b..3811ccd 100644
}
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 4a check\n");
@@ -430,9 +422,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -438,9 +430,7 @@ static void test_CreateNamedPipe(int pipemode)
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
@@ -69,7 +69,7 @@ index 5f5553b..3811ccd 100644
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
if (readden <= sizeof(obuf))
@@ -441,10 +431,8 @@ static void test_CreateNamedPipe(int pipemode)
@@ -449,10 +439,8 @@ static void test_CreateNamedPipe(int pipemode)
/* Multiple writes in the reverse direction */
/* the write of obuf2 from write4 should still be in the buffer */
ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n");
@@ -82,7 +82,7 @@ index 5f5553b..3811ccd 100644
if (avail > 0) {
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
ok(readden == sizeof(obuf2), "read 6a got %d bytes\n", readden);
@@ -462,9 +450,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -470,9 +458,7 @@ static void test_CreateNamedPipe(int pipemode)
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
@@ -93,7 +93,7 @@ index 5f5553b..3811ccd 100644
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
if (readden <= sizeof(obuf))
@@ -475,9 +461,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -483,9 +469,7 @@ static void test_CreateNamedPipe(int pipemode)
ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), "WriteFile 7\n");
ok(written == sizeof(obuf2), "write file len 7\n");
SetLastError(0xdeadbeef);
@@ -103,7 +103,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 7\n");
ok(readden == 4, "read got %d bytes 7\n", readden);
ok(ReadFile(hFile, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile 7\n");
@@ -488,9 +472,7 @@ static void test_CreateNamedPipe(int pipemode)
@@ -496,9 +480,7 @@ static void test_CreateNamedPipe(int pipemode)
ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile 8\n");
ok(written == sizeof(obuf), "write file len 8\n");
SetLastError(0xdeadbeef);
@@ -113,7 +113,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 8\n");
ok(readden == 4, "read got %d bytes 8\n", readden);
ok(ReadFile(hnp, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile 8\n");
@@ -515,16 +497,12 @@ static void test_CreateNamedPipe(int pipemode)
@@ -523,16 +505,12 @@ static void test_CreateNamedPipe(int pipemode)
ok(readden == sizeof(obuf) + sizeof(obuf2), "peek got %d bytes total 9\n", readden);
ok(leftmsg == sizeof(obuf), "peek got %d bytes left in message 9\n", leftmsg);
SetLastError(0xdeadbeef);
@@ -130,7 +130,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n");
ok(readden == 4, "read got %d bytes 9\n", readden);
readden = leftmsg = -1;
@@ -537,7 +515,6 @@ static void test_CreateNamedPipe(int pipemode)
@@ -545,7 +523,6 @@ static void test_CreateNamedPipe(int pipemode)
ok(leftmsg == sizeof(obuf) - 8, "peek got %d bytes left in message 9\n", leftmsg);
ret = RpcReadFile(hFile, ibuf + 8, sizeof(ibuf), &readden, NULL);
ok(ret, "RpcReadFile 9\n");
@@ -138,7 +138,7 @@ index 5f5553b..3811ccd 100644
ok(readden == sizeof(obuf) - 8, "read got %d bytes 9\n", readden);
ok(memcmp(obuf, ibuf, sizeof(obuf)) == 0, "content check 9\n");
if (readden <= sizeof(obuf) - 8) /* blocks forever if second part was already received */
@@ -554,13 +531,10 @@ static void test_CreateNamedPipe(int pipemode)
@@ -562,13 +539,10 @@ static void test_CreateNamedPipe(int pipemode)
SetLastError(0xdeadbeef);
ret = RpcReadFile(hFile, ibuf, 4, &readden, NULL);
ok(!ret, "RpcReadFile 9\n");
@@ -152,7 +152,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n");
ok(readden == 4, "read got %d bytes 9\n", readden);
readden = leftmsg = -1;
@@ -600,16 +574,12 @@ static void test_CreateNamedPipe(int pipemode)
@@ -608,16 +582,12 @@ static void test_CreateNamedPipe(int pipemode)
ok(readden == sizeof(obuf) + sizeof(obuf2), "peek got %d bytes total 10\n", readden);
ok(leftmsg == sizeof(obuf2), "peek got %d bytes left in message 10\n", leftmsg);
SetLastError(0xdeadbeef);
@@ -169,7 +169,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n");
ok(readden == 4, "read got %d bytes 10\n", readden);
readden = leftmsg = -1;
@@ -622,7 +592,6 @@ static void test_CreateNamedPipe(int pipemode)
@@ -630,7 +600,6 @@ static void test_CreateNamedPipe(int pipemode)
ok(leftmsg == sizeof(obuf2) - 8, "peek got %d bytes left in message 10\n", leftmsg);
ret = RpcReadFile(hnp, ibuf + 8, sizeof(ibuf), &readden, NULL);
ok(ret, "RpcReadFile 10\n");
@@ -177,7 +177,7 @@ index 5f5553b..3811ccd 100644
ok(readden == sizeof(obuf2) - 8, "read got %d bytes 10\n", readden);
ok(memcmp(obuf2, ibuf, sizeof(obuf2)) == 0, "content check 10\n");
if (readden <= sizeof(obuf2) - 8) /* blocks forever if second part was already received */
@@ -639,13 +608,10 @@ static void test_CreateNamedPipe(int pipemode)
@@ -647,13 +616,10 @@ static void test_CreateNamedPipe(int pipemode)
SetLastError(0xdeadbeef);
ret = RpcReadFile(hnp, ibuf, 4, &readden, NULL);
ok(!ret, "RpcReadFile 10\n");
@@ -191,7 +191,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n");
ok(readden == 4, "read got %d bytes 10\n", readden);
readden = leftmsg = -1;
@@ -751,15 +717,11 @@ static void test_CreateNamedPipe(int pipemode)
@@ -759,15 +725,11 @@ static void test_CreateNamedPipe(int pipemode)
else
{
SetLastError(0xdeadbeef);
@@ -207,7 +207,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n");
}
ok(readden == 32, "read got %d bytes\n", readden);
@@ -1657,7 +1619,7 @@ static void test_CloseHandle(void)
@@ -1665,7 +1627,7 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hfile, buffer, 0, &numbytes, NULL);
@@ -216,18 +216,18 @@ index 5f5553b..3811ccd 100644
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
numbytes = 0xdeadbeef;
@@ -1750,8 +1712,8 @@ static void test_CloseHandle(void)
@@ -1763,8 +1725,8 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL);
- todo_wine ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
- todo_wine ok(ret || GetLastError() == ERROR_MORE_DATA /* >= Win 8 */,
- "ReadFile failed with %u\n", GetLastError());
+ ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
+ ok(ret || GetLastError() == ERROR_MORE_DATA /* >= Win 8 */,
+ "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
numbytes = 0xdeadbeef;
@@ -2559,7 +2521,6 @@ static void test_readfileex_pending(void)
@@ -2720,7 +2682,6 @@ static void test_readfileex_pending(void)
SetLastError(0xdeadbeef);
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
ok(!ret, "ReadFile should fail\n");
@@ -235,7 +235,7 @@ index 5f5553b..3811ccd 100644
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
ok(num_bytes == 0, "bytes %u\n", num_bytes);
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
@@ -2575,11 +2536,9 @@ todo_wine
@@ -2736,11 +2697,9 @@ todo_wine
ok(num_bytes == 1, "bytes %u\n", num_bytes);
wait = WaitForSingleObject(event, 100);
@@ -248,10 +248,10 @@ index 5f5553b..3811ccd 100644
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index fd6c605..18ee740 100644
index 4a736f42d6d..4347e419029 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -490,7 +490,7 @@ NTSTATUS FILE_GetNtStatus(void)
@@ -492,7 +492,7 @@ NTSTATUS FILE_GetNtStatus(void)
}
}
@@ -260,7 +260,7 @@ index fd6c605..18ee740 100644
static NTSTATUS unix_fd_avail(int fd, int *avail)
{
struct pollfd pollfd;
@@ -519,7 +519,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
@@ -521,7 +521,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
static inline int get_pipe_flags(int fd)
{
#ifdef __linux__
@@ -276,7 +276,7 @@ index fd6c605..18ee740 100644
#else
return 0;
#endif
@@ -565,10 +572,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -567,10 +574,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
if (result >= 0)
{
*total += result;
@@ -291,7 +291,7 @@ index fd6c605..18ee740 100644
switch (type)
{
case FD_TYPE_FILE:
@@ -577,11 +586,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -579,11 +588,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
case FD_TYPE_SERIAL:
return length ? STATUS_PENDING : STATUS_SUCCESS;
@@ -311,7 +311,7 @@ index fd6c605..18ee740 100644
continue;
else if (type != FD_TYPE_FILE) /* no async I/O on regular files */
return STATUS_PENDING;
@@ -1039,7 +1055,7 @@ done:
@@ -1061,7 +1077,7 @@ done:
err:
if (needs_close) close( unix_handle );
@@ -321,5 +321,5 @@ index fd6c605..18ee740 100644
io_status->u.Status = status;
io_status->Information = total;
--
2.6.2
2.11.0

Some files were not shown because too many files have changed in this diff Show More