Rebase against e804e9a5bc9fde9ad8b84dfd121d44afbe177752.

This commit is contained in:
Sebastian Lackner 2017-02-14 17:01:29 +01:00
parent 76007a01a2
commit 60d570e5f1
17 changed files with 346 additions and 668 deletions

View File

@ -1,4 +1,4 @@
From cb383abcb7d36d739092a93c1f276895622b6806 Mon Sep 17 00:00:00 2001
From b4469d7a12637ef2b57df3f6aebbe65c9b52ef57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 28 Aug 2016 21:56:41 +0200
Subject: advapi32: Implement GetExplicitEntriesFromAclW.
@ -9,7 +9,7 @@ Subject: advapi32: Implement GetExplicitEntriesFromAclW.
2 files changed, 221 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 92a1789..c60aa4e 100644
index 7e41c0a7361..ccd0bf64cab 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -4202,8 +4202,85 @@ DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntr
@ -101,7 +101,7 @@ index 92a1789..c60aa4e 100644
/******************************************************************************
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index cf104ab..2bcb108 100644
index c31dfbeace3..23cbff58117 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -133,6 +133,7 @@ static BOOL (WINAPI *pGetWindowsAccountDomainSid)(PSID,PSID,DWORD*);
@ -120,8 +120,8 @@ index cf104ab..2bcb108 100644
myARGC = winetest_get_mainargs( &myARGV );
}
@@ -6378,6 +6380,145 @@ static void test_pseudo_tokens(void)
"Expected ERROR_NO_TOKEN, got %u\n", GetLastError());
@@ -6451,6 +6453,145 @@ static void test_maximum_allowed(void)
CloseHandle(handle);
}
+static void test_GetExplicitEntriesFromAclW(void)
@ -266,12 +266,12 @@ index cf104ab..2bcb108 100644
START_TEST(security)
{
init();
@@ -6424,4 +6565,5 @@ START_TEST(security)
test_system_security_access();
@@ -6499,4 +6640,5 @@ START_TEST(security)
test_GetSidIdentifierAuthority();
test_pseudo_tokens();
test_maximum_allowed();
+ test_GetExplicitEntriesFromAclW();
}
--
2.9.0
2.11.0

View File

@ -1,248 +0,0 @@
From 8b23d1c04949938de77466556f7caf9321687a33 Mon Sep 17 00:00:00 2001
From: Peter Hater <7element@mail.bg>
Date: Wed, 16 Sep 2015 15:49:58 +0300
Subject: comctl32: Implement PROPSHEET_InsertPage based on PROPSHEET_AddPage
---
dlls/comctl32/propsheet.c | 152 +++++++++++++++++++++++++---------------
dlls/comctl32/tests/propsheet.c | 18 ++---
2 files changed, 104 insertions(+), 66 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index ce7001c..fecb0e4 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -172,6 +172,7 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psI
static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo);
static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID);
static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage);
+static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage);
static INT_PTR CALLBACK
PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -2259,60 +2260,9 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
static BOOL PROPSHEET_AddPage(HWND hwndDlg,
HPROPSHEETPAGE hpage)
{
- PropPageInfo * ppi;
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
- HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
- TCITEMW item;
- LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
-
TRACE("hpage %p\n", hpage);
- /*
- * Allocate and fill in a new PropPageInfo entry.
- */
- ppi = ReAlloc(psInfo->proppage, sizeof(PropPageInfo) * (psInfo->nPages + 1));
- if (!ppi)
- return FALSE;
-
- psInfo->proppage = ppi;
- if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages, FALSE))
- return FALSE;
-
- psInfo->proppage[psInfo->nPages].hpage = hpage;
-
- if (ppsp->dwFlags & PSP_PREMATURE)
- {
- /* Create the page but don't show it */
- if(!PROPSHEET_CreatePage(hwndDlg, psInfo->nPages, psInfo, ppsp))
- return FALSE;
- }
-
- /*
- * Add a new tab to the tab control.
- */
- item.mask = TCIF_TEXT;
- item.pszText = (LPWSTR) psInfo->proppage[psInfo->nPages].pszText;
- item.cchTextMax = MAX_TABTEXT_LENGTH;
-
- if (psInfo->hImageList)
- {
- SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
- }
-
- if ( psInfo->proppage[psInfo->nPages].hasIcon )
- {
- item.mask |= TCIF_IMAGE;
- item.iImage = psInfo->nPages;
- }
-
- SendMessageW(hwndTabControl, TCM_INSERTITEMW, psInfo->nPages + 1,
- (LPARAM)&item);
-
- psInfo->nPages++;
-
- /* If it is the only page - show it */
- if(psInfo->nPages == 1)
- PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
- return TRUE;
+ return PROPSHEET_InsertPage(hwndDlg, (HPROPSHEETPAGE)(ULONG_PTR)psInfo->nPages, hpage);
}
/******************************************************************************
@@ -2473,11 +2423,99 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
*/
static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage)
{
- if (IS_INTRESOURCE(hpageInsertAfter))
- FIXME("(%p, %d, %p): stub\n", hwndDlg, LOWORD(hpageInsertAfter), hpage);
- else
- FIXME("(%p, %p, %p): stub\n", hwndDlg, hpageInsertAfter, hpage);
- return FALSE;
+ PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
+ PropPageInfo * ppi, * prev_ppi = psInfo->proppage;
+ HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
+ LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
+ TCITEMW item;
+ int index;
+
+ TRACE("hwndDlg %p, hpageInsertAfter %p, hpage %p\n", hwndDlg, hpageInsertAfter, hpage);
+
+ if (IS_INTRESOURCE(hpageInsertAfter))
+ index = LOWORD(hpageInsertAfter);
+ else
+ {
+ index = PROPSHEET_GetPageIndex(hpageInsertAfter, psInfo, -1);
+ if (index < 0)
+ {
+ TRACE("Could not find page to insert after!\n");
+ return FALSE;
+ }
+ index++;
+ }
+
+ if (index > psInfo->nPages)
+ index = psInfo->nPages;
+
+ /*
+ * Allocate a new PropPageInfo entry.
+ */
+ ppi = Alloc(sizeof(PropPageInfo) * (psInfo->nPages + 1));
+ if (!ppi)
+ return FALSE;
+
+ /*
+ * Fill in a new PropPageInfo entry.
+ */
+ if (index > 0)
+ memcpy(ppi, prev_ppi, index * sizeof(PropPageInfo));
+ memset(&ppi[index], 0, sizeof(PropPageInfo));
+ if (index < psInfo->nPages)
+ memcpy(&ppi[index + 1], &prev_ppi[index], (psInfo->nPages - index) * sizeof(PropPageInfo));
+ psInfo->proppage = ppi;
+
+ if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, index, FALSE))
+ {
+ psInfo->proppage = prev_ppi;
+ Free(ppi);
+ return FALSE;
+ }
+
+ psInfo->proppage[index].hpage = hpage;
+
+ if (ppsp->dwFlags & PSP_PREMATURE)
+ {
+ /* Create the page but don't show it */
+ if(!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppsp))
+ {
+ psInfo->proppage = prev_ppi;
+ Free(ppi);
+ return FALSE;
+ }
+ }
+
+ Free(prev_ppi);
+ psInfo->nPages++;
+ if (index <= psInfo->active_page)
+ psInfo->active_page++;
+
+ /*
+ * Add a new tab to the tab control.
+ */
+ item.mask = TCIF_TEXT;
+ item.pszText = (LPWSTR) psInfo->proppage[index].pszText;
+ item.cchTextMax = MAX_TABTEXT_LENGTH;
+
+ if (psInfo->hImageList)
+ {
+ SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
+ }
+
+ if (psInfo->proppage[index].hasIcon)
+ {
+ item.mask |= TCIF_IMAGE;
+ item.iImage = index;
+ }
+
+ SendMessageW(hwndTabControl, TCM_INSERTITEMW, index,
+ (LPARAM)&item);
+
+ /* If it is the only page - show it */
+ if (psInfo->nPages == 1)
+ PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
+
+ return TRUE;
}
/******************************************************************************
diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c
index cdbbca8..bcc89bb 100644
--- a/dlls/comctl32/tests/propsheet.c
+++ b/dlls/comctl32/tests/propsheet.c
@@ -920,7 +920,7 @@ static void test_PSM_INSERTPAGE(void)
/* add pages one by one */
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 5, (LPARAM)hpsp[1]);
- todo_wine ok(ret == TRUE, "got %d\n", ret);
+ ok(ret == TRUE, "got %d\n", ret);
/* try with invalid values */
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 0, 0);
@@ -939,34 +939,34 @@ if (0)
tab = (HWND)SendMessageA(hdlg, PSM_GETTABCONTROL, 0, 0);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
- todo_wine ok(r == 2, "got %d\n", r);
+ ok(r == 2, "got %d\n", r);
ret = SendMessageA(hdlg, PSM_INSERTPAGE, (WPARAM)hpsp[1], (LPARAM)hpsp[2]);
- todo_wine ok(ret == TRUE, "got %d\n", ret);
+ ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
- todo_wine ok(r == 3, "got %d\n", r);
+ ok(r == 3, "got %d\n", r);
/* add property sheet page that can't be created */
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 1, (LPARAM)hpsp[3]);
- todo_wine ok(ret == TRUE, "got %d\n", ret);
+ ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
- todo_wine ok(r == 4, "got %d\n", r);
+ ok(r == 4, "got %d\n", r);
/* select page that can't be created */
ret = SendMessageA(hdlg, PSM_SETCURSEL, 1, 0);
- todo_wine ok(ret == TRUE, "got %d\n", ret);
+ ok(ret == TRUE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
- todo_wine ok(r == 3, "got %d\n", r);
+ ok(r == 3, "got %d\n", r);
/* test PSP_PREMATURE flag with incorrect property sheet page */
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 0, (LPARAM)hpsp[4]);
ok(ret == FALSE, "got %d\n", ret);
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
- todo_wine ok(r == 3, "got %d\n", r);
+ ok(r == 3, "got %d\n", r);
DestroyPropertySheetPage(hpsp[4]);
DestroyWindow(hdlg);
--
2.6.1

