mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 846155f1531207a763c099defa90fc2c41135164.
[advapi32-RegCopyTree] Removed patches to implement RegCopyTreeA/W (accepted upstream).
This commit is contained in:
parent
caaedcff2b
commit
ab74d819f0
@ -1,12 +1,12 @@
|
||||
From a46f711251567a2846eb5b0f40a0d8c0b66661ac Mon Sep 17 00:00:00 2001
|
||||
From 95113550630cf847fdc52c5ded8ad1d6c84c6149 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 28 Feb 2016 03:33:09 +0100
|
||||
Date: Tue, 1 Mar 2016 13:20:07 +0100
|
||||
Subject: advapi32: Fix RegDeleteTreeW when empty string is passed.
|
||||
|
||||
---
|
||||
dlls/advapi32/registry.c | 6 +++---
|
||||
dlls/advapi32/tests/registry.c | 4 ++--
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
dlls/advapi32/registry.c | 6 +++---
|
||||
dlls/advapi32/tests/registry.c | 14 ++++++++++++++
|
||||
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
|
||||
index 172423b..aa451b1 100644
|
||||
@ -40,17 +40,26 @@ index 172423b..aa451b1 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
|
||||
index 483df47..6010123 100644
|
||||
index 4b3b4e9..ddda755 100644
|
||||
--- a/dlls/advapi32/tests/registry.c
|
||||
+++ b/dlls/advapi32/tests/registry.c
|
||||
@@ -2257,9 +2257,9 @@ static void test_reg_delete_tree(void)
|
||||
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
|
||||
ret = RegOpenKeyA(hkey_main, "subkey", &subkey);
|
||||
- todo_wine ok(ret == ERROR_SUCCESS, "subkey was deleted\n");
|
||||
@@ -2246,6 +2246,20 @@ static void test_reg_delete_tree(void)
|
||||
dwsize = MAX_PATH;
|
||||
ok(RegQueryValueExA(subkey, "value", NULL, &type, (BYTE *)buffer, &dwsize),
|
||||
"Value is still present\n");
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegOpenKeyA(hkey_main, "subkey", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "subkey was deleted\n");
|
||||
ret = RegCloseKey(subkey);
|
||||
- todo_wine ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = pRegDeleteTreeA(subkey, "");
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegOpenKeyA(hkey_main, "subkey", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "subkey was deleted\n");
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
|
||||
ret = pRegDeleteTreeA(hkey_main, "not-here");
|
@ -1,71 +0,0 @@
|
||||
From a467ec1afb9e82ac62292f86b9dd53cf7eff2a83 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 16:58:23 +0100
|
||||
Subject: advapi32/tests: Improve RegDeleteTree tests.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/advapi32/tests/registry.c | 25 +++++++++++++++++++++----
|
||||
1 file changed, 21 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
|
||||
index ef5d989..76a2928 100644
|
||||
--- a/dlls/advapi32/tests/registry.c
|
||||
+++ b/dlls/advapi32/tests/registry.c
|
||||
@@ -41,7 +41,7 @@ static const char * sTestpath2 = "%FOO%\\subdir1";
|
||||
static const DWORD ptr_size = 8 * sizeof(void*);
|
||||
|
||||
static DWORD (WINAPI *pRegGetValueA)(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
||||
-static DWORD (WINAPI *pRegDeleteTreeA)(HKEY,LPCSTR);
|
||||
+static LONG (WINAPI *pRegDeleteTreeA)(HKEY,const char *);
|
||||
static DWORD (WINAPI *pRegDeleteKeyExA)(HKEY,LPCSTR,REGSAM,DWORD);
|
||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL);
|
||||
static NTSTATUS (WINAPI * pNtDeleteKey)(HANDLE);
|
||||
@@ -2083,6 +2083,7 @@ static void test_reg_delete_tree(void)
|
||||
{
|
||||
CHAR buffer[MAX_PATH];
|
||||
HKEY subkey, subkey2;
|
||||
+ DWORD dwsize, type;
|
||||
LONG size, ret;
|
||||
|
||||
if(!pRegDeleteTreeA) {
|
||||
@@ -2128,7 +2129,9 @@ static void test_reg_delete_tree(void)
|
||||
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
ret = RegCloseKey(subkey2);
|
||||
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
- ret = RegSetValueA(subkey, "value", REG_SZ, "data2", 5);
|
||||
+ ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegSetValueExA(subkey, "value", 0, REG_SZ, (const BYTE *)"data2", 5);
|
||||
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
ret = pRegDeleteTreeA(subkey, NULL);
|
||||
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
@@ -2143,9 +2146,23 @@ static void test_reg_delete_tree(void)
|
||||
ok(ret == ERROR_SUCCESS,
|
||||
"Default value of subkey is not present\n");
|
||||
ok(!buffer[0], "Expected length 0 got length %u(%s)\n", lstrlenA(buffer), buffer);
|
||||
- size = MAX_PATH;
|
||||
- ok(RegQueryValueA(subkey, "value", buffer, &size),
|
||||
+ dwsize = MAX_PATH;
|
||||
+ ok(RegQueryValueExA(subkey, "value", NULL, &type, (BYTE *)buffer, &dwsize),
|
||||
"Value is still present\n");
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegOpenKeyA(hkey_main, "subkey", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "subkey was deleted\n");
|
||||
+ ret = pRegDeleteTreeA(subkey, "");
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegOpenKeyA(hkey_main, "subkey", &subkey);
|
||||
+ todo_wine ok(ret == ERROR_SUCCESS, "subkey was deleted\n");
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ todo_wine ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
|
||||
ret = pRegDeleteTreeA(hkey_main, "not-here");
|
||||
ok(ret == ERROR_FILE_NOT_FOUND,
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,143 +0,0 @@
|
||||
From 662fc2e86a67494a394b6f9e98d2aac3e8705042 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 16:59:06 +0100
|
||||
Subject: advapi32/tests: Add tests for RegCopyTree.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/advapi32/tests/registry.c | 98 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 98 insertions(+)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
|
||||
index 76a2928..7664362 100644
|
||||
--- a/dlls/advapi32/tests/registry.c
|
||||
+++ b/dlls/advapi32/tests/registry.c
|
||||
@@ -41,6 +41,7 @@ static const char * sTestpath2 = "%FOO%\\subdir1";
|
||||
static const DWORD ptr_size = 8 * sizeof(void*);
|
||||
|
||||
static DWORD (WINAPI *pRegGetValueA)(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
||||
+static LONG (WINAPI *pRegCopyTreeA)(HKEY,const char *,HKEY);
|
||||
static LONG (WINAPI *pRegDeleteTreeA)(HKEY,const char *);
|
||||
static DWORD (WINAPI *pRegDeleteKeyExA)(HKEY,LPCSTR,REGSAM,DWORD);
|
||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL);
|
||||
@@ -135,6 +136,7 @@ static void InitFunctionPtrs(void)
|
||||
|
||||
/* This function was introduced with Windows 2003 SP1 */
|
||||
ADVAPI32_GET_PROC(RegGetValueA);
|
||||
+ ADVAPI32_GET_PROC(RegCopyTreeA);
|
||||
ADVAPI32_GET_PROC(RegDeleteTreeA);
|
||||
ADVAPI32_GET_PROC(RegDeleteKeyExA);
|
||||
ADVAPI32_GET_PROC(RegDeleteKeyValueA);
|
||||
@@ -2079,6 +2081,101 @@ static void test_string_termination(void)
|
||||
RegCloseKey(subkey);
|
||||
}
|
||||
|
||||
+static void test_reg_copy_tree(void)
|
||||
+{
|
||||
+ HKEY src, dst, subkey;
|
||||
+ CHAR buffer[MAX_PATH];
|
||||
+ DWORD dwsize, type;
|
||||
+ LONG size, ret;
|
||||
+
|
||||
+ if (!pRegCopyTreeA)
|
||||
+ {
|
||||
+ skip("Skipping RegCopyTreeA tests, function not present\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = RegCreateKeyA(hkey_main, "src", &src);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCreateKeyA(hkey_main, "dst", &dst);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ /* Copy nonexistent subkey */
|
||||
+ ret = pRegCopyTreeA(src, "nonexistent_subkey", dst);
|
||||
+ ok(ret == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", ret);
|
||||
+
|
||||
+ /* Create test keys and values */
|
||||
+ ret = RegSetValueA(src, NULL, REG_SZ, "data", 4);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegSetValueExA(src, "value", 0, REG_SZ, (const BYTE *)"data2", 5);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegCreateKeyA(src, "subkey2", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegSetValueA(subkey, NULL, REG_SZ, "data3", 5);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegSetValueExA(subkey, "value", 0, REG_SZ, (const BYTE *)"data4", 5);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegCreateKeyA(src, "subkey3", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ /* Copy subkey */
|
||||
+ ret = pRegCopyTreeA(src, "subkey2", dst);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ size = MAX_PATH;
|
||||
+ ret = RegQueryValueA(dst, NULL, buffer, &size);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(!strcmp(buffer, "data3"), "Expected 'data3', got '%s'\n", buffer);
|
||||
+
|
||||
+ dwsize = MAX_PATH;
|
||||
+ ret = RegQueryValueExA(dst, "value", NULL, &type, (BYTE *)buffer, &dwsize);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type);
|
||||
+ ok(!strcmp(buffer, "data4"), "Expected 'data4', got '%s'\n", buffer);
|
||||
+
|
||||
+ /* Copy full tree */
|
||||
+ ret = pRegCopyTreeA(src, NULL, dst);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ size = MAX_PATH;
|
||||
+ ret = RegQueryValueA(dst, NULL, buffer, &size);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(!strcmp(buffer, "data"), "Expected 'data', got '%s'\n", buffer);
|
||||
+
|
||||
+ dwsize = MAX_PATH;
|
||||
+ ret = RegQueryValueExA(dst, "value", NULL, &type, (BYTE *)buffer, &dwsize);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type);
|
||||
+ ok(!strcmp(buffer, "data2"), "Expected 'data2', got '%s'\n", buffer);
|
||||
+
|
||||
+ ret = RegOpenKeyA(dst, "subkey2", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ size = MAX_PATH;
|
||||
+ ret = RegQueryValueA(subkey, NULL, buffer, &size);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(!strcmp(buffer, "data3"), "Expected 'data3', got '%s'\n", buffer);
|
||||
+ dwsize = MAX_PATH;
|
||||
+ ret = RegQueryValueExA(subkey, "value", NULL, &type, (BYTE *)buffer, &dwsize);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type);
|
||||
+ ok(!strcmp(buffer, "data4"), "Expected 'data4', got '%s'\n", buffer);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ ret = RegOpenKeyA(dst, "subkey3", &subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+ ret = RegCloseKey(subkey);
|
||||
+ ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
|
||||
+
|
||||
+ delete_key(src);
|
||||
+ delete_key(dst);
|
||||
+}
|
||||
+
|
||||
static void test_reg_delete_tree(void)
|
||||
{
|
||||
CHAR buffer[MAX_PATH];
|
||||
@@ -3334,6 +3431,7 @@ START_TEST(registry)
|
||||
test_reg_save_key();
|
||||
test_reg_load_key();
|
||||
test_reg_unload_key();
|
||||
+ test_reg_copy_tree();
|
||||
test_reg_delete_tree();
|
||||
test_rw_order();
|
||||
test_deleted_key();
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,179 +0,0 @@
|
||||
From d58022657d2eda1e50cabde52e96a6c8864b2123 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 17:00:05 +0100
|
||||
Subject: advapi32: Implement RegCopyTreeA/W.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Michael Müller <michael@fds-team.de>
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/advapi32/advapi32.spec | 4 +-
|
||||
dlls/advapi32/registry.c | 95 ++++++++++++++++++++++
|
||||
dlls/advapi32/tests/registry.c | 2 +-
|
||||
.../api-ms-win-core-registry-l1-1-0.spec | 2 +-
|
||||
.../api-ms-win-downlevel-advapi32-l1-1-0.spec | 2 +-
|
||||
5 files changed, 100 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
|
||||
index 88f7fee..08f799d 100644
|
||||
--- a/dlls/advapi32/advapi32.spec
|
||||
+++ b/dlls/advapi32/advapi32.spec
|
||||
@@ -575,8 +575,8 @@
|
||||
@ stdcall RegConnectRegistryW(wstr long ptr)
|
||||
# @ stub RegConnectRegistryExA
|
||||
# @ stub RegConnectRegistryExW
|
||||
-# @ stub RegCopyTreeA
|
||||
-# @ stub RegCopyTreeW
|
||||
+@ stdcall RegCopyTreeA(long str long)
|
||||
+@ stdcall RegCopyTreeW(long wstr long)
|
||||
@ stdcall RegCreateKeyA(long str ptr)
|
||||
@ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr)
|
||||
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr)
|
||||
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
|
||||
index 3508407..1e7639c 100644
|
||||
--- a/dlls/advapi32/registry.c
|
||||
+++ b/dlls/advapi32/registry.c
|
||||
@@ -3104,6 +3104,101 @@ LSTATUS WINAPI RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * RegCopyTreeW [ADVAPI32.@]
|
||||
+ *
|
||||
+ */
|
||||
+LONG WINAPI RegCopyTreeW( HKEY hsrc, const WCHAR *subkey, HKEY hdst )
|
||||
+{
|
||||
+ DWORD name_size, max_name;
|
||||
+ DWORD value_size, max_value;
|
||||
+ DWORD max_subkey, i, type;
|
||||
+ WCHAR *name_buf = NULL;
|
||||
+ BYTE *value_buf = NULL;
|
||||
+ HKEY hkey;
|
||||
+ LONG ret;
|
||||
+
|
||||
+ TRACE( "(%p, %s, %p)\n", hsrc, debugstr_w(subkey), hdst );
|
||||
+
|
||||
+ if (subkey)
|
||||
+ {
|
||||
+ ret = RegOpenKeyExW( hsrc, subkey, 0, KEY_READ, &hsrc );
|
||||
+ if (ret) return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = RegQueryInfoKeyW( hsrc, NULL, NULL, NULL, NULL, &max_subkey,
|
||||
+ NULL, NULL, &max_name, &max_value, NULL, NULL );
|
||||
+ if (ret)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ max_name = max( max_subkey, max_name ) + 1;
|
||||
+ if (!(name_buf = heap_alloc( max_name * sizeof(WCHAR) )))
|
||||
+ {
|
||||
+ ret = ERROR_NOT_ENOUGH_MEMORY;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (!(value_buf = heap_alloc( max_value )))
|
||||
+ {
|
||||
+ ret = ERROR_NOT_ENOUGH_MEMORY;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ /* Copy values */
|
||||
+ for (i = 0;; i++)
|
||||
+ {
|
||||
+ name_size = max_name;
|
||||
+ value_size = max_value;
|
||||
+ ret = RegEnumValueW( hsrc, i, name_buf, &name_size, NULL, &type, value_buf, &value_size );
|
||||
+ if (ret == ERROR_NO_MORE_ITEMS) break;
|
||||
+ if (ret) goto cleanup;
|
||||
+ ret = RegSetValueExW( hdst, name_buf, 0, type, value_buf, value_size );
|
||||
+ if (ret) goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ /* Recursively copy subkeys */
|
||||
+ for (i = 0;; i++)
|
||||
+ {
|
||||
+ name_size = max_name;
|
||||
+ ret = RegEnumKeyExW( hsrc, i, name_buf, &name_size, NULL, NULL, NULL, NULL );
|
||||
+ if (ret == ERROR_NO_MORE_ITEMS) break;
|
||||
+ if (ret) goto cleanup;
|
||||
+ ret = RegCreateKeyExW( hdst, name_buf, 0, NULL, 0, KEY_WRITE, NULL, &hkey, NULL );
|
||||
+ if (ret) goto cleanup;
|
||||
+ ret = RegCopyTreeW( hsrc, name_buf, hkey );
|
||||
+ RegCloseKey( hkey );
|
||||
+ if (ret) goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ ret = ERROR_SUCCESS;
|
||||
+
|
||||
+cleanup:
|
||||
+ heap_free( name_buf );
|
||||
+ heap_free( value_buf );
|
||||
+ if (subkey)
|
||||
+ RegCloseKey( hsrc );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * RegCopyTreeA [ADVAPI32.@]
|
||||
+ *
|
||||
+ */
|
||||
+LONG WINAPI RegCopyTreeA( HKEY hsrc, const char *subkey, HKEY hdst )
|
||||
+{
|
||||
+ UNICODE_STRING subkeyW;
|
||||
+ LONG ret;
|
||||
+
|
||||
+ if (subkey) RtlCreateUnicodeStringFromAsciiz( &subkeyW, subkey );
|
||||
+ else subkeyW.Buffer = NULL;
|
||||
+ ret = RegCopyTreeW( hsrc, subkeyW.Buffer, hdst );
|
||||
+ RtlFreeUnicodeString( &subkeyW );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/******************************************************************************
|
||||
* RegDisableReflectionKey [ADVAPI32.@]
|
||||
*
|
||||
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
|
||||
index 7664362..483df47 100644
|
||||
--- a/dlls/advapi32/tests/registry.c
|
||||
+++ b/dlls/advapi32/tests/registry.c
|
||||
@@ -2090,7 +2090,7 @@ static void test_reg_copy_tree(void)
|
||||
|
||||
if (!pRegCopyTreeA)
|
||||
{
|
||||
- skip("Skipping RegCopyTreeA tests, function not present\n");
|
||||
+ win_skip("Skipping RegCopyTreeA tests, function not present\n");
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
index d83fbdd..91b1a94 100644
|
||||
--- a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
@@ -1,5 +1,5 @@
|
||||
@ stdcall RegCloseKey(long) advapi32.RegCloseKey
|
||||
-@ stub RegCopyTreeW
|
||||
+@ stdcall RegCopyTreeW(long wstr long) advapi32.RegCopyTreeW
|
||||
@ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExA
|
||||
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExW
|
||||
@ stdcall RegDeleteKeyExA(long str long long) advapi32.RegDeleteKeyExA
|
||||
diff --git a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
index 4105e59..e1b4663 100644
|
||||
--- a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
@@ -84,7 +84,7 @@
|
||||
@ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long) advapi32.PrivilegedServiceAuditAlarmW
|
||||
@ stub QuerySecurityAccessMask
|
||||
@ stdcall RegCloseKey(long) advapi32.RegCloseKey
|
||||
-@ stub RegCopyTreeW
|
||||
+@ stdcall RegCopyTreeW(long wstr long) advapi32.RegCopyTreeW
|
||||
@ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExA
|
||||
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExW
|
||||
@ stdcall RegDeleteKeyExA(long str long long) advapi32.RegDeleteKeyExA
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,159 +0,0 @@
|
||||
From 7f360564594bf9bdc33e1c2d675a62045a1f41db Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 17:02:25 +0100
|
||||
Subject: advapi32: Simplify and clean up RegDeleteTree implementation.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/advapi32/registry.c | 101 +++++++++++++++++++++++------------------------
|
||||
1 file changed, 50 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
|
||||
index 1e7639c..172423b 100644
|
||||
--- a/dlls/advapi32/registry.c
|
||||
+++ b/dlls/advapi32/registry.c
|
||||
@@ -3016,91 +3016,90 @@ LSTATUS WINAPI RegDisablePredefinedCache(void)
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
+
|
||||
/******************************************************************************
|
||||
* RegDeleteTreeW [ADVAPI32.@]
|
||||
*
|
||||
*/
|
||||
-LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
|
||||
+LSTATUS WINAPI RegDeleteTreeW( HKEY hkey, const WCHAR *subkey )
|
||||
{
|
||||
+ static const WCHAR emptyW[] = {0};
|
||||
+ DWORD name_size, max_name, max_subkey;
|
||||
+ WCHAR *name_buf = NULL;
|
||||
LONG ret;
|
||||
- DWORD dwMaxSubkeyLen, dwMaxValueLen;
|
||||
- DWORD dwMaxLen, dwSize;
|
||||
- WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
|
||||
- HKEY hSubKey = hKey;
|
||||
|
||||
- TRACE("(hkey=%p,%p %s)\n", hKey, lpszSubKey, debugstr_w(lpszSubKey));
|
||||
+ TRACE( "(%p, %s)\n", hkey, debugstr_w(subkey) );
|
||||
|
||||
- if(lpszSubKey)
|
||||
+ if (subkey)
|
||||
{
|
||||
- ret = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
|
||||
+ ret = RegOpenKeyExW( hkey, subkey, 0, KEY_READ, &hkey );
|
||||
if (ret) return ret;
|
||||
}
|
||||
|
||||
- /* Get highest length for keys, values */
|
||||
- ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL,
|
||||
- &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL);
|
||||
- if (ret) goto cleanup;
|
||||
+ ret = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, &max_subkey,
|
||||
+ NULL, NULL, &max_name, NULL, NULL, NULL );
|
||||
+ if (ret)
|
||||
+ goto cleanup;
|
||||
|
||||
- dwMaxSubkeyLen++;
|
||||
- dwMaxValueLen++;
|
||||
- dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen);
|
||||
- if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR))
|
||||
+ max_name = max( max_subkey, max_name ) + 1;
|
||||
+ if (!(name_buf = heap_alloc( max_name * sizeof(WCHAR) )))
|
||||
{
|
||||
- /* Name too big: alloc a buffer for it */
|
||||
- if (!(lpszName = heap_alloc( dwMaxLen*sizeof(WCHAR))))
|
||||
- {
|
||||
- ret = ERROR_NOT_ENOUGH_MEMORY;
|
||||
- goto cleanup;
|
||||
- }
|
||||
+ ret = ERROR_NOT_ENOUGH_MEMORY;
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
+ /* Recursively delete subkeys */
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ name_size = max_name;
|
||||
+ ret = RegEnumKeyExW( hkey, 0, name_buf, &name_size, NULL, NULL, NULL, NULL );
|
||||
+ if (ret == ERROR_NO_MORE_ITEMS) break;
|
||||
+ if (ret) goto cleanup;
|
||||
+ ret = RegDeleteTreeW( hkey, name_buf );
|
||||
+ if (ret) goto cleanup;
|
||||
+ }
|
||||
|
||||
- /* Recursively delete all the subkeys */
|
||||
- while (TRUE)
|
||||
+ /* Delete the key itself */
|
||||
+ if (subkey)
|
||||
{
|
||||
- dwSize = dwMaxLen;
|
||||
- if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL,
|
||||
- NULL, NULL, NULL)) break;
|
||||
+ ret = RegDeleteKeyW( hkey, emptyW );
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
- ret = RegDeleteTreeW(hSubKey, lpszName);
|
||||
+ /* Delete values */
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ name_size = max_name;
|
||||
+ ret = RegEnumValueW( hkey, 0, name_buf, &name_size, NULL, NULL, NULL, NULL );
|
||||
+ if (ret == ERROR_NO_MORE_ITEMS) break;
|
||||
+ if (ret) goto cleanup;
|
||||
+ ret = RegDeleteValueW( hkey, name_buf );
|
||||
if (ret) goto cleanup;
|
||||
}
|
||||
|
||||
- if (lpszSubKey)
|
||||
- ret = RegDeleteKeyW(hKey, lpszSubKey);
|
||||
- else
|
||||
- while (TRUE)
|
||||
- {
|
||||
- dwSize = dwMaxLen;
|
||||
- if (RegEnumValueW(hKey, 0, lpszName, &dwSize,
|
||||
- NULL, NULL, NULL, NULL)) break;
|
||||
-
|
||||
- ret = RegDeleteValueW(hKey, lpszName);
|
||||
- if (ret) goto cleanup;
|
||||
- }
|
||||
+ ret = ERROR_SUCCESS;
|
||||
|
||||
cleanup:
|
||||
- /* Free buffer if allocated */
|
||||
- if (lpszName != szNameBuf)
|
||||
- heap_free( lpszName);
|
||||
- if(lpszSubKey)
|
||||
- RegCloseKey(hSubKey);
|
||||
+ heap_free( name_buf );
|
||||
+ if (subkey)
|
||||
+ RegCloseKey( hkey );
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
/******************************************************************************
|
||||
* RegDeleteTreeA [ADVAPI32.@]
|
||||
*
|
||||
*/
|
||||
-LSTATUS WINAPI RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
|
||||
+LSTATUS WINAPI RegDeleteTreeA( HKEY hkey, const char *subkey )
|
||||
{
|
||||
+ UNICODE_STRING subkeyW;
|
||||
LONG ret;
|
||||
- UNICODE_STRING lpszSubKeyW;
|
||||
|
||||
- if (lpszSubKey) RtlCreateUnicodeStringFromAsciiz( &lpszSubKeyW, lpszSubKey);
|
||||
- else lpszSubKeyW.Buffer = NULL;
|
||||
- ret = RegDeleteTreeW( hKey, lpszSubKeyW.Buffer);
|
||||
- RtlFreeUnicodeString( &lpszSubKeyW );
|
||||
+ if (subkey) RtlCreateUnicodeStringFromAsciiz( &subkeyW, subkey );
|
||||
+ else subkeyW.Buffer = NULL;
|
||||
+ ret = RegDeleteTreeW( hkey, subkeyW.Buffer );
|
||||
+ RtlFreeUnicodeString( &subkeyW );
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [39690] Implement advapi32.RegCopyTree{A,W}
|
@ -1,37 +1,18 @@
|
||||
From 06fa831ed7d8dbd55f6fb272e888d4d1ec096b4d Mon Sep 17 00:00:00 2001
|
||||
From 88bdfac0f88e250975181edc251b7f527217224a Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 3 Jan 2015 20:24:07 -0700
|
||||
Subject: kernel32: Add SearchPath test demonstrating the priority of the
|
||||
working directory.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/path.c | 30 ++++++++++++++++++++++++++++--
|
||||
1 file changed, 28 insertions(+), 2 deletions(-)
|
||||
dlls/kernel32/tests/path.c | 27 +++++++++++++++++++++++++--
|
||||
1 file changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
|
||||
index 44f14d0..3600abe 100644
|
||||
index 836d7ec..079820f 100644
|
||||
--- a/dlls/kernel32/tests/path.c
|
||||
+++ b/dlls/kernel32/tests/path.c
|
||||
@@ -1002,8 +1002,10 @@ static void test_GetTempPath(void)
|
||||
{
|
||||
char save_TMP[MAX_PATH];
|
||||
char windir[MAX_PATH];
|
||||
+ char origdir[MAX_PATH];
|
||||
char buf[MAX_PATH];
|
||||
|
||||
+ GetCurrentDirectoryA(sizeof(origdir), origdir);
|
||||
if (!GetEnvironmentVariableA("TMP", save_TMP, sizeof(save_TMP))) save_TMP[0] = 0;
|
||||
|
||||
/* test default configuration */
|
||||
@@ -1048,6 +1050,7 @@ static void test_GetTempPath(void)
|
||||
test_GetTempPathW(windir);
|
||||
|
||||
SetEnvironmentVariableA("TMP", save_TMP);
|
||||
+ SetCurrentDirectoryA(origdir);
|
||||
}
|
||||
|
||||
static void test_GetLongPathNameA(void)
|
||||
@@ -1644,10 +1647,11 @@ static void test_SearchPathA(void)
|
||||
@@ -1790,10 +1790,11 @@ static void test_SearchPathA(void)
|
||||
static const CHAR testdeprelA[] = "./testdep.dll";
|
||||
static const CHAR kernel32A[] = "kernel32.dll";
|
||||
static const CHAR fileA[] = "";
|
||||
@ -45,7 +26,7 @@ index 44f14d0..3600abe 100644
|
||||
DWORD ret;
|
||||
|
||||
if (!pSearchPathA)
|
||||
@@ -1721,6 +1725,28 @@ static void test_SearchPathA(void)
|
||||
@@ -1867,6 +1868,28 @@ static void test_SearchPathA(void)
|
||||
ret = pDeactivateActCtx(0, cookie);
|
||||
ok(ret, "failed to deactivate context, %u\n", GetLastError());
|
||||
pReleaseActCtx(handle);
|
||||
@ -75,5 +56,5 @@ index 44f14d0..3600abe 100644
|
||||
|
||||
static void test_SearchPathW(void)
|
||||
--
|
||||
1.9.1
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1f4a1a1c60ec3e6ee9a381c9b10915ed6ecc0025 Mon Sep 17 00:00:00 2001
|
||||
From 0dccfbcec9818047c7fec959005453d022905835 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 18 Jan 2015 05:42:10 +0100
|
||||
Subject: ntoskrnl.exe/tests: Add initial driver testing framework and
|
||||
@ -14,8 +14,8 @@ Subject: ntoskrnl.exe/tests: Add initial driver testing framework and
|
||||
dlls/ntoskrnl.exe/tests/driver.sys/driver.sys.spec | 1 +
|
||||
dlls/ntoskrnl.exe/tests/ntoskrnl.c | 226 +++++++++++++++++++++
|
||||
tools/make_makefiles | 9 +-
|
||||
tools/makedep.c | 174 +++++++++++++++-
|
||||
10 files changed, 621 insertions(+), 3 deletions(-)
|
||||
tools/makedep.c | 165 ++++++++++++++-
|
||||
10 files changed, 612 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/ntoskrnl.exe/tests/Makefile.in
|
||||
create mode 100644 dlls/ntoskrnl.exe/tests/driver.sys/Makefile.in
|
||||
create mode 100644 dlls/ntoskrnl.exe/tests/driver.sys/driver.c
|
||||
@ -24,10 +24,10 @@ Subject: ntoskrnl.exe/tests: Add initial driver testing framework and
|
||||
create mode 100644 dlls/ntoskrnl.exe/tests/ntoskrnl.c
|
||||
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index 4171f47..4ad7d27 100644
|
||||
index f4d7424..9d8296a 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -578,6 +578,28 @@ $ac_dir/crosstest: __builddeps__ dummy
|
||||
@@ -547,6 +547,28 @@ $ac_dir/crosstest: __builddeps__ dummy
|
||||
fi
|
||||
}
|
||||
|
||||
@ -49,14 +49,14 @@ index 4171f47..4ad7d27 100644
|
||||
+
|
||||
+ AS_VAR_IF([enable_tests],[no],[wine_fn_disabled_rules $ac_clean; return])
|
||||
+
|
||||
+ wine_fn_depend_rules
|
||||
+ wine_fn_append_file SUBDIRS $ac_dir
|
||||
+ wine_fn_clean_rules $ac_clean
|
||||
+}
|
||||
+
|
||||
wine_fn_config_tool ()
|
||||
{
|
||||
ac_dir=$[1]
|
||||
@@ -683,6 +705,15 @@ wine_fn_config_test $1 ac_name[]ac_suffix [$2]dnl
|
||||
@@ -650,6 +672,15 @@ wine_fn_config_test $1 ac_name[]ac_suffix [$2]dnl
|
||||
m4_popdef([ac_suffix])dnl
|
||||
m4_popdef([ac_name])])
|
||||
|
||||
@ -557,16 +557,16 @@ index ce38c53..d60a3fd 100755
|
||||
{
|
||||
die "MODULE should not be defined as static lib in $file" unless $file =~ /^dlls\//;
|
||||
diff --git a/tools/makedep.c b/tools/makedep.c
|
||||
index 3b7b2b8..aa6a94b 100644
|
||||
index 12f5395..a7723a0 100644
|
||||
--- a/tools/makedep.c
|
||||
+++ b/tools/makedep.c
|
||||
@@ -174,4 +174,5 @@ struct makefile
|
||||
@@ -175,4 +175,5 @@ struct makefile
|
||||
const char *module;
|
||||
const char *testdll;
|
||||
+ const char *resource;
|
||||
const char *sharedlib;
|
||||
const char *staticlib;
|
||||
@@ -478,6 +479,30 @@ static char *get_extension( char *filename )
|
||||
@@ -480,6 +481,30 @@ static char *get_extension( char *filename )
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
@ -597,7 +597,7 @@ index 3b7b2b8..aa6a94b 100644
|
||||
* replace_extension
|
||||
*/
|
||||
static char *replace_extension( const char *name, const char *old_ext, const char *new_ext )
|
||||
@@ -2239,6 +2264,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
@@ -2277,6 +2302,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
struct strarray includes = empty_strarray;
|
||||
struct strarray phony_targets = empty_strarray;
|
||||
struct strarray all_targets = empty_strarray;
|
||||
@ -605,7 +605,7 @@ index 3b7b2b8..aa6a94b 100644
|
||||
struct strarray install_rules[NB_INSTALL_RULES];
|
||||
char *ldrpath_local = get_expanded_make_variable( make, "LDRPATH_LOCAL" );
|
||||
char *ldrpath_install = get_expanded_make_variable( make, "LDRPATH_INSTALL" );
|
||||
@@ -2521,7 +2547,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
@@ -2559,7 +2585,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -614,7 +614,7 @@ index 3b7b2b8..aa6a94b 100644
|
||||
(source->file->flags & FLAG_C_IMPLIB) ||
|
||||
(make->module && make->staticlib);
|
||||
|
||||
@@ -2535,7 +2561,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
@@ -2573,7 +2599,7 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
output_filenames( includes );
|
||||
output_filenames( make->define_args );
|
||||
output_filenames( extradefs );
|
||||
@ -623,7 +623,7 @@ index 3b7b2b8..aa6a94b 100644
|
||||
{
|
||||
output_filenames( dll_flags );
|
||||
if (make->use_msvcrt) output_filenames( msvcrt_flags );
|
||||
@@ -2587,6 +2613,72 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
@@ -2625,6 +2651,65 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
output( "\n" );
|
||||
}
|
||||
|
||||
@ -633,13 +633,6 @@ index 3b7b2b8..aa6a94b 100644
|
||||
+ {
|
||||
+ for (i = 0; i < resource_dlls.count; i++)
|
||||
+ {
|
||||
+ output( "%s/Makefile:\n", resource_dlls.str[i] );
|
||||
+ output( "\t@cd %s && $(MAKE) %s/Makefile\n", make->top_obj_dir,
|
||||
+ base_dir_path( make, resource_dlls.str[i] ) );
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < resource_dlls.count; i++)
|
||||
+ {
|
||||
+ output( "%s/%s%s: %s/Makefile\n", resource_dlls.str[i],
|
||||
+ resource_dlls.str[i], dll_ext, resource_dlls.str[i] );
|
||||
+ output( "\t@cd %s && $(MAKE) %s%s\n", resource_dlls.str[i],
|
||||
@ -696,7 +689,7 @@ index 3b7b2b8..aa6a94b 100644
|
||||
if (make->module && !make->staticlib)
|
||||
{
|
||||
struct strarray all_libs = empty_strarray;
|
||||
@@ -2984,6 +3076,83 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
@@ -3024,6 +3109,81 @@ static struct strarray output_sources( const struct makefile *make )
|
||||
add_install_rule( make, install_rules, make->scripts.str[i], make->scripts.str[i],
|
||||
strmake( "S$(bindir)/%s", make->scripts.str[i] ));
|
||||
|
||||
@ -772,15 +765,13 @@ index 3b7b2b8..aa6a94b 100644
|
||||
+ output_filenames( all_libs );
|
||||
+ output_filename( "$(LDFLAGS)" );
|
||||
+ output( "\n" );
|
||||
+ strarray_add( &phony_targets, obj_dir_path( make, "crosstest" ));
|
||||
+ if (make->obj_dir) output( "crosstest: %s\n", obj_dir_path( make, "crosstest" ));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (all_targets.count)
|
||||
if (!make->disabled)
|
||||
{
|
||||
output( "all:" );
|
||||
@@ -3331,4 +3500,5 @@ static void load_sources( struct makefile *make )
|
||||
if (all_targets.count)
|
||||
@@ -3381,4 +3541,5 @@ static void load_sources( struct makefile *make )
|
||||
make->module = get_expanded_make_variable( make, "MODULE" );
|
||||
make->testdll = get_expanded_make_variable( make, "TESTDLL" );
|
||||
+ make->resource = get_expanded_make_variable( make, "RESOURCE" );
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "1510b8b92af23a2305de95f074468c231dc11fa3"
|
||||
echo "846155f1531207a763c099defa90fc2c41135164"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -2512,25 +2512,12 @@ fi
|
||||
|
||||
# Patchset advapi32-RegCopyTree
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#39690] Implement advapi32.RegCopyTree{A,W}
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/advapi32/advapi32.spec, dlls/advapi32/registry.c, dlls/advapi32/tests/registry.c, dlls/api-ms-win-core-
|
||||
# | registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec, dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-
|
||||
# | advapi32-l1-1-0.spec
|
||||
# | * dlls/advapi32/registry.c, dlls/advapi32/tests/registry.c
|
||||
# |
|
||||
if test "$enable_advapi32_RegCopyTree" -eq 1; then
|
||||
patch_apply advapi32-RegCopyTree/0001-advapi32-tests-Improve-RegDeleteTree-tests.patch
|
||||
patch_apply advapi32-RegCopyTree/0002-advapi32-tests-Add-tests-for-RegCopyTree.patch
|
||||
patch_apply advapi32-RegCopyTree/0003-advapi32-Implement-RegCopyTreeA-W.patch
|
||||
patch_apply advapi32-RegCopyTree/0004-advapi32-Simplify-and-clean-up-RegDeleteTree-impleme.patch
|
||||
patch_apply advapi32-RegCopyTree/0005-advapi32-Fix-RegDeleteTreeW-when-empty-string-is-pas.patch
|
||||
patch_apply advapi32-RegCopyTree/0001-advapi32-Fix-RegDeleteTreeW-when-empty-string-is-pas.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "advapi32/tests: Improve RegDeleteTree tests.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "advapi32/tests: Add tests for RegCopyTree.", 1 },';
|
||||
echo '+ { "Michael Müller", "advapi32: Implement RegCopyTreeA/W.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "advapi32: Simplify and clean up RegDeleteTree implementation.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "advapi32: Fix RegDeleteTreeW when empty string is passed.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5cdc790a6ec9c5995f42586d85d3e95e74877c18 Mon Sep 17 00:00:00 2001
|
||||
From 5fd6833b3750a7ab995be0800b6686196196b0cc 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.
|
||||
@ -8,14 +8,15 @@ Subject: wined3d: Move surface locations into the resource.
|
||||
dlls/wined3d/device.c | 4 +-
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 97 ++++++++++++++++++++-------------------
|
||||
dlls/wined3d/swapchain.c | 8 ++--
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
5 files changed, 53 insertions(+), 53 deletions(-)
|
||||
6 files changed, 57 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 84b85c4..b97ff12 100644
|
||||
index 6f73dd2..90f2183 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7855,7 +7855,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7873,7 +7873,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
|
||||
/* Now load the surface */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
@ -25,7 +26,7 @@ index 84b85c4..b97ff12 100644
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 7c5a4c2..b9b39859 100644
|
||||
index 4cebcb8..5e37a2d 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
|
||||
@ -60,10 +61,10 @@ index ff62850..75489db 100644
|
||||
else
|
||||
SetRectEmpty(¤t_rect);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ac74457..a04cc1b 100644
|
||||
index d1b15fd..dd5c469 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
|
||||
@@ -544,7 +544,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");
|
||||
|
||||
@ -72,7 +73,7 @@ index ac74457..a04cc1b 100644
|
||||
ERR("Surface without system memory has WINED3D_LOCATION_SYSMEM set.\n");
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
@@ -664,7 +664,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
}
|
||||
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
@ -81,7 +82,7 @@ index ac74457..a04cc1b 100644
|
||||
|
||||
if (surface_use_pbo(surface))
|
||||
surface->resource.map_binding = WINED3D_LOCATION_BUFFER;
|
||||
@@ -722,7 +722,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -704,7 +704,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
ERR("Unexpected map binding %s.\n", wined3d_debug_location(surface->resource.map_binding));
|
||||
}
|
||||
|
||||
@ -90,7 +91,7 @@ index ac74457..a04cc1b 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
|
||||
@@ -1678,7 +1678,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);
|
||||
|
||||
@ -99,7 +100,7 @@ index ac74457..a04cc1b 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
|
||||
@@ -1801,7 +1801,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");
|
||||
|
||||
@ -108,7 +109,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
TRACE("surface is already in texture\n");
|
||||
return;
|
||||
@@ -2042,7 +2042,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -1893,7 +1893,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@ -117,7 +118,7 @@ index ac74457..a04cc1b 100644
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
|
||||
width = texture_resource->width;
|
||||
@@ -3212,7 +3212,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2986,7 +2986,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 */
|
||||
@ -126,7 +127,7 @@ index ac74457..a04cc1b 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3739,13 +3739,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
@@ -3530,13 +3530,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);
|
||||
|
||||
@ -144,7 +145,7 @@ index ac74457..a04cc1b 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -3760,7 +3761,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3551,7 +3552,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;
|
||||
|
||||
@ -153,7 +154,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -3787,20 +3788,20 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3578,20 +3579,20 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
}
|
||||
|
||||
wined3d_surface_prepare(surface, context, location);
|
||||
@ -179,7 +180,7 @@ index ac74457..a04cc1b 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -3888,7 +3889,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3679,7 +3680,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@ -188,7 +189,7 @@ index ac74457..a04cc1b 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
@@ -3897,7 +3898,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -3688,7 +3689,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@ -197,7 +198,7 @@ index ac74457..a04cc1b 100644
|
||||
}
|
||||
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -3906,9 +3907,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
@@ -3697,9 +3698,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);
|
||||
@ -209,7 +210,7 @@ index ac74457..a04cc1b 100644
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
}
|
||||
|
||||
@@ -3944,7 +3945,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -3735,7 +3736,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
surface_get_memory(surface, &dst, location);
|
||||
@ -218,7 +219,7 @@ index ac74457..a04cc1b 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -3977,33 +3978,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -3768,33 +3769,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@ -258,7 +259,7 @@ index ac74457..a04cc1b 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4043,14 +4044,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3834,14 +3835,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& wined3d_resource_is_offscreen(&texture->resource)
|
||||
@ -275,7 +276,7 @@ index ac74457..a04cc1b 100644
|
||||
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
|
||||
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
|
||||
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
|
||||
@@ -4066,13 +4067,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3857,13 +3858,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -291,7 +292,7 @@ index ac74457..a04cc1b 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};
|
||||
@@ -4087,7 +4088,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3878,7 +3879,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@ -300,7 +301,7 @@ index ac74457..a04cc1b 100644
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4098,7 +4099,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3889,7 +3890,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -309,7 +310,7 @@ index ac74457..a04cc1b 100644
|
||||
== WINED3D_LOCATION_TEXTURE_SRGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4108,7 +4109,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3899,7 +3900,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +319,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
@@ -4143,7 +4144,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3934,7 +3935,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@ -327,7 +328,7 @@ index ac74457..a04cc1b 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -4201,11 +4202,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
|
||||
@@ -3992,11 +3993,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
|
||||
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
DWORD src_location;
|
||||
|
||||
@ -342,7 +343,7 @@ index ac74457..a04cc1b 100644
|
||||
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
|
||||
else /* surface_blt_fbo will load the source location if necessary. */
|
||||
src_location = WINED3D_LOCATION_TEXTURE_RGB;
|
||||
@@ -4224,12 +4225,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4015,12 +4016,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
@ -357,7 +358,7 @@ index ac74457..a04cc1b 100644
|
||||
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
/* Already up to date, nothing to do. */
|
||||
@@ -4238,12 +4239,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4029,12 +4030,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",
|
||||
@ -372,7 +373,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
TRACE("Location already up to date.\n");
|
||||
return;
|
||||
@@ -4257,7 +4258,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4048,7 +4049,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
required_access, surface->resource.access_flags);
|
||||
}
|
||||
|
||||
@ -381,7 +382,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
return;
|
||||
@@ -4296,7 +4297,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4087,7 +4088,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
surface_validate_location(surface, location);
|
||||
|
||||
@ -390,7 +391,7 @@ index ac74457..a04cc1b 100644
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
return;
|
||||
@@ -5358,8 +5359,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5098,8 +5099,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
|
||||
/* In principle this would apply to depth blits as well, but we don't
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
@ -401,7 +402,7 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5403,8 +5404,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5143,8 +5144,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST;
|
||||
}
|
||||
@ -412,11 +413,40 @@ index ac74457..a04cc1b 100644
|
||||
{
|
||||
/* Upload */
|
||||
if (scale)
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index becad97..3fe5d71 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -440,20 +440,20 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
/* Back buffer 0 is already in the draw binding. */
|
||||
tex0 = swapchain->back_buffers[0]->texture_rgb;
|
||||
rb0 = surface_prev->rb_multisample;
|
||||
- locations0 = surface_prev->locations;
|
||||
+ locations0 = surface_prev->resource.locations;
|
||||
|
||||
for (i = 1; i < swapchain->desc.backbuffer_count; ++i)
|
||||
{
|
||||
surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0));
|
||||
|
||||
- if (!(surface->locations & supported_locations))
|
||||
+ if (!(surface->resource.locations & supported_locations))
|
||||
surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding);
|
||||
|
||||
swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb;
|
||||
surface_prev->rb_multisample = surface->rb_multisample;
|
||||
|
||||
- surface_validate_location(surface_prev, surface->locations & supported_locations);
|
||||
- surface_invalidate_location(surface_prev, ~(surface->locations & supported_locations));
|
||||
+ surface_validate_location(surface_prev, surface->resource.locations & supported_locations);
|
||||
+ surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations));
|
||||
|
||||
surface_prev = surface;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b759426..1a39f97 100644
|
||||
index d71f64b..1113eaa 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2422,7 +2422,6 @@ struct wined3d_surface
|
||||
@@ -2511,7 +2511,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
||||
@ -425,5 +455,5 @@ index b759426..1a39f97 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.6.4
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4aad31fd3b9d3949b86cc73e4b4b5f98cce42ea2 Mon Sep 17 00:00:00 2001
|
||||
From 0d24fc66a870c629094b145ba89ef41389f8e3be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 00:53:47 +0100
|
||||
Subject: wined3d: Remove surface_validate_location.
|
||||
@ -7,16 +7,16 @@ Subject: wined3d: Remove surface_validate_location.
|
||||
dlls/wined3d/arb_program_shader.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/surface.c | 31 ++++++++++++-------------------
|
||||
dlls/wined3d/swapchain.c | 4 ++--
|
||||
dlls/wined3d/swapchain.c | 8 ++++----
|
||||
dlls/wined3d/texture.c | 4 +---
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
6 files changed, 18 insertions(+), 28 deletions(-)
|
||||
6 files changed, 20 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 7731230..78f24cd 100644
|
||||
index 90f2183..60d2560 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7902,7 +7902,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7918,7 +7918,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
|
||||
context_release(context);
|
||||
|
||||
@ -26,7 +26,7 @@ index 7731230..78f24cd 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 7c9e96d..613235d 100644
|
||||
index 5e37a2d..ff02a32 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -38,7 +38,7 @@ index 7c9e96d..613235d 100644
|
||||
surface_invalidate_location(rt, ~rt->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
@@ -4124,7 +4124,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4114,7 +4114,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
|
||||
context_release(context);
|
||||
|
||||
@ -48,10 +48,10 @@ index 7c9e96d..613235d 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ea601ff..516b50f1 100644
|
||||
index dd5c469..a955902 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1134,14 +1134,14 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1140,14 +1140,14 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
* and all flags get lost */
|
||||
if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
@ -68,7 +68,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
|
||||
}
|
||||
}
|
||||
@@ -1677,7 +1677,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1686,7 +1686,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
|
||||
context_release(context);
|
||||
|
||||
@ -77,7 +77,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2115,7 +2115,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -1961,7 +1961,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
valid_location = WINED3D_LOCATION_SYSMEM;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ index ea601ff..516b50f1 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2662,7 +2662,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2503,7 +2503,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
{
|
||||
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
|
||||
wined3d_debug_location(surface->resource.map_binding));
|
||||
@ -95,7 +95,7 @@ index ea601ff..516b50f1 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3144,7 +3144,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -2917,7 +2917,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
@ -104,7 +104,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
@@ -3417,7 +3417,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3190,7 +3190,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
@ -113,7 +113,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
@@ -3895,13 +3895,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3685,13 +3685,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ index ea601ff..516b50f1 100644
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4296,7 +4289,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4086,7 +4079,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
break;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ index ea601ff..516b50f1 100644
|
||||
|
||||
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
surface_evict_sysmem(surface);
|
||||
@@ -4479,7 +4472,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
|
||||
@@ -4250,7 +4243,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
|
||||
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
|
||||
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
|
||||
|
||||
@ -145,7 +145,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
}
|
||||
|
||||
@@ -5456,7 +5449,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5204,7 +5197,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
dst_surface, dst_surface->container->resource.draw_binding, dst_rect);
|
||||
context_release(context);
|
||||
|
||||
@ -154,7 +154,7 @@ index ea601ff..516b50f1 100644
|
||||
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -5543,7 +5536,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5291,7 +5284,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
}
|
||||
|
||||
surface->container = container;
|
||||
@ -163,7 +163,7 @@ index ea601ff..516b50f1 100644
|
||||
list_init(&surface->renderbuffers);
|
||||
list_init(&surface->overlays);
|
||||
|
||||
@@ -5575,7 +5568,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5323,7 +5316,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
|
||||
{
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
@ -173,10 +173,28 @@ index ea601ff..516b50f1 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 7728cdc..a97d1f7 100644
|
||||
index 3fe5d71..8ee0f82 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -570,7 +570,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -452,7 +452,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb;
|
||||
surface_prev->rb_multisample = surface->rb_multisample;
|
||||
|
||||
- surface_validate_location(surface_prev, surface->resource.locations & supported_locations);
|
||||
+ wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations);
|
||||
surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations));
|
||||
|
||||
surface_prev = surface;
|
||||
@@ -461,7 +461,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
swapchain->back_buffers[i - 1]->texture_rgb = tex0;
|
||||
surface_prev->rb_multisample = rb0;
|
||||
|
||||
- surface_validate_location(surface_prev, locations0 & supported_locations);
|
||||
+ wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations);
|
||||
surface_invalidate_location(surface_prev, ~(locations0 & supported_locations));
|
||||
|
||||
device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER);
|
||||
@@ -617,7 +617,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
@ -185,7 +203,7 @@ index 7728cdc..a97d1f7 100644
|
||||
surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
@@ -843,7 +843,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -890,7 +890,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@ -195,10 +213,10 @@ index 7728cdc..a97d1f7 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 093cc56..40b668c 100644
|
||||
index 14d5645..8c8d098 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -795,9 +795,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
|
||||
@@ -835,9 +835,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
|
||||
|
||||
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -210,10 +228,10 @@ index 093cc56..40b668c 100644
|
||||
|
||||
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f03e8a1..d912668 100644
|
||||
index 1113eaa..e0ff3b1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2505,7 +2505,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2594,7 +2594,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
|
||||
@ -222,5 +240,5 @@ index f03e8a1..d912668 100644
|
||||
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
|
||||
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 03998dcf5391b8b5da7b8cecbfe2ac6b82c77502 Mon Sep 17 00:00:00 2001
|
||||
From 17d147ac91bdf126f87fea0e4da5365fba35dd63 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 01:02:15 +0100
|
||||
Subject: wined3d: Remove surface_invalidate_location.
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Remove surface_invalidate_location.
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 43 ++++++++++++++++-----------------------
|
||||
dlls/wined3d/swapchain.c | 6 +++---
|
||||
dlls/wined3d/swapchain.c | 10 ++++-----
|
||||
dlls/wined3d/texture.c | 10 ++++-----
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
8 files changed, 29 insertions(+), 41 deletions(-)
|
||||
8 files changed, 31 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 60d2560..eb09795 100644
|
||||
@ -28,10 +28,10 @@ index 60d2560..eb09795 100644
|
||||
|
||||
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_rendertarget_view *view,
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 490c20f..9408cd9 100644
|
||||
index d0deff9..6ff5f4a 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3322,7 +3322,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
@@ -3443,7 +3443,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -41,7 +41,7 @@ index 490c20f..9408cd9 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3cfff6e..1f061fd 100644
|
||||
index d4c0009..300a903 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -399,7 +399,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -53,7 +53,7 @@ index 3cfff6e..1f061fd 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4140,7 +4140,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4115,7 +4115,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -76,10 +76,10 @@ index 75489db..9ba6ef7 100644
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index c4b9cac..b292adc 100644
|
||||
index 9712d63..babc5fd 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -597,7 +597,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
@@ -585,7 +585,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
return;
|
||||
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
@ -88,7 +88,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
static BOOL surface_use_pbo(const struct wined3d_surface *surface)
|
||||
@@ -1111,7 +1111,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
@@ -1093,7 +1093,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
|
||||
|
||||
surface->pbo = 0;
|
||||
@ -97,7 +97,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
static ULONG surface_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -1159,21 +1159,21 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1141,21 +1141,21 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
|
||||
@ -122,7 +122,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
@@ -1224,7 +1224,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1209,7 +1209,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
|
||||
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
{
|
||||
@ -134,7 +134,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
@@ -1708,7 +1711,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1693,7 +1696,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -143,7 +143,7 @@ index c4b9cac..b292adc 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2677,7 +2680,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2526,7 +2529,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@ -152,7 +152,7 @@ index c4b9cac..b292adc 100644
|
||||
|
||||
switch (surface->resource.map_binding)
|
||||
{
|
||||
@@ -3069,7 +3072,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -2924,7 +2927,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -161,7 +161,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
/* Uses the hardware to stretch and flip the image */
|
||||
@@ -3137,7 +3140,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2992,7 +2995,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 */
|
||||
@ -170,7 +170,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3342,7 +3345,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3197,7 +3200,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -179,7 +179,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
/* Front buffer coordinates are always full screen coordinates, but our GL
|
||||
@@ -3836,18 +3839,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3691,18 +3694,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ index c4b9cac..b292adc 100644
|
||||
static DWORD resource_access_from_location(DWORD location)
|
||||
{
|
||||
switch (location)
|
||||
@@ -4395,7 +4386,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
|
||||
@@ -4250,7 +4241,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
|
||||
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -207,7 +207,7 @@ index c4b9cac..b292adc 100644
|
||||
}
|
||||
|
||||
const struct blit_shader ffp_blit = {
|
||||
@@ -5373,7 +5364,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -5204,7 +5195,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -216,7 +216,7 @@ index c4b9cac..b292adc 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -5492,7 +5483,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5323,7 +5314,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
{
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DIB);
|
||||
@ -226,10 +226,28 @@ index c4b9cac..b292adc 100644
|
||||
|
||||
return hr;
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index a97d1f7..a054c05 100644
|
||||
index 8ee0f82..dae2aa5 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -526,7 +526,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -453,7 +453,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
surface_prev->rb_multisample = surface->rb_multisample;
|
||||
|
||||
wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations);
|
||||
- surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations));
|
||||
+ wined3d_resource_invalidate_location(&surface_prev->resource, ~(surface->resource.locations & supported_locations));
|
||||
|
||||
surface_prev = surface;
|
||||
}
|
||||
@@ -462,7 +462,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
surface_prev->rb_multisample = rb0;
|
||||
|
||||
wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations);
|
||||
- surface_invalidate_location(surface_prev, ~(locations0 & supported_locations));
|
||||
+ wined3d_resource_invalidate_location(&surface_prev->resource, ~(locations0 & supported_locations));
|
||||
|
||||
device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
surface_load_location(back_buffer, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -238,7 +256,7 @@ index a97d1f7..a054c05 100644
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -618,7 +618,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
@ -247,7 +265,7 @@ index a97d1f7..a054c05 100644
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
* If the swapeffect is COPY, the content remains the same.
|
||||
@@ -844,7 +844,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -891,7 +891,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_resource_validate_location(&front_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
@ -257,10 +275,10 @@ index a97d1f7..a054c05 100644
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 535159a..da1bbbb 100644
|
||||
index 373c906..9b5bd1b 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -776,7 +776,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -816,7 +816,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
context_release(context);
|
||||
@ -269,7 +287,7 @@ index 535159a..da1bbbb 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -788,9 +788,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
@@ -828,9 +828,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -280,7 +298,7 @@ index 535159a..da1bbbb 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
@@ -1560,7 +1558,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -1698,7 +1696,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
}
|
||||
|
||||
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
|
||||
@ -289,7 +307,7 @@ index 535159a..da1bbbb 100644
|
||||
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1623,7 +1621,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -1761,7 +1759,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
@ -299,10 +317,10 @@ index 535159a..da1bbbb 100644
|
||||
context_release(context);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index dc24c36..428eadd 100644
|
||||
index 0039805..36a82f8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2544,7 +2544,6 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface) DECLSPEC_HID
|
||||
@@ -2572,7 +2572,6 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface) DECLSPEC_HID
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
@ -311,5 +329,5 @@ index dc24c36..428eadd 100644
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5c7c9517db811764d7c14ec2fb10ee4ded9ea4da Mon Sep 17 00:00:00 2001
|
||||
From f47e429fe7f7bc44d96a042442792680e2792c82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:33:17 +0100
|
||||
Subject: wined3d: Replace surface_load_location with resource_load_location.
|
||||
@ -9,16 +9,16 @@ FIXME: Check if this patch is complete enough to make sense.
|
||||
dlls/wined3d/device.c | 4 +-
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 109 +++++++++++++----------------------------
|
||||
dlls/wined3d/swapchain.c | 8 +--
|
||||
dlls/wined3d/swapchain.c | 10 ++--
|
||||
dlls/wined3d/texture.c | 6 +--
|
||||
dlls/wined3d/wined3d_private.h | 2 -
|
||||
7 files changed, 45 insertions(+), 88 deletions(-)
|
||||
7 files changed, 46 insertions(+), 89 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 9408cd9..0d9de90 100644
|
||||
index 6ff5f4a..3109d55 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2293,7 +2293,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2413,7 +2413,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -28,7 +28,7 @@ index 9408cd9..0d9de90 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 0a5b48d..ce31e25 100644
|
||||
index 300a903..4e5c762 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -324,7 +324,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -40,7 +40,7 @@ index 0a5b48d..ce31e25 100644
|
||||
else
|
||||
wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding);
|
||||
}
|
||||
@@ -4123,7 +4123,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4106,7 +4106,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
@ -63,10 +63,10 @@ index 9ba6ef7..0afeff9 100644
|
||||
}
|
||||
else
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 078befb..1721c6e 100644
|
||||
index 2f2c959..fd5cc8c 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -735,7 +735,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -717,7 +717,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, surface);
|
||||
@ -75,7 +75,7 @@ index 078befb..1721c6e 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -801,9 +801,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -783,9 +783,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
|
||||
/* Make sure the locations are up-to-date. Loading the destination
|
||||
* surface isn't required if the entire surface is overwritten. */
|
||||
@ -87,7 +87,7 @@ index 078befb..1721c6e 100644
|
||||
else
|
||||
wined3d_surface_prepare(dst_surface, context, dst_location);
|
||||
|
||||
@@ -894,9 +894,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -876,9 +876,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.) */
|
||||
@ -99,7 +99,7 @@ index 078befb..1721c6e 100644
|
||||
else
|
||||
wined3d_surface_prepare(dst_surface, old_ctx, dst_location);
|
||||
|
||||
@@ -1156,7 +1156,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1154,7 +1154,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
else
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -108,7 +108,7 @@ index 078befb..1721c6e 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -1214,24 +1214,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1215,24 +1215,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ index 078befb..1721c6e 100644
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
@@ -1691,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1692,7 +1674,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
|
||||
@ -142,7 +142,7 @@ index 078befb..1721c6e 100644
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->resource.locations);
|
||||
@@ -1824,7 +1806,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1825,7 +1807,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
}
|
||||
TRACE("Reloading because surface is dirty.\n");
|
||||
|
||||
@ -151,7 +151,7 @@ index 078befb..1721c6e 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2666,7 +2648,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2531,7 +2513,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
|
||||
if (surface->resource.device->d3d_initialized)
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -160,7 +160,7 @@ index 078befb..1721c6e 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -3393,8 +3375,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3264,8 +3246,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
gl_info = context->gl_info;
|
||||
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
@ -171,7 +171,7 @@ index 078befb..1721c6e 100644
|
||||
wined3d_texture_load(src_surface->container, context, FALSE);
|
||||
|
||||
/* Activate the destination context, set it up for blitting */
|
||||
@@ -3814,29 +3796,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3702,29 +3684,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ index 078befb..1721c6e 100644
|
||||
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@@ -3886,7 +3845,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -3774,7 +3733,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@ -210,7 +210,7 @@ index 078befb..1721c6e 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -3922,7 +3881,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -3810,7 +3769,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -219,7 +219,7 @@ index 078befb..1721c6e 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -3995,7 +3954,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3883,7 +3842,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);
|
||||
@ -228,7 +228,7 @@ index 078befb..1721c6e 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4006,7 +3965,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3894,7 +3853,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);
|
||||
@ -237,7 +237,7 @@ index 078befb..1721c6e 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4015,7 +3974,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3903,7 +3862,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);
|
||||
@ -246,7 +246,7 @@ index 078befb..1721c6e 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4041,7 +4000,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3929,7 +3888,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -255,7 +255,7 @@ index 078befb..1721c6e 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4116,9 +4075,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
|
||||
@@ -4004,9 +3963,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
|
||||
surface, src_location, &rect, surface, dst_location, &rect);
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ index 078befb..1721c6e 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4145,20 +4106,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4033,20 +3994,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ index 078befb..1721c6e 100644
|
||||
if (!surface->resource.locations)
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
@@ -5313,7 +5260,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -5159,7 +5106,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
struct wined3d_context *context = context_acquire(device, dst_surface);
|
||||
@ -300,7 +300,7 @@ index 078befb..1721c6e 100644
|
||||
context_release(context);
|
||||
}
|
||||
return WINED3D_OK;
|
||||
@@ -5383,6 +5331,17 @@ cpu:
|
||||
@@ -5229,6 +5177,17 @@ cpu:
|
||||
return surface_cpu_blt(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter);
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ index 078befb..1721c6e 100644
|
||||
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
|
||||
{
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 4009dac..346129e 100644
|
||||
index f3ade59..7c063f2 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -315,7 +315,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
@ -331,7 +331,16 @@ index 4009dac..346129e 100644
|
||||
}
|
||||
|
||||
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
|
||||
@@ -525,14 +525,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -447,7 +447,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
|
||||
surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0));
|
||||
|
||||
if (!(surface->resource.locations & supported_locations))
|
||||
- surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding);
|
||||
+ wined3d_resource_load_location(&surface->resource, context, swapchain->back_buffers[i]->resource.draw_binding);
|
||||
|
||||
swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb;
|
||||
surface_prev->rb_multisample = surface->rb_multisample;
|
||||
@@ -570,14 +570,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
*/
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
@ -348,7 +357,7 @@ index 4009dac..346129e 100644
|
||||
}
|
||||
|
||||
if (swapchain->render_to_fbo)
|
||||
@@ -625,7 +625,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
|
||||
@@ -672,7 +672,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
|
||||
|
||||
TRACE("Copying surface %p to screen.\n", front);
|
||||
|
||||
@ -358,10 +367,10 @@ index 4009dac..346129e 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 49bc782..dd3a600 100644
|
||||
index 72a640a..e3c3ed1 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -774,7 +774,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -814,7 +814,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -370,7 +379,7 @@ index 49bc782..dd3a600 100644
|
||||
context_release(context);
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
@@ -1565,7 +1565,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -1703,7 +1703,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
@ -379,7 +388,7 @@ index 49bc782..dd3a600 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
|
||||
|
||||
if (context)
|
||||
@@ -1628,7 +1628,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -1766,7 +1766,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
@ -389,10 +398,10 @@ index 49bc782..dd3a600 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0ef35dd..c9985c0 100644
|
||||
index 442ab2b..fe43a58 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2551,8 +2551,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
@@ -2580,8 +2580,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -402,5 +411,5 @@ index 0ef35dd..c9985c0 100644
|
||||
const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ff3ebefd7ff7834c3c1a7c9b7998592929e40714 Mon Sep 17 00:00:00 2001
|
||||
From 7be737c0da2f427cb2dae44d83f6baf57a95e73d Mon Sep 17 00:00:00 2001
|
||||
From: Henri Verbeet <hverbeet@codeweavers.com>
|
||||
Date: Sat, 8 Dec 2012 19:28:54 +0100
|
||||
Subject: wined3d: Wait for resource updates to finish when using the
|
||||
@ -17,10 +17,10 @@ then it's probably useful for debugging.
|
||||
6 files changed, 40 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 9f29aa4..59c3409 100644
|
||||
index 21290d8..260228f 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7679,7 +7679,9 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7911,7 +7911,9 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
/* Leave the opengl state valid for blitting */
|
||||
arbfp_blit_unset(context->gl_info);
|
||||
|
||||
@ -32,7 +32,7 @@ index 9f29aa4..59c3409 100644
|
||||
&& (dst_surface->container->swapchain->front_buffer == dst_surface->container)))
|
||||
context->gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 3de580e..41bc6f0 100644
|
||||
index 7eef51e..fa1ddc4 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1100,7 +1100,9 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
||||
@ -47,10 +47,10 @@ index 3de580e..41bc6f0 100644
|
||||
context_release(context);
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index e33d0c0..b9935e0 100644
|
||||
index 68163e5..ebee608 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -463,7 +463,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@@ -493,7 +493,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index e33d0c0..b9935e0 100644
|
||||
&& target->container->swapchain && target->container->swapchain->front_buffer == target->container))
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
@@ -3247,7 +3249,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3357,7 +3359,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
@ -74,10 +74,10 @@ index e33d0c0..b9935e0 100644
|
||||
* fails. */
|
||||
context_release(context);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 98261f9..d3a9e03 100644
|
||||
index 4e66f01..ab4ab49 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -781,7 +781,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -796,7 +796,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
wined3d_event_query_issue(context->buffer_queries[i], device);
|
||||
}
|
||||
|
||||
@ -89,10 +89,10 @@ index 98261f9..d3a9e03 100644
|
||||
|
||||
context_release(context);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1aafda1..caf9618 100644
|
||||
index 2de931f..fd8c5d5 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -687,7 +687,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -669,7 +669,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, gl_mask, GL_NEAREST);
|
||||
checkGLcall("glBlitFramebuffer()");
|
||||
|
||||
@ -103,7 +103,7 @@ index 1aafda1..caf9618 100644
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
context_release(context);
|
||||
@@ -816,7 +818,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -796,7 +798,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
dst_rect.left, dst_rect.top, dst_rect.right, dst_rect.bottom, GL_COLOR_BUFFER_BIT, gl_filter);
|
||||
checkGLcall("glBlitFramebuffer()");
|
||||
|
||||
@ -114,7 +114,7 @@ index 1aafda1..caf9618 100644
|
||||
|| (dst_location == WINED3D_LOCATION_DRAWABLE
|
||||
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
|
||||
gl_info->gl_ops.gl.p_glFlush();
|
||||
@@ -1393,7 +1397,9 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
|
||||
@@ -1341,7 +1345,9 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
|
||||
checkGLcall("glBindBuffer");
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ index 1aafda1..caf9618 100644
|
||||
gl_info->gl_ops.gl.p_glFlush();
|
||||
|
||||
if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE)
|
||||
@@ -3337,7 +3343,9 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2896,7 +2902,9 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
checkGLcall("glDeleteTextures(1, &backup)");
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ index 1aafda1..caf9618 100644
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
context_release(context);
|
||||
@@ -3452,7 +3460,9 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3004,7 +3012,9 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
/* Leave the opengl state valid for blitting */
|
||||
device->blitter->unset_shader(context->gl_info);
|
||||
|
||||
@ -147,7 +147,7 @@ index 1aafda1..caf9618 100644
|
||||
|| (dst_surface->container->swapchain
|
||||
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
@@ -3873,7 +3883,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3369,7 +3379,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
@ -158,7 +158,7 @@ index 1aafda1..caf9618 100644
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
}
|
||||
else if (location == WINED3D_LOCATION_DRAWABLE)
|
||||
@@ -3889,7 +3901,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3385,7 +3397,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
@ -170,10 +170,10 @@ index 1aafda1..caf9618 100644
|
||||
}
|
||||
else
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index ed2964e..60504ef 100644
|
||||
index 335e12c..c50f1f7 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -531,8 +531,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -590,8 +590,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
swapchain_blit(swapchain, context, &src_rect, &dst_rect);
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ index ed2964e..60504ef 100644
|
||||
+ gl_info->gl_ops.gl.p_glFlush();
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */
|
||||
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc);
|
||||
--
|
||||
2.2.1
|
||||
2.7.1
|
||||
|
||||
|
@ -7434,17 +7434,57 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
|
||||
@@ -428,11 +432,19 @@
|
||||
}
|
||||
|
||||
static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
@@ -445,6 +449,7 @@
|
||||
/* Back buffer 0 is already in the draw binding. */
|
||||
tex0 = swapchain->back_buffers[0]->texture_rgb;
|
||||
rb0 = surface_prev->rb_multisample;
|
||||
+#if defined(STAGING_CSMT)
|
||||
const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags,
|
||||
struct wined3d_surface *depth_stencil)
|
||||
locations0 = surface_prev->resource.locations;
|
||||
|
||||
for (i = 1; i < swapchain->desc.backbuffer_count; ++i)
|
||||
@@ -459,6 +464,22 @@
|
||||
|
||||
wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations);
|
||||
wined3d_resource_invalidate_location(&surface_prev->resource, ~(surface->resource.locations & supported_locations));
|
||||
+#else /* STAGING_CSMT */
|
||||
+ locations0 = surface_prev->locations;
|
||||
+
|
||||
+ for (i = 1; i < swapchain->desc.backbuffer_count; ++i)
|
||||
+ {
|
||||
+ surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0));
|
||||
+
|
||||
+ if (!(surface->locations & supported_locations))
|
||||
+ surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding);
|
||||
+
|
||||
+ swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb;
|
||||
+ surface_prev->rb_multisample = surface->rb_multisample;
|
||||
+
|
||||
+ surface_validate_location(surface_prev, surface->locations & supported_locations);
|
||||
+ surface_invalidate_location(surface_prev, ~(surface->locations & supported_locations));
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
surface_prev = surface;
|
||||
}
|
||||
@@ -466,6 +487,7 @@
|
||||
swapchain->back_buffers[i - 1]->texture_rgb = tex0;
|
||||
surface_prev->rb_multisample = rb0;
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations);
|
||||
wined3d_resource_invalidate_location(&surface_prev->resource, ~(locations0 & supported_locations));
|
||||
|
||||
@@ -478,6 +500,20 @@
|
||||
{
|
||||
struct wined3d_surface *back_buffer = surface_from_resource(
|
||||
wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0));
|
||||
+#else /* STAGING_CSMT */
|
||||
+ surface_validate_location(surface_prev, locations0 & supported_locations);
|
||||
+ surface_invalidate_location(surface_prev, ~(locations0 & supported_locations));
|
||||
+
|
||||
+ device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER);
|
||||
+}
|
||||
+
|
||||
+static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
+ const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags)
|
||||
+{
|
||||
+ struct wined3d_surface *back_buffer = surface_from_resource(
|
||||
@ -7454,7 +7494,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
@@ -460,6 +472,37 @@
|
||||
@@ -505,6 +541,37 @@
|
||||
WINED3D_BLT_ALPHA_TEST, NULL, WINED3D_TEXF_POINT);
|
||||
}
|
||||
|
||||
@ -7492,7 +7532,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
TRACE("Presenting HDC %p.\n", context->hdc);
|
||||
|
||||
render_to_fbo = swapchain->render_to_fbo;
|
||||
@@ -501,6 +544,7 @@
|
||||
@@ -546,6 +613,7 @@
|
||||
*/
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
@ -7500,7 +7540,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
wined3d_resource_load_location(&back_buffer->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_resource_invalidate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
@@ -509,6 +553,16 @@
|
||||
@@ -554,6 +622,16 @@
|
||||
else
|
||||
{
|
||||
wined3d_resource_load_location(&back_buffer->resource, context, back_buffer->container->resource.draw_binding);
|
||||
@ -7517,7 +7557,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
if (swapchain->render_to_fbo)
|
||||
@@ -521,8 +575,13 @@
|
||||
@@ -566,8 +644,13 @@
|
||||
swapchain_blit(swapchain, context, &src_rect, &dst_rect);
|
||||
}
|
||||
|
||||
@ -7530,8 +7570,8 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */
|
||||
@@ -546,6 +605,7 @@
|
||||
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc);
|
||||
@@ -593,6 +676,7 @@
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
@ -7539,7 +7579,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
switch (swapchain->desc.swap_effect)
|
||||
@@ -574,6 +634,31 @@
|
||||
@@ -621,6 +705,31 @@
|
||||
{
|
||||
wined3d_texture_decref(swapchain->device->cs->onscreen_depth_stencil->container);
|
||||
swapchain->device->cs->onscreen_depth_stencil = NULL;
|
||||
@ -7571,7 +7611,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -606,7 +691,11 @@
|
||||
@@ -653,7 +762,11 @@
|
||||
|
||||
TRACE("Copying surface %p to screen.\n", front);
|
||||
|
||||
@ -7583,7 +7623,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
@@ -634,8 +723,12 @@
|
||||
@@ -681,8 +794,12 @@
|
||||
}
|
||||
|
||||
static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
@ -7596,7 +7636,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
{
|
||||
struct wined3d_surface *front, *back;
|
||||
|
||||
@@ -662,9 +755,15 @@
|
||||
@@ -709,9 +826,15 @@
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
@ -7612,7 +7652,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
if (front->resource.heap_memory)
|
||||
ERR("GDI Surface %p has heap memory allocated.\n", front);
|
||||
@@ -735,6 +834,7 @@
|
||||
@@ -782,6 +905,7 @@
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
}
|
||||
|
||||
@ -7620,7 +7660,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
HRESULT swapchain_create_context_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
const struct wined3d_adapter *adapter = device->adapter;
|
||||
@@ -798,6 +898,7 @@
|
||||
@@ -845,6 +969,7 @@
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -7628,7 +7668,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
@@ -888,8 +989,13 @@
|
||||
@@ -935,8 +1060,13 @@
|
||||
front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@ -7642,7 +7682,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
@@ -915,9 +1021,66 @@
|
||||
@@ -962,9 +1092,66 @@
|
||||
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@ -8139,7 +8179,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1617,6 +1790,9 @@
|
||||
@@ -1664,6 +1837,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -8149,7 +8189,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1638,8 +1814,15 @@
|
||||
@@ -1685,8 +1861,15 @@
|
||||
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@ -8165,7 +8205,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -1654,12 +1837,14 @@
|
||||
@@ -1701,12 +1884,14 @@
|
||||
|
||||
surface = surface_from_resource(sub_resource);
|
||||
|
||||
@ -8180,7 +8220,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
/* Give more detailed info for ddraw. */
|
||||
if (surface->flags & SFLAG_DCINUSE)
|
||||
return WINEDDERR_DCALREADYCREATED;
|
||||
@@ -1668,6 +1853,7 @@
|
||||
@@ -1715,6 +1900,7 @@
|
||||
if (surface->resource.map_count)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -8188,7 +8228,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface->flags |= SFLAG_DCINUSE;
|
||||
surface->resource.map_count++;
|
||||
wined3d_cs_emit_getdc(device->cs, surface);
|
||||
@@ -1680,6 +1866,45 @@
|
||||
@@ -1727,6 +1913,45 @@
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@ -8234,7 +8274,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
struct wined3d_resource *sub_resource;
|
||||
struct wined3d_surface *surface;
|
||||
|
||||
@@ -1709,7 +1934,30 @@
|
||||
@@ -1756,7 +1981,30 @@
|
||||
surface->resource.map_count--;
|
||||
surface->flags &= ~SFLAG_DCINUSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user