Removed patch for stub of ntdll.WinSqmIsOptedIn (fixed upstream).

This commit is contained in:
Sebastian Lackner
2015-04-22 23:35:24 +02:00
parent d92acf00eb
commit a139cd10bd
25 changed files with 535 additions and 588 deletions

View File

@@ -62,7 +62,7 @@ for more details.*
* Add stub for D3DXComputeTangentFrameEx ([Wine Bug #31984](https://bugs.winehq.org/show_bug.cgi?id=31984))
* Add stub for D3DXIntersect
* Add stub for NtSetLdtEntries/ZwSetLdtEntries ([Wine Bug #26268](https://bugs.winehq.org/show_bug.cgi?id=26268))
* Add stub for WinSqmIsOptedIn ([Wine Bug #38388](https://bugs.winehq.org/show_bug.cgi?id=38388))
* ~~Add stub for WinSqmIsOptedIn~~ ([Wine Bug #38388](https://bugs.winehq.org/show_bug.cgi?id=38388))
* Add stub for gdiplus.GdipCreateEffect ([Wine Bug #32163](https://bugs.winehq.org/show_bug.cgi?id=32163))
* Add stub for ntoskrnl.ExAcquireResourceExclusiveLite
* Add stub for ntoskrnl.ExDeleteResourceLite

1
debian/changelog vendored
View File

@@ -1,5 +1,6 @@
wine-staging (1.7.42) UNRELEASED; urgency=low
* Removed patch to avoid crash when trying to bind mshtml event scripts to window (fixed upstream).
* Removed patch for stub of ntdll.WinSqmIsOptedIn (fixed upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 20 Apr 2015 15:55:51 +0200
wine-staging (1.7.41) unstable; urgency=low

View File

@@ -1,4 +1,4 @@
From 05e4482c93eec3e57ca2c6d83357c85b240494b2 Mon Sep 17 00:00:00 2001
From f8c57c8ed3616f53bbed2d794f1e858ea5051f22 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 24 Feb 2015 05:42:07 +0100
Subject: ntdll: Implement TpSimpleTryPost and basic threadpool infrastructure.
@@ -10,7 +10,7 @@ Subject: ntdll: Implement TpSimpleTryPost and basic threadpool infrastructure.
3 files changed, 375 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index c3307b2..d9aafdd 100644
index 28165ef..cd6b97c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -968,6 +968,9 @@
@@ -21,8 +21,8 @@ index c3307b2..d9aafdd 100644
+@ stdcall TpReleasePool(ptr)
+@ stdcall TpSimpleTryPost(ptr ptr ptr)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall WinSqmIsOptedIn()
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c
index 2e31b34..6f164e9 100644
--- a/dlls/ntdll/tests/threadpool.c
@@ -444,5 +444,5 @@ index 513c13d..cc5f8e9 100644
+ return STATUS_SUCCESS;
+}
--
2.3.3
2.3.5

View File

@@ -1,4 +1,4 @@
From 0fe9a4e96bdb45ca76e7abf0b73a69d24e1a3ce2 Mon Sep 17 00:00:00 2001
From c362c574aa6611f80c6965ea66cbfab33e421d0f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Mar 2015 00:16:20 +0100
Subject: ntdll: Implement TpSetPool[Min|Max]Threads. (v2)
@@ -9,7 +9,7 @@ Subject: ntdll: Implement TpSetPool[Min|Max]Threads. (v2)
2 files changed, 37 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index d9aafdd..88d915b 100644
index cd6b97c..f755286 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -970,6 +970,8 @@
@@ -20,7 +20,7 @@ index d9aafdd..88d915b 100644
+@ stdcall TpSetPoolMinThreads(ptr long)
@ stdcall TpSimpleTryPost(ptr ptr ptr)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall WinSqmIsOptedIn()
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c
index cc5f8e9..cb2dcdd 100644
--- a/dlls/ntdll/threadpool.c
@@ -68,5 +68,5 @@ index cc5f8e9..cb2dcdd 100644
*/
NTSTATUS WINAPI TpSimpleTryPost( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
--
2.3.3
2.3.5

View File

@@ -1,4 +1,4 @@
From 4814babb31750124d8d2d600a5894634fefe28f7 Mon Sep 17 00:00:00 2001
From 20e50fe1839e89ef32df751130d5fc7b20ea095a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Mar 2015 01:30:57 +0100
Subject: ntdll: Implement threadpool work item functions.
@@ -9,7 +9,7 @@ Subject: ntdll: Implement threadpool work item functions.
2 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 853ca09..96edd67 100644
index 7c01d43..2180ea9 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -970,12 +970,16 @@
@@ -27,10 +27,10 @@ index 853ca09..96edd67 100644
@ stdcall TpSimpleTryPost(ptr ptr ptr)
+@ stdcall TpWaitForWork(ptr long)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall WinSqmIsOptedIn()
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c
index 10ce6fd..01308d6 100644
index 9e0efee..e6bb626 100644
--- a/dlls/ntdll/threadpool.c
+++ b/dlls/ntdll/threadpool.c
@@ -156,7 +156,8 @@ struct threadpool
@@ -153,7 +153,7 @@ index 10ce6fd..01308d6 100644
* TpSetPoolMaxThreads (NTDLL.@)
*/
VOID WINAPI TpSetPoolMaxThreads( TP_POOL *pool, DWORD maximum )
@@ -1696,3 +1772,19 @@ NTSTATUS WINAPI TpSimpleTryPost( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
@@ -1698,3 +1774,19 @@ NTSTATUS WINAPI TpSimpleTryPost( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
return STATUS_SUCCESS;
}
@@ -174,5 +174,5 @@ index 10ce6fd..01308d6 100644
+ }
+}
--
2.3.3
2.3.5

View File

@@ -1,4 +1,4 @@
From ac6e2e281ba4f0b6cb9643ed288aaf05fd2710f7 Mon Sep 17 00:00:00 2001
From 01b8c400e280f1c033878cdc16f902a4c47c82df Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Mar 2015 08:01:00 +0100
Subject: ntdll: Add remaining threadpool functions to specfile.
@@ -8,7 +8,7 @@ Subject: ntdll: Add remaining threadpool functions to specfile.
1 file changed, 43 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 6100a7e..19e63a5 100644
index c42356c..681c75e 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -968,24 +968,67 @@
@@ -78,7 +78,7 @@ index 6100a7e..19e63a5 100644
+# @ stub TpWaitForWait
@ stdcall TpWaitForWork(ptr long)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall WinSqmIsOptedIn()
--
2.3.3
2.3.5

View File

@@ -1,4 +1,4 @@
From 80175d154f0de20f916422684d9ae6708d532743 Mon Sep 17 00:00:00 2001
From 8e1c71f635b4005958e8f8b3a8b3bd654367f71c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Mar 2015 13:33:25 +0100
Subject: ntdll: Implement threadpool wait objects.
@@ -9,7 +9,7 @@ Subject: ntdll: Implement threadpool wait objects.
2 files changed, 469 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 7aa8bda..7c15f76 100644
index 21f39de..9093eb8 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -975,7 +975,7 @@
@@ -47,9 +47,9 @@ index 7aa8bda..7c15f76 100644
+@ stdcall TpWaitForWait(ptr long)
@ stdcall TpWaitForWork(ptr long)
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
@ stdcall WinSqmIsOptedIn()
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c
index 493e0af..cda5a12 100644
index a973409..7df8cb1 100644
--- a/dlls/ntdll/threadpool.c
+++ b/dlls/ntdll/threadpool.c
@@ -137,6 +137,7 @@ struct timer_queue
@@ -635,7 +635,7 @@ index 493e0af..cda5a12 100644
* TpReleaseWork (NTDLL.@)
*/
VOID WINAPI TpReleaseWork( TP_WORK *work )
@@ -2424,6 +2853,20 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
@@ -2426,6 +2855,20 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
}
/***********************************************************************
@@ -656,7 +656,7 @@ index 493e0af..cda5a12 100644
* TpSimpleTryPost (NTDLL.@)
*/
NTSTATUS WINAPI TpSimpleTryPost( PTP_SIMPLE_CALLBACK callback, PVOID userdata,
@@ -2464,6 +2907,21 @@ VOID WINAPI TpWaitForTimer( TP_TIMER *timer, BOOL cancel_pending )
@@ -2466,6 +2909,21 @@ VOID WINAPI TpWaitForTimer( TP_TIMER *timer, BOOL cancel_pending )
}
/***********************************************************************
@@ -679,5 +679,5 @@ index 493e0af..cda5a12 100644
*/
VOID WINAPI TpWaitForWork( TP_WORK *work, BOOL cancel_pending )
--
2.3.3
2.3.5

View File

@@ -1,35 +1,33 @@
From ffb4e21271797190bd8c5b6be3054ac2f693be8b Mon Sep 17 00:00:00 2001
From ff1be4d15b2114de6b785c164ddc27fd6993c6f8 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 25 Dec 2014 12:36:28 -0700
Subject: ntdll: Add stubs for WinSqmStartSession / WinSqmEndSession.
Based on a patch by Detlef Riekenberg.
---
dlls/ntdll/misc.c | 20 +++++++++++++++++++
dlls/ntdll/ntdll.spec | 2 ++
dlls/ntdll/rtl.c | 18 ++++++++++++++++++
dlls/ntdll/tests/rtl.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+)
dlls/ntdll/tests/rtl.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 76 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 51de6e7..44dfc22 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -970,2 +970,4 @@
@ stdcall -ret64 VerSetConditionMask(int64 long long)
+@ stdcall WinSqmEndSession(ptr)
+@ stdcall WinSqmStartSession(ptr long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 8f6f386..2e87beb 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -1311,3 +1311,21 @@ BOOL WINAPI RtlSetCurrentTransaction(HANDLE new_transaction)
FIXME("(%p) :stub\n", new_transaction);
return FALSE;
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 2cfa900..7832d37 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -27,6 +27,8 @@
#include <sys/utsname.h>
#endif
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
#include "wine/library.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
@@ -328,6 +330,15 @@ void * __cdecl _lfind( const void *key, const void *base, unsigned int *nmemb,
}
+
+/******************************************************************************
+ * WinSqmEndSession [NTDLL.@]
/*********************************************************************
+ * WinSqmEndSession (NTDLL.@)
+ */
+NTSTATUS WINAPI WinSqmEndSession(PVOID unknown1)
+{
@@ -37,37 +35,58 @@ index 8f6f386..2e87beb 100644
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/******************************************************************************
+ * WinSqmStartSession [NTDLL.@]
+/*********************************************************************
* WinSqmIsOptedIn (NTDLL.@)
*/
BOOL WINAPI WinSqmIsOptedIn(void)
@@ -335,3 +346,12 @@ BOOL WINAPI WinSqmIsOptedIn(void)
FIXME("() stub\n");
return FALSE;
}
+
+/*********************************************************************
+ * WinSqmStartSession (NTDLL.@)
+ */
+PVOID WINAPI WinSqmStartSession(PVOID unknown1, DWORD unknown2, DWORD unknown3)
+{
+ FIXME("(%p, 0x%x, 0x%x) stub!\n", unknown1, unknown2, unknown3);
+ return NULL;
+}
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 28165ef..9225898 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -971,3 +971,5 @@
@ stdcall -ret64 VerSetConditionMask(int64 long long)
+@ stdcall WinSqmEndSession(ptr)
@ stdcall WinSqmIsOptedIn()
+@ stdcall WinSqmStartSession(ptr long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index e8eb04a..1e6c6f8 100644
index e8eb04a..7b5f07d 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -62,6 +62,8 @@ static inline USHORT __my_ushort_swap(USHORT s)
@@ -62,6 +62,9 @@ static inline USHORT __my_ushort_swap(USHORT s)
/* Function ptrs for ntdll calls */
static HMODULE hntdll = 0;
+static PVOID (WINAPI *pWinSqmStartSession)(PVOID unknown1, DWORD unknown2, DWORD unknown3);
+static BOOL (WINAPI *pWinSqmIsOptedIn)(void);
+static NTSTATUS (WINAPI *pWinSqmEndSession)(PVOID unknown1);
static SIZE_T (WINAPI *pRtlCompareMemory)(LPCVOID,LPCVOID,SIZE_T);
static SIZE_T (WINAPI *pRtlCompareMemoryUlong)(PULONG, SIZE_T, ULONG);
static NTSTATUS (WINAPI *pRtlDeleteTimer)(HANDLE, HANDLE, HANDLE);
@@ -109,6 +111,8 @@ static void InitFunctionPtrs(void)
@@ -109,6 +112,9 @@ static void InitFunctionPtrs(void)
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
+ pWinSqmStartSession = (void *)GetProcAddress(hntdll, "WinSqmStartSession");
+ pWinSqmIsOptedIn = (void *)GetProcAddress(hntdll, "WinSqmIsOptedIn");
+ pWinSqmEndSession = (void *)GetProcAddress(hntdll, "WinSqmEndSession");
pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory");
pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong");
pRtlDeleteTimer = (void *)GetProcAddress(hntdll, "RtlDeleteTimer");
@@ -149,6 +153,46 @@ static void InitFunctionPtrs(void)
@@ -149,6 +155,48 @@ static void InitFunctionPtrs(void)
ok(strlen(src) == 15, "Source must be 16 bytes long!\n");
}
@@ -104,6 +123,8 @@ index e8eb04a..1e6c6f8 100644
+
+ args = 3 - call_stdcall_func3( pWinSqmStartSession, NULL, 0, 0 ) / 4;
+ ok(args == 3, "WinSqmStartSession expected to take %d arguments instead of 3\n", args);
+ args = 3 - call_stdcall_func3( pWinSqmIsOptedIn, NULL, 0, 0 ) / 4;
+ ok(args == 0, "WinSqmIsOptedIn expected to take %d arguments instead of 0\n", args);
+ args = 3 - call_stdcall_func3( pWinSqmEndSession, NULL, 0, 0 ) / 4;
+ ok(args == 1, "WinSqmEndSession expected to take %d arguments instead of 1\n", args);
+
@@ -114,7 +135,7 @@ index e8eb04a..1e6c6f8 100644
#define COMP(str1,str2,cmplen,len) size = pRtlCompareMemory(str1, str2, cmplen); \
ok(size == len, "Expected %ld, got %ld\n", size, (SIZE_T)len)
@@ -1603,6 +1647,12 @@ START_TEST(rtl)
@@ -1603,6 +1651,12 @@ START_TEST(rtl)
{
InitFunctionPtrs();
@@ -128,5 +149,5 @@ index e8eb04a..1e6c6f8 100644
test_RtlCompareMemoryUlong();
test_RtlMoveMemory();
--
1.9.1
2.3.5

View File

@@ -1,74 +0,0 @@
From 335eee22883daada4e4c95c0ac13c64fe92e3d3a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 18 Apr 2015 15:25:30 +0200
Subject: ntdll: Add stub for WinSqmIsOptedIn.
Based on a patch by Stefan Leichter.
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/rtl.c | 9 +++++++++
dlls/ntdll/tests/rtl.c | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 4053388..9225898 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -971,4 +971,5 @@
@ stdcall -ret64 VerSetConditionMask(int64 long long)
@ stdcall WinSqmEndSession(ptr)
+@ stdcall WinSqmIsOptedIn()
@ stdcall WinSqmStartSession(ptr long long)
@ stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 2e87beb..971c964 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -1321,6 +1321,15 @@ NTSTATUS WINAPI WinSqmEndSession(PVOID unknown1)
return STATUS_NOT_IMPLEMENTED;
}
+/*********************************************************************
+ * WinSqmIsOptedIn [NTDLL.@]
+ */
+BOOL WINAPI WinSqmIsOptedIn(void)
+{
+ FIXME("() stub!\n");
+ return FALSE;
+}
+
/******************************************************************************
* WinSqmStartSession [NTDLL.@]
*/
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index 1e6c6f8..7b5f07d 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -63,6 +63,7 @@ static inline USHORT __my_ushort_swap(USHORT s)
/* Function ptrs for ntdll calls */
static HMODULE hntdll = 0;
static PVOID (WINAPI *pWinSqmStartSession)(PVOID unknown1, DWORD unknown2, DWORD unknown3);
+static BOOL (WINAPI *pWinSqmIsOptedIn)(void);
static NTSTATUS (WINAPI *pWinSqmEndSession)(PVOID unknown1);
static SIZE_T (WINAPI *pRtlCompareMemory)(LPCVOID,LPCVOID,SIZE_T);
static SIZE_T (WINAPI *pRtlCompareMemoryUlong)(PULONG, SIZE_T, ULONG);
@@ -112,6 +113,7 @@ static void InitFunctionPtrs(void)
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
pWinSqmStartSession = (void *)GetProcAddress(hntdll, "WinSqmStartSession");
+ pWinSqmIsOptedIn = (void *)GetProcAddress(hntdll, "WinSqmIsOptedIn");
pWinSqmEndSession = (void *)GetProcAddress(hntdll, "WinSqmEndSession");
pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory");
pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong");
@@ -186,6 +188,8 @@ static void test_WinSqm(void)
args = 3 - call_stdcall_func3( pWinSqmStartSession, NULL, 0, 0 ) / 4;
ok(args == 3, "WinSqmStartSession expected to take %d arguments instead of 3\n", args);
+ args = 3 - call_stdcall_func3( pWinSqmIsOptedIn, NULL, 0, 0 ) / 4;
+ ok(args == 0, "WinSqmIsOptedIn expected to take %d arguments instead of 0\n", args);
args = 3 - call_stdcall_func3( pWinSqmEndSession, NULL, 0, 0 ) / 4;
ok(args == 1, "WinSqmEndSession expected to take %d arguments instead of 1\n", args);
--
2.3.5

View File

@@ -1,2 +1 @@
Fixes: [31971] ntdll is missing WinSqm[Start|End]Session implementation
Fixes: [38388] Add stub for WinSqmIsOptedIn

View File

@@ -3452,7 +3452,7 @@ fi
# |
if test "$enable_ntdll_Vista_Threadpool" -eq 1; then
patch_apply ntdll-Vista_Threadpool/0001-ntdll-Implement-TpSimpleTryPost-and-basic-threadpool.patch
patch_apply ntdll-Vista_Threadpool/0002-ntdll-Implement-TpSetPool-Min-Max-Threads.patch
patch_apply ntdll-Vista_Threadpool/0002-ntdll-Implement-TpSetPool-Min-Max-Threads.-v2.patch
patch_apply ntdll-Vista_Threadpool/0003-ntdll-Implement-threadpool-cleanup-group-functions.patch
patch_apply ntdll-Vista_Threadpool/0004-ntdll-tests-Add-tests-for-TpAllocCleanupGroup-and-re.patch
patch_apply ntdll-Vista_Threadpool/0005-ntdll-Implement-threadpool-work-item-functions.patch
@@ -3499,17 +3499,14 @@ fi
# |
# | This patchset fixes the following Wine bugs:
# | * [#31971] ntdll is missing WinSqm[Start|End]Session implementation
# | * [#38388] Add stub for WinSqmIsOptedIn
# |
# | Modified files:
# | * dlls/ntdll/ntdll.spec, dlls/ntdll/rtl.c, dlls/ntdll/tests/rtl.c
# | * dlls/ntdll/misc.c, dlls/ntdll/ntdll.spec, dlls/ntdll/tests/rtl.c
# |
if test "$enable_ntdll_WinSqm" -eq 1; then
patch_apply ntdll-WinSqm/0001-ntdll-Add-stubs-for-WinSqmStartSession-WinSqmEndSess.patch
patch_apply ntdll-WinSqm/0002-ntdll-Add-stub-for-WinSqmIsOptedIn.patch
(
echo '+ { "Erich E. Hoover", "ntdll: Add stubs for WinSqmStartSession / WinSqmEndSession.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Add stub for WinSqmIsOptedIn.", 1 },';
) >> "$patchlist"
fi

View File

@@ -1,4 +1,4 @@
From be8e04d375183cbd4dbca29f4ffe6473ef32a7ff Mon Sep 17 00:00:00 2001
From 40fb491c5eb0a781b82bb3a6d489e2ed91b8c3ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:22:24 +0200
Subject: wined3d: Merge get_pitch functions.
@@ -58,10 +58,10 @@ index 0d2d731..27acbed 100644
desc->dwFlags &= ~(DDSD_LPSURFACE | DDSD_LINEARSIZE);
}
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 205f074..3375c0f 100644
index efdb2a8..3d7bdea 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -340,3 +340,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
@@ -343,3 +343,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
else
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
}
@@ -97,10 +97,10 @@ index 205f074..3375c0f 100644
+ TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a49f521..5a8b250 100644
index 8f9a1ee..5fb8a3d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -363,6 +363,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@@ -364,6 +364,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
BITMAPINFO *b_info;
int extraline = 0;
DWORD *masks;
@@ -108,7 +108,7 @@ index a49f521..5a8b250 100644
TRACE("surface %p.\n", surface);
@@ -408,10 +409,11 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@@ -409,10 +410,11 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
/* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */
@@ -122,7 +122,7 @@ index a49f521..5a8b250 100644
b_info->bmiHeader.biPlanes = 1;
b_info->bmiHeader.biBitCount = format->byte_count * 8;
@@ -1302,14 +1304,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
@@ -1303,14 +1305,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
void *mem;
GLenum gl_format = format->glFormat;
GLenum gl_type = format->glType;
@@ -140,7 +140,7 @@ index a49f521..5a8b250 100644
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
}
@@ -1396,12 +1398,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
@@ -1397,12 +1399,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
* won't be released, and doesn't have to be re-read. */
src_data = mem;
dst_data = data.addr;
@@ -156,7 +156,7 @@ index a49f521..5a8b250 100644
}
HeapFree(GetProcessHeap(), 0, mem);
@@ -1555,7 +1557,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1557,7 +1559,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
UINT update_w, update_h;
UINT dst_w, dst_h;
RECT r, dst_rect;
@@ -165,7 +165,7 @@ index a49f521..5a8b250 100644
POINT p;
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
@@ -1641,10 +1643,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1645,10 +1647,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->locations);
@@ -178,7 +178,7 @@ index a49f521..5a8b250 100644
context_release(context);
@@ -1925,25 +1927,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
@@ -1929,25 +1931,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
return WINED3D_OK;
}
@@ -204,7 +204,7 @@ index a49f521..5a8b250 100644
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
{
LONG w, h;
@@ -2124,20 +2107,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2128,20 +2111,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
valid_location = WINED3D_LOCATION_USER_MEMORY;
}
@@ -232,8 +232,8 @@ index a49f521..5a8b250 100644
}
/* The format might be changed to a format that needs conversion.
@@ -2756,7 +2740,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
@@ -2761,7 +2745,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
else
- map_desc->row_pitch = wined3d_surface_get_pitch(surface);
@@ -241,7 +241,7 @@ index a49f521..5a8b250 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2883,6 +2867,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2888,6 +2872,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
int i;
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@@ -249,7 +249,7 @@ index a49f521..5a8b250 100644
surface_get_memory(surface, &data, dst_location);
@@ -2919,8 +2904,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2924,8 +2909,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@@ -260,7 +260,7 @@ index a49f521..5a8b250 100644
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2937,7 +2922,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2942,7 +2927,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
@@ -271,7 +271,7 @@ index a49f521..5a8b250 100644
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -4118,7 +4105,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4123,7 +4110,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
struct wined3d_context *context;
@@ -280,7 +280,7 @@ index a49f521..5a8b250 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4206,7 +4193,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4211,7 +4198,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_bind_and_dirtify(texture, context, srgb);
width = surface->resource.width;
@@ -289,7 +289,7 @@ index a49f521..5a8b250 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4244,9 +4231,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4249,9 +4236,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@@ -301,7 +301,7 @@ index a49f521..5a8b250 100644
data.addr = mem;
}
else if (conversion)
@@ -4266,14 +4253,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4271,14 +4258,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@@ -320,7 +320,7 @@ index a49f521..5a8b250 100644
context_release(context);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 78d1266..5e68257 100644
index de92e0e..4425ecb 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1258,7 +1258,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
@@ -333,7 +333,7 @@ index 78d1266..5e68257 100644
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 357608f..1a5e629 100644
index b83ff26..cd09d50 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
@@ -344,7 +344,7 @@ index 357608f..1a5e629 100644
-{
- const struct wined3d_format *format = volume->resource.format;
-
- if (format->flags & WINED3DFMT_FLAG_BLOCKS)
- if (volume->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
- {
- /* Since compressed formats are block based, pitch means the amount of
- * bytes to the next row of block rather than the next row of pixels. */
@@ -376,7 +376,7 @@ index 357608f..1a5e629 100644
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
@@ -642,7 +618,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -643,7 +619,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
}
else
{
@@ -406,10 +406,10 @@ index bc1129f..fcabd53 100644
@ cdecl wined3d_surface_get_resource(ptr)
@ cdecl wined3d_surface_getdc(ptr ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8e58e4b..2656399 100644
index 3c23d0c..1a7cade 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2121,6 +2121,7 @@ struct wined3d_resource
@@ -2122,6 +2122,7 @@ struct wined3d_resource
UINT size;
DWORD priority;
void *heap_memory;
@@ -417,7 +417,7 @@ index 8e58e4b..2656399 100644
struct list resource_list_entry;
void *parent;
@@ -2285,7 +2286,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
@@ -2286,7 +2287,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
@@ -425,7 +425,7 @@ index 8e58e4b..2656399 100644
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context,
BOOL srgb_mode) DECLSPEC_HIDDEN;
void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
@@ -2335,7 +2335,6 @@ struct wined3d_surface
@@ -2336,7 +2336,6 @@ struct wined3d_surface
DWORD flags;

View File

@@ -1,4 +1,4 @@
From ef006d30c46de0526e6710ff23b11449cb2efe0a Mon Sep 17 00:00:00 2001
From fc87bc1d66c8ba3a0880d2feafa0462cb1058bcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:19:24 +0100
Subject: wined3d: Pass a context to surface_load_location.
@@ -14,7 +14,7 @@ Subject: wined3d: Pass a context to surface_load_location.
7 files changed, 107 insertions(+), 77 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 1d7cf9c..ac4c7cb 100644
index 0334d1c..cb3a435 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2208,7 +2208,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
@@ -36,7 +36,7 @@ index 1d7cf9c..ac4c7cb 100644
swapchain_update_draw_bindings(swapchain);
context_set_render_offscreen(context, TRUE);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5f44a1a..725897f 100644
index 4954d00..657e099 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -300,6 +300,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@@ -120,10 +120,10 @@ index c0654a6..913ada5 100644
{
/* Note that this depends on the context_acquire() call above to set
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ff66881..e7b139b 100644
index 22726f2..2cc217e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -752,7 +752,16 @@ static void surface_unmap(struct wined3d_surface *surface)
@@ -753,7 +753,16 @@ static void surface_unmap(struct wined3d_surface *surface)
}
if (surface->container->swapchain && surface->container->swapchain->front_buffer == surface->container)
@@ -138,10 +138,10 @@ index ff66881..e7b139b 100644
+ if (context)
+ context_release(context);
+ }
else if (surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
else if (surface->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
FIXME("Depth / stencil buffer locking is not implemented.\n");
}
@@ -805,12 +814,6 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
@@ -806,12 +815,6 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
if (src_mask & WINED3DFMT_FLAG_STENCIL)
gl_mask |= GL_STENCIL_BUFFER_BIT;
@@ -154,7 +154,7 @@ index ff66881..e7b139b 100644
context = context_acquire(device, NULL);
if (!context->valid)
{
@@ -819,6 +822,12 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
@@ -820,6 +823,12 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
return;
}
@@ -167,7 +167,7 @@ index ff66881..e7b139b 100644
gl_info = context->gl_info;
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, src_surface, src_location);
@@ -906,9 +915,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
@@ -907,9 +916,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
* surface isn't required if the entire surface is overwritten. (And is
* in fact harmful if we're being called by surface_load_location() with
* the purpose of loading the destination surface.) */
@@ -179,7 +179,7 @@ index ff66881..e7b139b 100644
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
@@ -1142,6 +1151,9 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1143,6 +1152,9 @@ static void surface_unload(struct wined3d_resource *resource)
TRACE("surface %p.\n", surface);
@@ -189,7 +189,7 @@ index ff66881..e7b139b 100644
if (resource->pool == WINED3D_POOL_DEFAULT)
{
/* Default pool resources are supposed to be destroyed before Reset is called.
@@ -1167,13 +1179,10 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1168,13 +1180,10 @@ static void surface_unload(struct wined3d_resource *resource)
else
{
surface_prepare_map_memory(surface);
@@ -204,7 +204,7 @@ index ff66881..e7b139b 100644
/* Destroy PBOs, but load them into real sysmem before */
if (surface->pbo)
surface_remove_pbo(surface, gl_info);
@@ -1657,7 +1666,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1661,7 +1670,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
if (update_w == dst_w && update_h == dst_h)
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
else
@@ -213,7 +213,7 @@ index ff66881..e7b139b 100644
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->locations);
@@ -1773,7 +1782,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
@@ -1777,7 +1786,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
return GL_BACK;
}
@@ -223,7 +223,7 @@ index ff66881..e7b139b 100644
{
DWORD location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
@@ -1789,7 +1799,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
@@ -1793,7 +1803,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
}
TRACE("Reloading because surface is dirty.\n");
@@ -232,7 +232,7 @@ index ff66881..e7b139b 100644
surface_evict_sysmem(surface);
}
@@ -2715,10 +2725,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2720,10 +2730,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
@@ -250,7 +250,7 @@ index ff66881..e7b139b 100644
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@@ -2800,6 +2816,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2805,6 +2821,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
{
HRESULT hr;
@@ -259,7 +259,7 @@ index ff66881..e7b139b 100644
TRACE("surface %p, dc %p.\n", surface, dc);
@@ -2811,26 +2829,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2816,26 +2834,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
if (surface->resource.map_count)
return WINED3DERR_INVALIDCALL;
@@ -299,7 +299,7 @@ index ff66881..e7b139b 100644
surface->flags |= SFLAG_DCINUSE;
surface->resource.map_count++;
@@ -2868,8 +2896,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2873,8 +2901,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
* copied back to the DIB in the next getdc call.
*
* The same consideration applies to user memory surfaces. */
@@ -317,7 +317,7 @@ index ff66881..e7b139b 100644
}
return WINED3D_OK;
@@ -4110,7 +4146,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4115,7 +4151,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
}
if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
@@ -326,7 +326,7 @@ index ff66881..e7b139b 100644
/* Download the surface to system memory. */
if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
@@ -4146,7 +4182,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -4151,7 +4187,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
}
surface_get_rect(surface, NULL, &r);
@@ -335,7 +335,7 @@ index ff66881..e7b139b 100644
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -4219,7 +4255,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4224,7 +4260,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
surface_prepare_map_memory(surface);
@@ -344,7 +344,7 @@ index ff66881..e7b139b 100644
}
}
else
@@ -4230,7 +4266,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4235,7 +4271,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
surface_prepare_map_memory(surface);
@@ -353,7 +353,7 @@ index ff66881..e7b139b 100644
}
}
@@ -4239,7 +4275,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4244,7 +4280,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
surface_prepare_system_memory(surface);
@@ -362,7 +362,7 @@ index ff66881..e7b139b 100644
}
wined3d_texture_prepare_texture(texture, context, srgb);
@@ -4265,7 +4301,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4270,7 +4306,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
surface_prepare_map_memory(surface);
@@ -371,7 +371,7 @@ index ff66881..e7b139b 100644
surface_remove_pbo(surface, gl_info);
}
@@ -4333,11 +4369,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4338,11 +4374,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
}
@@ -385,7 +385,7 @@ index ff66881..e7b139b 100644
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4346,9 +4381,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -4351,9 +4386,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
if (location == WINED3D_LOCATION_TEXTURE_RGB
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
@@ -395,7 +395,7 @@ index ff66881..e7b139b 100644
return WINED3D_OK;
}
else if (location & surface->locations
@@ -4392,33 +4425,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -4397,33 +4430,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
case WINED3D_LOCATION_USER_MEMORY:
case WINED3D_LOCATION_SYSMEM:
case WINED3D_LOCATION_BUFFER:
@@ -432,7 +432,7 @@ index ff66881..e7b139b 100644
return hr;
break;
@@ -5529,7 +5551,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5540,7 +5562,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, &src_rect)))
{
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
@@ -485,7 +485,7 @@ index 146f5d6..4f4d4df 100644
src_dc = front->hDC;
window = swapchain->win_handle;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 5e68257..1afff66 100644
index 4425ecb..dbb0392 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -766,16 +766,19 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, const s
@@ -511,10 +511,10 @@ index 5e68257..1afff66 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2656399..51487aa 100644
index 1a7cade..e7ec65e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2384,11 +2384,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
@@ -2385,11 +2385,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From 64dddc414faf640169e109bf57c62489bfb3a65d Mon Sep 17 00:00:00 2001
From 77640d30bc5d0699ffc7bf76051c6f786feb56f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 12:22:30 +0100
Subject: wined3d: Move surface locations into the resource.
@@ -13,10 +13,10 @@ Subject: wined3d: Move surface locations into the resource.
6 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 797c204..2ad6917 100644
index 96d2f74..2d4aadc 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7884,7 +7884,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7779,7 +7779,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
/* Now load the surface */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
@@ -26,7 +26,7 @@ index 797c204..2ad6917 100644
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 725897f..9e03017 100644
index 657e099..9f4ab69 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
@@ -61,10 +61,10 @@ index 913ada5..567550e 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0335497..fcca398 100644
index bb41de5..5fdda96 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -555,7 +555,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
if (!wined3d_resource_allocate_sysmem(&surface->resource))
ERR("Failed to allocate system memory.\n");
@@ -73,7 +73,7 @@ index 0335497..fcca398 100644
ERR("Surface without system memory has WINED3D_LOCATION_SYSMEM set.\n");
}
@@ -705,7 +705,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
@@ -706,7 +706,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
}
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
@@ -82,7 +82,7 @@ index 0335497..fcca398 100644
if (surface_use_pbo(surface))
surface->resource.map_binding = WINED3D_LOCATION_BUFFER;
@@ -745,7 +745,7 @@ static void surface_unmap(struct wined3d_surface *surface)
@@ -746,7 +746,7 @@ static void surface_unmap(struct wined3d_surface *surface)
ERR("Unexpected map binding %s.\n", wined3d_debug_location(surface->resource.map_binding));
}
@@ -91,7 +91,7 @@ index 0335497..fcca398 100644
{
TRACE("Not dirtified, nothing to do.\n");
return;
@@ -1669,7 +1669,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1673,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
@@ -100,7 +100,7 @@ index 0335497..fcca398 100644
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -1792,7 +1792,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1796,7 +1796,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
if (surface->resource.pool == WINED3D_POOL_SCRATCH)
ERR("Not supported on scratch surfaces.\n");
@@ -109,7 +109,7 @@ index 0335497..fcca398 100644
{
TRACE("surface is already in texture\n");
return;
@@ -2103,7 +2103,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2107,7 +2107,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
create_dib = TRUE;
}
@@ -118,7 +118,7 @@ index 0335497..fcca398 100644
wined3d_resource_free_sysmem(&surface->resource);
width = texture_resource->width;
@@ -3168,9 +3168,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
@@ -3173,9 +3173,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
back->flags = front->flags;
front->flags = tmp_flags;
@@ -131,7 +131,7 @@ index 0335497..fcca398 100644
}
}
@@ -3349,7 +3349,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3354,7 +3354,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@@ -140,7 +140,7 @@ index 0335497..fcca398 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3887,13 +3887,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
@@ -3892,13 +3892,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@@ -158,7 +158,7 @@ index 0335497..fcca398 100644
}
/* Context activation is done by the caller. */
@@ -3908,7 +3909,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3913,7 +3914,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@@ -167,7 +167,7 @@ index 0335497..fcca398 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3934,7 +3935,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3939,7 +3940,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
}
@@ -176,7 +176,7 @@ index 0335497..fcca398 100644
{
TRACE("Surface was discarded, no need copy data.\n");
switch (location)
@@ -3951,17 +3952,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3956,17 +3957,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
default:
FIXME("Unhandled location %#x\n", location);
}
@@ -198,7 +198,7 @@ index 0335497..fcca398 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -4050,7 +4051,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4055,7 +4056,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
ERR("Invalid location (%#x) specified.\n", location);
}
@@ -207,7 +207,7 @@ index 0335497..fcca398 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
}
@@ -4059,7 +4060,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
@@ -4064,7 +4065,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -216,7 +216,7 @@ index 0335497..fcca398 100644
}
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
@@ -4068,9 +4069,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
@@ -4073,9 +4074,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
wined3d_texture_set_dirty(surface->container);
@@ -228,7 +228,7 @@ index 0335497..fcca398 100644
ERR("Surface %p does not have any up to date location.\n", surface);
}
@@ -4106,7 +4107,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -4111,7 +4112,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
UINT size = surface->resource.size;
surface_get_memory(surface, &dst, location);
@@ -237,7 +237,7 @@ index 0335497..fcca398 100644
if (dst.buffer_object)
{
@@ -4139,33 +4140,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4144,33 +4145,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@@ -277,7 +277,7 @@ index 0335497..fcca398 100644
}
/* Context activation is done by the caller. */
@@ -4205,14 +4206,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4210,14 +4211,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
&& wined3d_resource_is_offscreen(&texture->resource)
@@ -291,16 +291,16 @@ index 0335497..fcca398 100644
- if (surface->locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
+ if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
&& (surface->resource.format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& (surface->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
@@ -4228,13 +4229,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4233,13 +4234,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
return WINED3D_OK;
}
- if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
+ if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
&& (!srgb || (surface->resource.format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& (!srgb || (surface->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
@@ -310,7 +310,7 @@ index 0335497..fcca398 100644
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -4249,7 +4250,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4254,7 +4255,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (srgb)
{
@@ -319,7 +319,7 @@ index 0335497..fcca398 100644
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
@@ -4260,7 +4261,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4265,7 +4266,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
else
{
@@ -328,7 +328,7 @@ index 0335497..fcca398 100644
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
@@ -4270,7 +4271,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4275,7 +4276,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
}
@@ -337,7 +337,7 @@ index 0335497..fcca398 100644
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@@ -4305,7 +4306,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4310,7 +4311,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@@ -346,7 +346,7 @@ index 0335497..fcca398 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4361,7 +4362,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4366,7 +4367,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
{
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -355,7 +355,7 @@ index 0335497..fcca398 100644
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
@@ -4379,12 +4380,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4384,12 +4385,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@@ -370,7 +370,7 @@ index 0335497..fcca398 100644
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
{
/* Already up to date, nothing to do. */
@@ -4393,12 +4394,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4398,12 +4399,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
else
{
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
@@ -385,7 +385,7 @@ index 0335497..fcca398 100644
{
TRACE("Location already up to date.\n");
return;
@@ -4412,7 +4413,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4417,7 +4418,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
required_access, surface->resource.access_flags);
}
@@ -394,7 +394,7 @@ index 0335497..fcca398 100644
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@@ -4451,7 +4452,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4456,7 +4457,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
surface_validate_location(surface, location);
@@ -403,7 +403,7 @@ index 0335497..fcca398 100644
surface_evict_sysmem(surface);
return;
@@ -5495,8 +5496,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5506,8 +5507,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@@ -414,7 +414,7 @@ index 0335497..fcca398 100644
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5536,8 +5537,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5547,8 +5548,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
color_key = &src_surface->container->async.src_blt_color_key;
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
}
@@ -441,10 +441,10 @@ index 4f4d4df..e702d61 100644
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
* Doesn't work with render_to_fbo because we're not flipping
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c6ac183..e1bc35d 100644
index 46d5e65..f74eddf 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2333,7 +2333,6 @@ struct wined3d_surface
@@ -2334,7 +2334,6 @@ struct wined3d_surface
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
void *user_memory;

View File

@@ -1,4 +1,4 @@
From d93611cca0ee39d60a221d4c2422ba183a2a88ef Mon Sep 17 00:00:00 2001
From cebc544748ed5c4f41f39ff600b5768d7aa86505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Sep 2013 22:30:57 +0200
Subject: wined3d: Introduce helper functions for mapping volumes.
@@ -8,10 +8,10 @@ Subject: wined3d: Introduce helper functions for mapping volumes.
1 file changed, 96 insertions(+), 61 deletions(-)
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index e2c9d4a..ad37cce 100644
index a1fce20..5a4e939 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -476,12 +476,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@@ -480,12 +480,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
return TRUE;
}
@@ -79,8 +79,8 @@ index e2c9d4a..ad37cce 100644
- const struct wined3d_gl_info *gl_info;
BYTE *base_memory;
const struct wined3d_format *format = volume->resource.format;
@@ -513,58 +568,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
const unsigned int fmt_flags = volume->resource.format_flags;
@@ -518,58 +573,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags);
@@ -150,7 +150,7 @@ index e2c9d4a..ad37cce 100644
TRACE("Base memory pointer %p.\n", base_memory);
@@ -622,8 +641,34 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
@@ -627,8 +646,34 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
return volume_from_resource(resource);
}
@@ -185,7 +185,7 @@ index e2c9d4a..ad37cce 100644
TRACE("volume %p.\n", volume);
if (!volume->resource.map_count)
@@ -632,19 +677,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
@@ -637,19 +682,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
return WINED3DERR_INVALIDCALL;
}
@@ -209,5 +209,5 @@ index e2c9d4a..ad37cce 100644
volume->resource.map_count--;
--
2.2.1
2.3.5

View File

@@ -1,4 +1,4 @@
From 7e3863693c9694e35f3ae8e72011939fffe63690 Mon Sep 17 00:00:00 2001
From 92eadfba3a70866690a3993fc67252ab29736524 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 13:30:59 +0100
Subject: wined3d: Use resource buffer mapping facilities in surfaces.
@@ -9,10 +9,10 @@ Subject: wined3d: Use resource buffer mapping facilities in surfaces.
2 files changed, 23 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index c907424..358a29e 100644
index 4c90dee..df6af90 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -461,6 +461,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -473,6 +473,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
case WINED3D_LOCATION_SYSMEM:
return resource->heap_memory;
@@ -25,7 +25,7 @@ index c907424..358a29e 100644
default:
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return NULL;
@@ -483,6 +489,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -495,6 +501,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
return;
case WINED3D_LOCATION_SYSMEM:
@@ -35,7 +35,7 @@ index c907424..358a29e 100644
default:
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e534a9f..d720d26 100644
index c12b404..77d7890 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -716,36 +716,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
@@ -75,7 +75,7 @@ index e534a9f..d720d26 100644
if (surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
{
TRACE("Not dirtified, nothing to do.\n");
@@ -2733,6 +2707,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
@@ -2659,6 +2633,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
{
@@ -84,7 +84,7 @@ index e534a9f..d720d26 100644
TRACE("surface %p.\n", surface);
if (!surface->resource.map_count)
@@ -2742,6 +2718,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
@@ -2668,6 +2644,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
}
--surface->resource.map_count;
@@ -97,9 +97,9 @@ index e534a9f..d720d26 100644
surface->surface_ops->surface_unmap(surface);
return WINED3D_OK;
@@ -2752,8 +2734,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
@@ -2679,8 +2661,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
const struct wined3d_format *format = surface->resource.format;
unsigned int fmt_flags = surface->resource.format_flags;
struct wined3d_device *device = surface->resource.device;
- struct wined3d_context *context;
- const struct wined3d_gl_info *gl_info;
@@ -107,7 +107,7 @@ index e534a9f..d720d26 100644
BYTE *base_memory;
TRACE("surface %p, map_desc %p, rect %s, flags %#x.\n",
@@ -2795,6 +2776,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2722,6 +2703,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
}
@@ -117,7 +117,7 @@ index e534a9f..d720d26 100644
surface_prepare_map_memory(surface);
if (flags & WINED3D_MAP_DISCARD)
{
@@ -2804,51 +2788,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2731,51 +2715,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
@@ -170,8 +170,8 @@ index e534a9f..d720d26 100644
+ if (context)
+ context_release(context);
if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
--
2.2.1
2.3.5

View File

@@ -1,4 +1,4 @@
From c17af045c56511c51b3c8d8873c10a0df66bee5d Mon Sep 17 00:00:00 2001
From dddaa27583d0479c985c09b2e37f63314fd2d7a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 16 Sep 2013 22:44:33 +0200
Subject: wined3d: Introduce a function to retrieve resource memory.
@@ -10,10 +10,10 @@ Subject: wined3d: Introduce a function to retrieve resource memory.
3 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 7d11fa0..9c6cf70 100644
index 4454922..0ef2155 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -432,6 +432,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
@@ -435,6 +435,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
}
}
@@ -51,10 +51,10 @@ index 7d11fa0..9c6cf70 100644
void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0815cc9..1a6152a 100644
index 4f12b02..66a7bd7 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -478,39 +478,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@@ -479,39 +479,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
return WINED3D_OK;
}
@@ -94,16 +94,16 @@ index 0815cc9..1a6152a 100644
static void surface_prepare_buffer(struct wined3d_surface *surface)
{
struct wined3d_context *context;
@@ -1271,7 +1238,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
@@ -1272,7 +1239,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
return;
}
- surface_get_memory(surface, &data, dst_location);
+ wined3d_resource_get_memory(&surface->resource, dst_location, &data);
if (format->flags & WINED3DFMT_FLAG_COMPRESSED)
if (surface->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
{
@@ -1637,7 +1604,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1641,7 +1608,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
@@ -112,7 +112,7 @@ index 0815cc9..1a6152a 100644
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -2871,7 +2838,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -2876,7 +2843,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
struct wined3d_bo_address data;
UINT row_pitch, slice_pitch;
@@ -121,7 +121,7 @@ index 0815cc9..1a6152a 100644
/* Context_release does not restore the original context in case of
* nested context_acquire calls. Only read_from_framebuffer and
@@ -4010,8 +3977,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -4015,8 +3982,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
struct wined3d_bo_address dst, src;
UINT size = surface->resource.size;
@@ -132,7 +132,7 @@ index 0815cc9..1a6152a 100644
if (dst.buffer_object)
{
@@ -4223,7 +4190,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4228,7 +4195,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@@ -142,10 +142,10 @@ index 0815cc9..1a6152a 100644
{
/* This code is entered for texture formats which need a fixup. */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1ab7a01..26b64b7 100644
index 12b1efd..c38451e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2157,6 +2157,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
@@ -2158,6 +2158,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From e13017df9a84b37e8452e16feebf5c5f06a132a8 Mon Sep 17 00:00:00 2001
From 1c3c1a3c7117915d4aa9bc8a4c533cde76133080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 13:36:00 +0200
Subject: wined3d: Make surface_ops->unmap specific for front buffers.
@@ -9,7 +9,7 @@ Subject: wined3d: Make surface_ops->unmap specific for front buffers.
2 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4815965..50d7e74 100644
index 66a7bd7..178a949 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -681,31 +681,22 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
@@ -43,7 +43,7 @@ index 4815965..50d7e74 100644
- if (context)
- context_release(context);
- }
- else if (surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
- else if (surface->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
- FIXME("Depth / stencil buffer locking is not implemented.\n");
+ if (device->d3d_initialized)
+ context = context_acquire(surface->resource.device, NULL);
@@ -53,7 +53,7 @@ index 4815965..50d7e74 100644
}
static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RECT *r)
@@ -1218,7 +1209,7 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
@@ -1162,7 +1153,7 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
static const struct wined3d_surface_ops surface_ops =
{
surface_private_setup,
@@ -62,7 +62,7 @@ index 4815965..50d7e74 100644
};
/*****************************************************************************
@@ -1262,21 +1253,15 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
@@ -1206,21 +1197,15 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
return WINED3D_OK;
}
@@ -87,7 +87,7 @@ index 4815965..50d7e74 100644
};
/* This call just downloads data, the caller is responsible for binding the
@@ -2530,7 +2515,9 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
@@ -2610,7 +2595,9 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
if (context)
context_release(context);
@@ -99,10 +99,10 @@ index 4815965..50d7e74 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index df2031a..d69a581 100644
index c38451e..96cdac5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2300,7 +2300,7 @@ struct fbo_entry
@@ -2336,7 +2336,7 @@ struct fbo_entry
struct wined3d_surface_ops
{
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
@@ -112,5 +112,5 @@ index df2031a..d69a581 100644
struct wined3d_surface
--
2.1.3
2.3.5

View File

@@ -1,4 +1,4 @@
From ba90a0acc5f192214213ee08fe82285e89700f8e Mon Sep 17 00:00:00 2001
From da397c28f35b9220eb4bf258a49b3a778732cd28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:55:00 +0200
Subject: wined3d: Move check_block_align to resource.c
@@ -11,10 +11,10 @@ Subject: wined3d: Move check_block_align to resource.c
4 files changed, 43 insertions(+), 45 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 8a1d8a1..d559fe8 100644
index 0ef2155..ddcfdad 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -606,3 +606,31 @@ BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource, stru
@@ -618,3 +618,31 @@ BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource, stru
return FALSE;
}
}
@@ -47,10 +47,10 @@ index 8a1d8a1..d559fe8 100644
+ return TRUE;
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 44e3f72..527017a 100644
index 178a949..0f58be1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1531,23 +1531,18 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
@@ -1475,23 +1475,18 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
static BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect)
{
@@ -86,10 +86,10 @@ index 44e3f72..527017a 100644
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index d77fc21..7808ed5 100644
index 1cfeb04..4d7b349 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -375,34 +375,6 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum
@@ -379,34 +379,6 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum
return &volume->resource;
}
@@ -124,21 +124,21 @@ index d77fc21..7808ed5 100644
static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *volume,
const struct wined3d_box *box)
{
@@ -452,7 +424,8 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -457,7 +429,8 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
WARN("Map box is invalid.\n");
return WINED3DERR_INVALIDCALL;
}
- if ((format->flags & WINED3DFMT_FLAG_BLOCKS) && !volume_check_block_align(volume, box))
+ if ((format->flags & WINED3DFMT_FLAG_BLOCKS) &&
- if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && !volume_check_block_align(volume, box))
+ if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) &&
+ !wined3d_resource_check_block_align(&volume->resource, box))
{
WARN("Map box is misaligned for %ux%u blocks.\n",
format->block_width, format->block_height);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e7fd8ad..e32d650 100644
index 96cdac5..855375d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2124,6 +2124,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -2155,6 +2155,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -148,5 +148,5 @@ index e7fd8ad..e32d650 100644
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;
--
2.2.1
2.3.5

View File

@@ -1,4 +1,4 @@
From 9e47e310ee0c12e0793312777a1f170fcbd363f0 Mon Sep 17 00:00:00 2001
From a161dbd1575b744e34b6282b0c7a21cab0668407 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 17:51:38 +0200
Subject: wined3d: Move most of volume_map to resource.c
@@ -13,10 +13,10 @@ boundary check behaviours.
3 files changed, 123 insertions(+), 95 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index d9e2216..2443a9b 100644
index 8903353..b497955 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -682,3 +682,117 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
@@ -694,3 +694,117 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
return TRUE;
}
@@ -135,10 +135,10 @@ index d9e2216..2443a9b 100644
+ return WINED3D_OK;
+}
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index c11c98c..7e5576b 100644
index 4d7b349..3a85103 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -386,25 +386,15 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@@ -404,26 +404,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@@ -147,6 +147,7 @@ index c11c98c..7e5576b 100644
- BYTE *base_memory;
+ HRESULT hr;
const struct wined3d_format *format = volume->resource.format;
const unsigned int fmt_flags = volume->resource.format_flags;
- TRACE("volume %p, map_desc %p, box %p, flags %#x.\n",
- volume, map_desc, box, flags);
@@ -165,7 +166,7 @@ index c11c98c..7e5576b 100644
if (!wined3d_volume_check_box_dimensions(volume, box))
{
WARN("Map box is invalid.\n");
@@ -418,74 +408,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -437,74 +427,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
return WINED3DERR_INVALIDCALL;
}
@@ -190,7 +191,7 @@ index c11c98c..7e5576b 100644
-
- TRACE("Base memory pointer %p.\n", base_memory);
-
- if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
- if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
- {
- map_desc->row_pitch = volume->resource.width * format->byte_count;
- map_desc->slice_pitch = map_desc->row_pitch * volume->resource.height;
@@ -210,7 +211,7 @@ index c11c98c..7e5576b 100644
- TRACE("Lock Box (%p) = l %u, t %u, r %u, b %u, fr %u, ba %u\n",
- box, box->left, box->top, box->right, box->bottom, box->front, box->back);
-
- if ((format->flags & (WINED3DFMT_FLAG_BLOCKS | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_BLOCKS)
- if ((fmt_flags & (WINED3DFMT_FLAG_BLOCKS | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_BLOCKS)
- {
- /* Compressed textures are block based, so calculate the offset of
- * the block that contains the top-left pixel of the locked rectangle. */
@@ -244,7 +245,7 @@ index c11c98c..7e5576b 100644
}
struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource)
@@ -495,23 +422,7 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
@@ -514,23 +441,7 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
@@ -270,10 +271,10 @@ index c11c98c..7e5576b 100644
static ULONG volume_resource_incref(struct wined3d_resource *resource)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 81c9cfe..43e1c21 100644
index f504555..1d0d644 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2126,12 +2126,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@@ -2168,12 +2168,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
@@ -290,5 +291,5 @@ index 81c9cfe..43e1c21 100644
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
--
2.1.3
2.3.5

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