View File

@ -1,2 +1 @@
Fixes: [25625] Add implementation for comctl32.PROPSHEET_InsertPage.
Fixes: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications

View File

@ -1,29 +0,0 @@
From ee74f6d71079cda75ba94841e4369c519489c879 Mon Sep 17 00:00:00 2001
From: Henri Verbeet <hverbeet@codeweavers.com>
Date: Tue, 11 Nov 2014 22:32:00 +0100
Subject: d3d9: Don't decrease surface refcount when its already zero.
---
dlls/d3d9/surface.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c
index e5eb11f..2aab5f3 100644
--- a/dlls/d3d9/surface.c
+++ b/dlls/d3d9/surface.c
@@ -91,6 +91,12 @@ static ULONG WINAPI d3d9_surface_Release(IDirect3DSurface9 *iface)
return IDirect3DBaseTexture9_Release(&surface->texture->IDirect3DBaseTexture9_iface);
}
+ if (!surface->resource.refcount)
+ {
+ ERR("Surface doesn't have any references.\n");
+ return 0;
+ }
+
refcount = InterlockedDecrement(&surface->resource.refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
--
2.1.3

View File

@ -1 +0,0 @@
Fixes: [18477] Avoid crashing when broken app tries to release surface although refcount is zero

View File

@ -1,10 +1,9 @@
From b861a3f2d105bca65ade87b8dde7a683bc853b89 Mon Sep 17 00:00:00 2001
From 1db0b7784f49f336ba7243fde42f5ff67eb67fa8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 5 Sep 2016 15:31:29 +0200
Subject: inseng: Implement CIF reader and download functions.
FIXME: Needs splitting.
---
dlls/inseng/Makefile.in | 7 +-
dlls/inseng/icif.c | 1745 ++++++++++++++++++++++++++++++++++++++++++
@ -19,7 +18,7 @@ FIXME: Needs splitting.
create mode 100644 dlls/inseng/inseng_private.h
diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in
index 652e06b..d0aaa66 100644
index 652e06b0f25..d0aaa663b08 100644
--- a/dlls/inseng/Makefile.in
+++ b/dlls/inseng/Makefile.in
@@ -1,6 +1,9 @@
@ -36,7 +35,7 @@ index 652e06b..d0aaa66 100644
IDL_SRCS = inseng_classes.idl
diff --git a/dlls/inseng/icif.c b/dlls/inseng/icif.c
new file mode 100644
index 0000000..177f1b8
index 00000000000..177f1b892ce
--- /dev/null
+++ b/dlls/inseng/icif.c
@@ -0,0 +1,1745 @@
@ -1787,7 +1786,7 @@ index 0000000..177f1b8
+}
diff --git a/dlls/inseng/inf.c b/dlls/inseng/inf.c
new file mode 100644
index 0000000..4e164cc
index 00000000000..4e164cc7b85
--- /dev/null
+++ b/dlls/inseng/inf.c
@@ -0,0 +1,443 @@
@ -2235,7 +2234,7 @@ index 0000000..4e164cc
+ return hr;
+}
diff --git a/dlls/inseng/inseng.spec b/dlls/inseng/inseng.spec
index 82c0b4d..7ae46fa 100644
index 82c0b4d5fe1..7ae46fad3a7 100644
--- a/dlls/inseng/inseng.spec
+++ b/dlls/inseng/inseng.spec
@@ -7,6 +7,6 @@
@ -2248,7 +2247,7 @@ index 82c0b4d..7ae46fa 100644
+@ stdcall GetICifRWFileFromFile(ptr str)
@ stub PurgeDownloadDirectory
diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c
index 03ec984..7b1e763 100644
index c95d2c73216..7b1e763f2ff 100644
--- a/dlls/inseng/inseng_main.c
+++ b/dlls/inseng/inseng_main.c
@@ -2,6 +2,7 @@
@ -2274,12 +2273,12 @@ index 03ec984..7b1e763 100644
WINE_DEFAULT_DEBUG_CHANNEL(inseng);
-static inline void *heap_alloc(size_t len)
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
+static HINSTANCE instance;
+
+enum thread_operation
{
- return HeapAlloc(GetProcessHeap(), 0, len);
- return HeapAlloc(GetProcessHeap(), 0, size);
-}
+ OP_DOWNLOAD,
+ OP_INSTALL
@ -3462,7 +3461,7 @@ index 03ec984..7b1e763 100644
IInstallEngine2_Release(&engine->IInstallEngine2_iface);
diff --git a/dlls/inseng/inseng_private.h b/dlls/inseng/inseng_private.h
new file mode 100644
index 0000000..d5966b0
index 00000000000..1e739d22128
--- /dev/null
+++ b/dlls/inseng/inseng_private.h
@@ -0,0 +1,93 @@
@ -3492,9 +3491,9 @@ index 0000000..d5966b0
+#include "inseng.h"
+#include "wine/unicode.h"
+
+static inline void *heap_alloc(size_t len)
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
+{
+ return HeapAlloc(GetProcessHeap(), 0, len);
+ return HeapAlloc(GetProcessHeap(), 0, size);
+}
+
+static inline void *heap_zero_alloc(size_t len)
@ -3560,7 +3559,7 @@ index 0000000..d5966b0
+void component_set_installed(ICifComponent *iface, BOOL value) DECLSPEC_HIDDEN;
+ char *component_get_id(ICifComponent *iface) DECLSPEC_HIDDEN;
diff --git a/include/inseng.idl b/include/inseng.idl
index 8a3f4c4..8292741 100644
index 8a3f4c4d270..82927418a99 100644
--- a/include/inseng.idl
+++ b/include/inseng.idl
@@ -1,5 +1,6 @@
@ -3886,5 +3885,5 @@ index 8a3f4c4..8292741 100644
+cpp_quote("HRESULT WINAPI GetICifFileFromFile(ICifFile **, const char *);")
+cpp_quote("HRESULT WINAPI GetICifRWFileFromFile(ICifRWFile **, const char *);")
--
2.9.0
2.11.0

View File

@ -1,4 +1,4 @@
From 855c99952103f3f76d2c38e1471570dee8dbf2c3 Mon Sep 17 00:00:00 2001
From f6967e9045f8bfed79aa6b995c5d1dc96a44c17b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 3 Apr 2016 18:22:29 +0200
Subject: iccvid: Fix calculation of stride and size.
@ -9,11 +9,11 @@ Subject: iccvid: Fix calculation of stride and size.
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c
index 1ef2db6..0531f31 100644
index e5d514703ee..bf9e48883d3 100644
--- a/dlls/iccvid/iccvid.c
+++ b/dlls/iccvid/iccvid.c
@@ -91,6 +91,10 @@ static inline BOOL heap_free( LPVOID ptr )
return HeapFree( GetProcessHeap(), 0, ptr );
@@ -91,6 +91,10 @@ static inline BOOL heap_free(void *mem)
return HeapFree(GetProcessHeap(), 0, mem);
}
+static inline int get_stride(int width, int depth)
@ -45,7 +45,7 @@ index 1ef2db6..0531f31 100644
}
return size;
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index 91628e2..7943184 100644
index 000e615ad0f..6f32034954a 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -93,6 +93,7 @@ static void test_Locate(void)
@ -103,5 +103,5 @@ index 91628e2..7943184 100644
bo.biBitCount = bi.biBitCount = 8;
--
2.7.1
2.11.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "9c72376c8cc03a4ea86dddaa6d18a93a1a33fc73"
echo "e804e9a5bc9fde9ad8b84dfd121d44afbe177752"
}
# Show version information
@ -116,7 +116,6 @@ patch_enable_all ()
enable_d3d11_ResolveSubresource="$1"
enable_d3d8_ValidateShader="$1"
enable_d3d9_DesktopWindow="$1"
enable_d3d9_Surface_Refcount="$1"
enable_d3d9_Tests="$1"
enable_d3dx9_25_ID3DXEffect="$1"
enable_d3dx9_36_BumpLuminance="$1"
@ -562,9 +561,6 @@ patch_enable ()
d3d9-DesktopWindow)
enable_d3d9_DesktopWindow="$2"
;;
d3d9-Surface_Refcount)
enable_d3d9_Surface_Refcount="$2"
;;
d3d9-Tests)
enable_d3d9_Tests="$2"
;;
@ -2987,17 +2983,12 @@ fi
# Patchset comctl32-PROPSHEET_InsertPage
# |
# | This patchset fixes the following Wine bugs:
# | * [#25625] Add implementation for comctl32.PROPSHEET_InsertPage.
# |
# | Modified files:
# | * dlls/comctl32/propsheet.c, dlls/comctl32/tests/propsheet.c, include/prsht.h
# | * dlls/comctl32/propsheet.c, include/prsht.h
# |
if test "$enable_comctl32_PROPSHEET_InsertPage" -eq 1; then
patch_apply comctl32-PROPSHEET_InsertPage/0002-comctl32-Implement-PROPSHEET_InsertPage-based-on-PRO.patch
patch_apply comctl32-PROPSHEET_InsertPage/0003-comctl32-Add-support-for-PSPCB_ADDREF-PSPCB_RELEASE-.patch
(
printf '%s\n' '+ { "Peter Hater", "comctl32: Implement PROPSHEET_InsertPage based on PROPSHEET_AddPage.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications.", 2 },';
) >> "$patchlist"
fi
@ -3292,21 +3283,6 @@ if test "$enable_d3d9_DesktopWindow" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3d9-Surface_Refcount
# |
# | This patchset fixes the following Wine bugs:
# | * [#18477] Avoid crashing when broken app tries to release surface although refcount is zero
# |
# | Modified files:
# | * dlls/d3d9/surface.c
# |
if test "$enable_d3d9_Surface_Refcount" -eq 1; then
patch_apply d3d9-Surface_Refcount/0001-d3d9-Don-t-decrease-surface-refcount-when-its-alread.patch
(
printf '%s\n' '+ { "Henri Verbeet", "d3d9: Don'\''t decrease surface refcount when its already zero.", 1 },';
) >> "$patchlist"
fi
# Patchset d3d9-Tests
# |
# | Modified files:
@ -6506,8 +6482,8 @@ fi
# | * [#33576] Support for stored file ACLs
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, include/wine/port.h, server/change.c, server/file.c, server/file.h, server/handle.c,
# | server/object.c, server/object.h
# | * dlls/advapi32/tests/security.c, include/wine/port.h, server/change.c, server/file.c, server/file.h, server/object.c,
# | server/object.h
# |
if test "$enable_server_Stored_ACLs" -eq 1; then
patch_apply server-Stored_ACLs/0001-server-Unify-the-storage-of-security-attributes-for-.patch
@ -6517,7 +6493,6 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
patch_apply server-Stored_ACLs/0005-server-Store-file-security-attributes-with-extended-.patch
patch_apply server-Stored_ACLs/0006-server-Convert-return-of-file-security-masks-with-ge.patch
patch_apply server-Stored_ACLs/0007-server-Retrieve-file-security-attributes-with-extend.patch
patch_apply server-Stored_ACLs/0009-server-Give-all-access-rights-when-opening-an-object.patch
(
printf '%s\n' '+ { "Erich E. Hoover", "server: Unify the storage of security attributes for files and directories.", 7 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Unify the retrieval of security attributes for files and directories.", 7 },';
@ -6526,7 +6501,6 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
printf '%s\n' '+ { "Erich E. Hoover", "server: Store file security attributes with extended file attributes.", 8 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Convert return of file security masks with generic access mappings.", 7 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Retrieve file security attributes with extended file attributes.", 7 },';
printf '%s\n' '+ { "Michael Müller", "server: Give all access rights when opening an object with MAXIMUM_ALLOWED.", 1 },';
) >> "$patchlist"
fi
@ -8426,7 +8400,6 @@ fi
if test "$enable_wined3d_CSMT_Main" -eq 1; then
patch_apply wined3d-CSMT_Main/9999-IfDefined.patch
(
printf '%s\n' '+ { "Michael Müller", "wined3d: Replace surface_load_location with texture_load_location.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Hackily introduce a multithreaded command stream.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send push_constants through the CS.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Give the cs its own state.", 1 },';

View File

@ -1,4 +1,4 @@
From 5ee9eaecad03eda9e6eb45abc23ce20f49f17c13 Mon Sep 17 00:00:00 2001
From c70143ce52b1043b440c966bab08dbf8f3e0e98f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 12 Jan 2017 05:28:30 +0100
Subject: advapi32/tests: Add basic tests for token security descriptors.
@ -8,10 +8,10 @@ Subject: advapi32/tests: Add basic tests for token security descriptors.
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 263d2f11544..8af1d0604a4 100644
index 89816d37665..3faf8574856 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -217,6 +217,7 @@ static void init(void)
@@ -231,6 +231,7 @@ static void init(void)
pGetWindowsAccountDomainSid = (void *)GetProcAddress(hmod, "GetWindowsAccountDomainSid");
pGetSidIdentifierAuthority = (void *)GetProcAddress(hmod, "GetSidIdentifierAuthority");
pGetExplicitEntriesFromAclW = (void *)GetProcAddress(hmod, "GetExplicitEntriesFromAclW");
@ -19,7 +19,7 @@ index 263d2f11544..8af1d0604a4 100644
myARGC = winetest_get_mainargs( &myARGV );
}
@@ -3117,7 +3118,6 @@ static void test_impersonation_level(void)
@@ -3014,7 +3015,6 @@ static void test_impersonation_level(void)
HKEY hkey;
DWORD error;
@ -27,7 +27,7 @@ index 263d2f11544..8af1d0604a4 100644
if( !pDuplicateTokenEx ) {
win_skip("DuplicateTokenEx is not available\n");
return;
@@ -7136,6 +7136,90 @@ static void test_GetExplicitEntriesFromAclW(void)
@@ -7041,6 +7041,90 @@ static void test_GetExplicitEntriesFromAclW(void)
HeapFree(GetProcessHeap(), 0, old_acl);
}
@ -118,9 +118,9 @@ index 263d2f11544..8af1d0604a4 100644
START_TEST(security)
{
init();
@@ -7185,4 +7269,5 @@ START_TEST(security)
test_GetSidIdentifierAuthority();
@@ -7091,4 +7175,5 @@ START_TEST(security)
test_pseudo_tokens();
test_maximum_allowed();
test_GetExplicitEntriesFromAclW();
+ test_token_security_descriptor();
}

View File

@ -1,4 +1,4 @@
From df7287c73f6031de82dc674ea6338037537f0012 Mon Sep 17 00:00:00 2001
From e47cea1eefd5287c7bf08b86419e43a7f54c718e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 12 Jan 2017 05:37:42 +0100
Subject: advapi32/tests: Show that tokens do not inherit dacls while creating
@ -9,10 +9,10 @@ Subject: advapi32/tests: Show that tokens do not inherit dacls while creating
1 file changed, 129 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index a2d0538b491..05b0c73edd6 100644
index 027bef76b00..d0fc463d008 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7141,12 +7141,15 @@ static void test_token_security_descriptor(void)
@@ -7046,12 +7046,15 @@ static void test_token_security_descriptor(void)
ACCESS_ALLOWED_ACE *ace;
char buffer_sd[SECURITY_DESCRIPTOR_MIN_LENGTH];
SECURITY_DESCRIPTOR *sd = (SECURITY_DESCRIPTOR *)&buffer_sd, *sd2;
@ -31,7 +31,7 @@ index a2d0538b491..05b0c73edd6 100644
PSID psid;
if (!pDuplicateTokenEx || !pConvertStringSidToSidA || !pAddAccessAllowedAceEx || !pGetAce || !pSetEntriesInAclW)
@@ -7253,6 +7256,76 @@ static void test_token_security_descriptor(void)
@@ -7158,6 +7161,76 @@ static void test_token_security_descriptor(void)
HeapFree(GetProcessHeap(), 0, sd2);
@ -108,7 +108,7 @@ index a2d0538b491..05b0c73edd6 100644
LocalFree(psid);
CloseHandle(token3);
@@ -7260,6 +7333,53 @@ static void test_token_security_descriptor(void)
@@ -7165,6 +7238,53 @@ static void test_token_security_descriptor(void)
CloseHandle(token);
}
@ -162,7 +162,7 @@ index a2d0538b491..05b0c73edd6 100644
START_TEST(security)
{
init();
@@ -7267,7 +7387,10 @@ START_TEST(security)
@@ -7172,7 +7292,10 @@ START_TEST(security)
if (myARGC >= 3)
{
@ -174,9 +174,9 @@ index a2d0538b491..05b0c73edd6 100644
return;
}
test_kernel_objects_security();
@@ -7309,5 +7432,7 @@ START_TEST(security)
test_GetSidIdentifierAuthority();
@@ -7215,5 +7338,7 @@ START_TEST(security)
test_pseudo_tokens();
test_maximum_allowed();
test_GetExplicitEntriesFromAclW();
+
+ /* must be the last test, modifies process token */

View File

@ -1,73 +0,0 @@
From 32c244368e3a3d5dd4fe642af6f5c6409bea7065 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 16 Oct 2016 02:01:16 +0200
Subject: server: Give all access rights when opening an object with
MAXIMUM_ALLOWED.
---
dlls/advapi32/tests/security.c | 29 +++++++++++++++++++++++++++++
server/handle.c | 1 +
2 files changed, 30 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 3c6c0ab02be..f8aa49e04ed 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -6016,6 +6016,34 @@ static void test_process_access(void)
CloseHandle(process);
}
+static void test_maximum_allowed(void)
+{
+ char buffer_sd[SECURITY_DESCRIPTOR_MIN_LENGTH], buffer_acl[256];
+ SECURITY_DESCRIPTOR *sd = (SECURITY_DESCRIPTOR *)&buffer_sd;
+ SECURITY_ATTRIBUTES sa;
+ ACL *acl = (ACL *)&buffer_acl;
+ ACCESS_MASK mask;
+ HANDLE handle;
+ BOOL ret;
+
+ ret = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION);
+ ok(ret, "InitializeSecurityDescriptor failed with %u\n", GetLastError());
+ ret = InitializeAcl(acl, 256, ACL_REVISION);
+ ok(ret, "InitializeAcl failed with %u\n", GetLastError());
+ ret = SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE);
+ ok(ret, "SetSecurityDescriptorDacl failed with %u\n", GetLastError());
+
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = sd;
+ sa.bInheritHandle = FALSE;
+
+ handle = CreateEventExA(&sa, NULL, 0, MAXIMUM_ALLOWED | 0x4);
+ ok(handle != NULL, "CreateEventExA failed with error %u\n", GetLastError());
+ mask = get_obj_access(handle);
+ ok(mask == EVENT_ALL_ACCESS, "Expected %x, got %x\n", EVENT_ALL_ACCESS, mask);
+ CloseHandle(handle);
+}
+
static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type)
{
DWORD ret, needed;
@@ -6094,6 +6122,7 @@ static void test_kernel_objects_security(void)
test_filemap_security();
test_thread_security();
test_process_access();
+ test_maximum_allowed();
/* FIXME: test other kernel object types */
CloseHandle(process_token);
diff --git a/server/handle.c b/server/handle.c
index 37fba69eac3..4d8d03a494c 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -273,6 +273,7 @@ obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr, u
{
struct object *obj = ptr;
access = obj->ops->map_access( obj, access ) & ~RESERVED_ALL;
+ if (access & MAXIMUM_ALLOWED) access = obj->ops->map_access( obj, GENERIC_ALL );
return alloc_handle_entry( process, ptr, access, attr );
}
--
2.11.0

View File

@ -1,4 +1,4 @@
From bcc6ed08de4f52715ee6399462cf99b71407b074 Mon Sep 17 00:00:00 2001
From 0aa5808311611480120f1e07614ba0dca286d26c Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more+wine@gmail.com>
Date: Fri, 27 Feb 2015 21:24:58 +0100
Subject: version: Test for VerQueryValueA (try 2)
@ -18,10 +18,10 @@ suggested by nsivov from #winehackers.
1 file changed, 127 insertions(+)
diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c
index 107cfac..1c60cd6 100644
index d3420bcbbe3..9c850e6f637 100644
--- a/dlls/version/tests/info.c
+++ b/dlls/version/tests/info.c
@@ -574,6 +574,132 @@ static void test_VerQueryValueA(void)
@@ -577,6 +577,132 @@ static void test_VerQueryValueA(void)
HeapFree(GetProcessHeap(), 0, ver);
}
@ -154,13 +154,14 @@ index 107cfac..1c60cd6 100644
static void test_extra_block(void)
{
WORD extra_block[] = {
@@ -630,5 +756,6 @@ START_TEST(info)
@@ -730,6 +856,7 @@ START_TEST(info)
test_info();
test_32bit_win();
test_VerQueryValueA();
+ test_VerQueryValue_InvalidLength();
test_extra_block();
test_GetFileVersionInfoEx();
}
--
2.3.1
2.11.0

View File

@ -1,26 +0,0 @@
From d08d8a1233fd4d1fcb269b6e364c2122183fdd3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 5 Feb 2017 16:34:41 +0100
Subject: wined3d: Replace surface_load_location with texture_load_location.
---
dlls/wined3d/device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 74a4b09ab1a..4d0f6f2c4be 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -286,7 +286,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
{
DWORD location = render_offscreen ? dsv->resource->draw_binding : WINED3D_LOCATION_DRAWABLE;
- surface_load_location(depth_stencil, context, location);
+ wined3d_texture_load_location(depth_stencil->container, dsv->sub_resource_idx,
+ context, location);
}
if (!context_apply_clear_state(context, state, rt_count, fb))
--
2.11.0

View File

@ -1,4 +1,4 @@
From 7697164372445198d05abf7dc616c25a8189cc49 Mon Sep 17 00:00:00 2001
From b79fac0cba54644719f1993f48550212666185ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
@ -14,10 +14,10 @@ Subject: wined3d: Hackily introduce a multithreaded command stream
7 files changed, 517 insertions(+), 67 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index c1dbe9e835f..5ca4a14fa6a 100644
index 8cb90b796b8..b1b57a261a3 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3759,7 +3759,7 @@ static void test_occlusion_query(void)
@@ -3772,7 +3772,7 @@ static void test_occlusion_query(void)
memset(&data, 0xff, sizeof(data));
hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
@ -27,10 +27,10 @@ index c1dbe9e835f..5ca4a14fa6a 100644
memset(&data, 0xff, sizeof(data));
hr = ID3D10Asynchronous_GetData(query, &data, sizeof(DWORD), 0);
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 2e67b720f56..c1a99ce0ab9 100644
index e477f220817..380224e2de7 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -5245,7 +5245,7 @@ static void test_occlusion_query(void)
@@ -5255,7 +5255,7 @@ static void test_occlusion_query(void)
memset(&data, 0xff, sizeof(data));
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(data), 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
@ -39,7 +39,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
memset(&data, 0xff, sizeof(data));
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(DWORD), 0);
@@ -9533,7 +9533,7 @@ static void test_draw_uav_only(void)
@@ -9543,7 +9543,7 @@ static void test_draw_uav_only(void)
draw_quad(&test_context);
draw_quad(&test_context);
draw_quad(&test_context);
@ -48,7 +48,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11PixelShader_Release(ps);
ID3D11Texture2D_Release(texture);
@@ -13205,12 +13205,12 @@ static void test_cs_uav_store(void)
@@ -13215,12 +13215,12 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@ -63,7 +63,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13218,19 +13218,19 @@ static void test_cs_uav_store(void)
@@ -13228,19 +13228,19 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_CSSetShader(context, NULL, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@ -86,7 +86,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13241,17 +13241,17 @@ static void test_cs_uav_store(void)
@@ -13251,17 +13251,17 @@ static void test_cs_uav_store(void)
input.x = 1.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, texture_desc.Width, texture_desc.Height, 1);
@ -108,7 +108,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13263,16 +13263,16 @@ static void test_cs_uav_store(void)
@@ -13273,16 +13273,16 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 15, 15, 1);
SetRect(&rect, 0, 0, 60, 60);
@ -129,7 +129,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13283,12 +13283,12 @@ static void test_cs_uav_store(void)
@@ -13293,12 +13293,12 @@ static void test_cs_uav_store(void)
input.x = 0.3f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@ -144,7 +144,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13441,10 +13441,10 @@ static void test_ps_cs_uav_binding(void)
@@ -13451,10 +13451,10 @@ static void test_ps_cs_uav_binding(void)
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@ -157,7 +157,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
check_texture_float(ps_texture, 1.0f, 2);
input.x = 0.5f;
@@ -13463,10 +13463,10 @@ static void test_ps_cs_uav_binding(void)
@@ -13473,10 +13473,10 @@ static void test_ps_cs_uav_binding(void)
input.x = 4.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@ -171,7 +171,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 7f3e30b498d..31725b27c88 100644
index 778cd4679ff..d3b8c24f511 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1353,6 +1353,9 @@ void context_release(struct wined3d_context *context)
@ -184,7 +184,7 @@ index 7f3e30b498d..31725b27c88 100644
if (!--context->level)
{
if (context_restore_pixel_format(context))
@@ -3705,6 +3708,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
@@ -3692,6 +3695,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
TRACE("device %p, target %p.\n", device, target);
@ -199,7 +199,7 @@ index 7f3e30b498d..31725b27c88 100644
current_context = NULL;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1d2870e1f95..5b8c060f928 100644
index 3a46a3c9a30..aabcb675044 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -18,14 +18,26 @@
@ -651,7 +651,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -1036,13 +1200,15 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1036,7 +1200,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -659,8 +659,9 @@ index 1d2870e1f95..5b8c060f928 100644
+static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_shader_resource_view *op = data;
struct wined3d_shader_resource_view *prev;
@@ -1051,6 +1215,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
cs->state.shader_resource_view[op->type][op->view_idx] = op->view;
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
+
@ -668,7 +669,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1059,7 +1225,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1067,7 +1233,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@ -677,7 +678,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_unordered_access_view *op = data;
struct wined3d_unordered_access_view *prev;
@@ -1073,6 +1239,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
@@ -1081,6 +1247,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
InterlockedDecrement(&prev->resource->bind_count);
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
@ -686,7 +687,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
@@ -1089,12 +1257,14 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1097,12 +1265,14 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
cs->ops->submit(cs);
}
@ -702,7 +703,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1111,7 +1281,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1119,7 +1289,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -711,7 +712,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_shader *op = data;
@@ -1119,6 +1289,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1127,6 +1297,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_SHADER(op->type));
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
@ -720,7 +721,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -1133,12 +1305,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1141,12 +1313,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -736,7 +737,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1153,12 +1327,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1161,12 +1335,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -752,7 +753,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -1173,12 +1349,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1181,12 +1357,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@ -768,7 +769,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1195,12 +1373,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1203,12 +1381,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@ -784,7 +785,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1217,13 +1397,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1225,13 +1405,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@ -801,7 +802,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -1239,12 +1421,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1247,12 +1429,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs->ops->submit(cs);
}
@ -817,7 +818,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -1259,7 +1443,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1267,7 +1451,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs->ops->submit(cs);
}
@ -826,7 +827,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -1320,6 +1504,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
@@ -1328,6 +1512,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
@ -835,7 +836,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -1342,12 +1528,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1350,12 +1536,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@ -851,7 +852,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -1361,7 +1549,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1369,7 +1557,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs->ops->submit(cs);
}
@ -860,7 +861,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
@@ -1369,6 +1557,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1377,6 +1565,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
memset(&cs->state, 0, sizeof(cs->state));
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
@ -869,7 +870,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1381,11 +1571,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1389,11 +1579,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -884,7 +885,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
@@ -1400,12 +1592,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1408,12 +1600,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
cs->ops->submit(cs);
}
@ -900,7 +901,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1420,13 +1614,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1428,13 +1622,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs);
}
@ -943,7 +944,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1442,13 +1664,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1450,13 +1672,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
@ -960,7 +961,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1464,13 +1688,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1472,13 +1696,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@ -977,7 +978,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -1488,17 +1714,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1496,17 +1722,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
op->flags = flags;
op->hr = &hr;
@ -999,7 +1000,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
@@ -1512,13 +1740,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1520,13 +1748,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
op->sub_resource_idx = sub_resource_idx;
op->hr = &hr;
@ -1037,7 +1038,7 @@ index 1d2870e1f95..5b8c060f928 100644
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
@@ -1550,10 +1800,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1558,10 +1808,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
@ -1050,7 +1051,7 @@ index 1d2870e1f95..5b8c060f928 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1627,9 +1879,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -1635,9 +1887,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
{
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
@ -1164,7 +1165,7 @@ index 1d2870e1f95..5b8c060f928 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1659,12 +2015,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1667,12 +2023,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@ -1273,7 +1274,7 @@ index e7962465279..a8409cfd4b8 100644
if (hkey) RegCloseKey( hkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 09797950295..b2655c381ce 100644
index 0931d6aea95..684a04716dd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -306,6 +306,7 @@ struct wined3d_settings

View File

@ -1,18 +1,60 @@
From f0062383c0837e2faa414c042f4b93506a40501b Mon Sep 17 00:00:00 2001
From f1ae6d0fecbb0b7da36e929c5a960a574b6044d5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 7 Feb 2017 14:01:52 +0100
Subject: wined3d: Send buffer update subresource requests through CS.
---
dlls/wined3d/cs.c | 11 +++++++++++
dlls/wined3d/device.c | 7 +------
2 files changed, 12 insertions(+), 6 deletions(-)
dlls/d3d10core/tests/device.c | 2 ++
dlls/d3d11/tests/d3d11.c | 2 ++
dlls/wined3d/cs.c | 11 +++++++++++
dlls/wined3d/device.c | 7 +------
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 8cb90b796b8..f918aaf41d7 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -7759,6 +7759,7 @@ float4 main(const ps_in v) : SV_TARGET
ID3D10Device_Draw(device, 4, 0);
color = get_texture_color(test_context.backbuffer, 319, 239);
+ todo_wine_if(test_data[i].index == 1)
ok(compare_color(color, test_data[i].expected, 1),
"Got unexpected color 0x%08x for index %d.\n", color, test_data[i].index);
}
@@ -9928,6 +9929,7 @@ static void test_line_antialiasing_blending(void)
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &green.x);
draw_color_quad(&test_context, &red);
+ todo_wine
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
ID3D10Device_OMSetBlendState(device, NULL, NULL, D3D10_DEFAULT_SAMPLE_MASK);
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e477f220817..ad78cb92c12 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9709,6 +9709,7 @@ float4 main(const ps_in v) : SV_TARGET
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)index_cb, 0, NULL, &index, 0, 0);
draw_quad(&test_context);
+ todo_wine_if(test_data[i].index == 1)
check_texture_color(test_context.backbuffer, test_data[i].expected, 1);
}
@@ -11960,6 +11961,7 @@ static void test_line_antialiasing_blending(void)
ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, &green.x);
draw_color_quad(&test_context, &red);
+ todo_wine
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
ID3D11DeviceContext_OMSetBlendState(context, NULL, NULL, D3D11_DEFAULT_SAMPLE_MASK);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index cdd11e41c91..d2aacaa261a 100644
index f030ff0a0d5..cb7ebaab416 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2233,6 +2233,17 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
@@ -2265,6 +2265,17 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
struct wined3d_texture *texture;
unsigned int width, height, depth, level;
@ -31,10 +73,10 @@ index cdd11e41c91..d2aacaa261a 100644
level = op->sub_resource_idx % texture->level_count;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f3412088483..8a02e5db229 100644
index 28b77725e4c..52c759426bf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4153,18 +4153,13 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4243,18 +4243,13 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
if (resource->type == WINED3D_RTYPE_BUFFER)
{

View File

@ -1,4 +1,4 @@
From 6e83bf779eecfef66d5ddad20c034d06f3fa0a05 Mon Sep 17 00:00:00 2001
From 2280d5ed73ea601728cbf19c60a857ef9f37f4ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Thu, 7 Apr 2016 19:51:54 +0100
Subject: wined3d: Don't access device state in clears.
@ -10,10 +10,10 @@ Subject: wined3d: Don't access device state in clears.
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 51dfaea4ed4..3fac8562d36 100644
index 82804d7b09b..dc2b0fbbacb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2639,7 +2639,7 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
@@ -2637,7 +2637,7 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
}
/* Context activation is done by the caller. */
@ -22,7 +22,7 @@ index 51dfaea4ed4..3fac8562d36 100644
UINT rt_count, const struct wined3d_fb_state *fb)
{
struct wined3d_rendertarget_view **rts = fb->render_targets;
@@ -2648,7 +2648,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2646,7 +2646,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -31,7 +31,7 @@ index 51dfaea4ed4..3fac8562d36 100644
|| rt_count != gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2734,7 +2734,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2732,7 +2732,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB])
{
@ -42,7 +42,7 @@ index 51dfaea4ed4..3fac8562d36 100644
else
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e840ff67cdb..d70d51a7d7a 100644
index 6e469b21014..3f5fd7988d4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -223,7 +223,6 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -54,7 +54,7 @@ index e840ff67cdb..d70d51a7d7a 100644
UINT drawable_width, drawable_height;
struct wined3d_color corrected_color;
@@ -290,7 +289,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
context, location);
dsv->sub_resource_idx, context, location);
}
- if (!context_apply_clear_state(context, state, rt_count, fb))
@ -72,10 +72,10 @@ index e840ff67cdb..d70d51a7d7a 100644
if (rt_count > 1)
WARN("Clearing multiple sRGB render targets with no GL_ARB_framebuffer_sRGB "
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5991eb95787..aa0ca4bcc06 100644
index 3b4cff500ab..7d361b2c7aa 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1811,7 +1811,7 @@ void context_alloc_event_query(struct wined3d_context *context,
@@ -1850,7 +1850,7 @@ void context_alloc_event_query(struct wined3d_context *context,
void context_alloc_occlusion_query(struct wined3d_context *context,
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load Diff