Rebase against 813368481679a5848bc715d1e181782de157485f.

This commit is contained in:
Sebastian Lackner 2015-08-06 17:34:47 +02:00
parent 0054a6b6f5
commit 4a9653f221
9 changed files with 34 additions and 509 deletions

View File

@ -179,7 +179,7 @@ for more details.*
* Implement a Microsoft Yahei replacement font ([Wine Bug #13829](https://bugs.winehq.org/show_bug.cgi?id=13829))
* Implement an Arial replacement font ([Wine Bug #32323](https://bugs.winehq.org/show_bug.cgi?id=32323))
* Implement combase.WindowsSubstring function
* Implement dbghelp.UnDecorateSymbolNameW ([Wine Bug #38828](https://bugs.winehq.org/show_bug.cgi?id=38828))
* ~~Implement dbghelp.UnDecorateSymbolNameW~~ ([Wine Bug #38828](https://bugs.winehq.org/show_bug.cgi?id=38828))
* Implement default homepage button in inetcpl.cpl
* Implement empty enumerator for IWiaDevMgr::EnumDeviceInfo ([Wine Bug #27775](https://bugs.winehq.org/show_bug.cgi?id=27775))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
@ -193,7 +193,7 @@ for more details.*
* Implement stub for ntoskrnl.KeDelayExecutionThread.
* Implement stubs for ntoskrnl.Ex{Acquire,Release}FastMutexUnsafe
* Implement stubs for ntoskrnl.ObReferenceObjectByPointer and ntoskrnl.ObDereferenceObject
* Implement various vcomp functions ([Wine Bug #31640](https://bugs.winehq.org/show_bug.cgi?id=31640))
* ~~Implement various vcomp functions~~ ([Wine Bug #31640](https://bugs.winehq.org/show_bug.cgi?id=31640))
* Improve ReadDataAvailable handling in FilePipeLocalInformation class
* Improve stub for AEV_GetVolumeRange ([Wine Bug #35658](https://bugs.winehq.org/show_bug.cgi?id=35658))
* Improve stub for ID3DXEffectImpl_CloneEffect

3
debian/changelog vendored
View File

@ -14,6 +14,9 @@ wine-staging (1.7.49) UNRELEASED; urgency=low
* Removed patch to improve stub for NtQueryInformationJobObject (accepted
upstream).
* Removed patch to avoid OpenCL deprecation warnings (accepted upstream).
* Removed patch for implementation of dbghelp.UnDecorateSymbolNameW (accepted
upstream).
* Removed patch for dynamic work scheduling in vcomp.dll (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Wed, 29 Jul 2015 22:52:46 +0200
wine-staging (1.7.48) unstable; urgency=low

View File

@ -1,116 +0,0 @@
From d344fccd208a6d3e21df96050f35d733b301844f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 28 Jul 2015 22:58:03 +0200
Subject: dbghelp: Implement UnDecorateSymbolNameW. (v2)
---
dlls/dbghelp/dbghelp.spec | 4 +--
dlls/dbghelp/symbol.c | 64 ++++++++++++++++++++++++++++++++++++-----------
2 files changed, 52 insertions(+), 16 deletions(-)
diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec
index 4772358..6004f95 100644
--- a/dlls/dbghelp/dbghelp.spec
+++ b/dlls/dbghelp/dbghelp.spec
@@ -183,8 +183,8 @@
@ stdcall SymUnDName64(ptr str long)
@ stdcall SymUnloadModule(long long)
@ stdcall SymUnloadModule64(long int64)
-@ stdcall UnDecorateSymbolName(str str long long)
-@ stub UnDecorateSymbolNameW
+@ stdcall UnDecorateSymbolName(str ptr long long)
+@ stdcall UnDecorateSymbolNameW(wstr ptr long long)
@ stdcall UnmapDebugInformation(ptr)
@ stdcall WinDbgExtensionDllInit(ptr long long)
#@ stub block
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index cbe232b..7fbac5b 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1751,33 +1751,69 @@ BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym, PSTR UnDecName, DWORD UnDecName
static void * CDECL und_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); }
static void CDECL und_free (void* ptr) { HeapFree(GetProcessHeap(), 0, ptr); }
-
-/***********************************************************************
- * UnDecorateSymbolName (DBGHELP.@)
- */
-DWORD WINAPI UnDecorateSymbolName(PCSTR DecoratedName, PSTR UnDecoratedName,
- DWORD UndecoratedLength, DWORD Flags)
+static char * CDECL und_name(char *buffer, const char *mangled, int buflen, unsigned short flags)
{
/* undocumented from msvcrt */
static HANDLE hMsvcrt;
static char* (CDECL *p_undname)(char*, const char*, int, void* (CDECL*)(size_t), void (CDECL*)(void*), unsigned short);
static const WCHAR szMsvcrt[] = {'m','s','v','c','r','t','.','d','l','l',0};
- TRACE("(%s, %p, %d, 0x%08x)\n",
- debugstr_a(DecoratedName), UnDecoratedName, UndecoratedLength, Flags);
-
if (!p_undname)
{
if (!hMsvcrt) hMsvcrt = LoadLibraryW(szMsvcrt);
if (hMsvcrt) p_undname = (void*)GetProcAddress(hMsvcrt, "__unDName");
- if (!p_undname) return 0;
+ if (!p_undname) return NULL;
}
- if (!UnDecoratedName) return 0;
- if (!p_undname(UnDecoratedName, DecoratedName, UndecoratedLength,
- und_alloc, und_free, Flags))
+ return p_undname(buffer, mangled, buflen, und_alloc, und_free, flags);
+}
+
+/***********************************************************************
+ * UnDecorateSymbolName (DBGHELP.@)
+ */
+DWORD WINAPI UnDecorateSymbolName(const char *decorated_name, char *undecorated_name,
+ DWORD undecorated_length, DWORD flags)
+{
+ TRACE("(%s, %p, %d, 0x%08x)\n",
+ debugstr_a(decorated_name), undecorated_name, undecorated_length, flags);
+
+ if (!undecorated_name || !undecorated_length)
return 0;
- return strlen(UnDecoratedName);
+ if (!und_name(undecorated_name, decorated_name, undecorated_length, flags))
+ return 0;
+ return strlen(undecorated_name);
+}
+
+/***********************************************************************
+ * UnDecorateSymbolNameW (DBGHELP.@)
+ */
+DWORD WINAPI UnDecorateSymbolNameW(const WCHAR *decorated_name, WCHAR *undecorated_name,
+ DWORD undecorated_length, DWORD flags)
+{
+ char *buf, *ptr;
+ int len, ret = 0;
+
+ TRACE("(%s, %p, %d, 0x%08x)\n",
+ debugstr_w(decorated_name), undecorated_name, undecorated_length, flags);
+
+ if (!undecorated_name || !undecorated_length)
+ return 0;
+
+ len = WideCharToMultiByte(CP_ACP, 0, decorated_name, -1, NULL, 0, NULL, NULL);
+ if ((buf = HeapAlloc(GetProcessHeap(), 0, len)))
+ {
+ WideCharToMultiByte(CP_ACP, 0, decorated_name, -1, buf, len, NULL, NULL);
+ if ((ptr = und_name(NULL, buf, 0, flags)))
+ {
+ MultiByteToWideChar(CP_ACP, 0, ptr, -1, undecorated_name, undecorated_length);
+ undecorated_name[undecorated_length - 1] = 0;
+ ret = strlenW(undecorated_name);
+ und_free(ptr);
+ }
+ HeapFree(GetProcessHeap(), 0, buf);
+ }
+
+ return ret;
}
#define WILDCHAR(x) (-(x))
--
2.5.0

View File

@ -1 +0,0 @@
Fixes: [38828] Implement dbghelp.UnDecorateSymbolNameW

View File

@ -55,7 +55,7 @@ version()
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
echo " commit 07e4d4bd044ac3c9f46526b210205216d8bfeb45"
echo " commit 813368481679a5848bc715d1e181782de157485f"
echo ""
}
@ -109,7 +109,6 @@ patch_enable_all ()
enable_d3dx9_36_Texture_Align="$1"
enable_d3dx9_36_UpdateSkinnedMesh="$1"
enable_dbghelp_Debug_Symbols="$1"
enable_dbghelp_UnDecorateSymbolNameW="$1"
enable_ddraw_EnumSurfaces="$1"
enable_ddraw_IDirect3DTexture2_Load="$1"
enable_ddraw_Rendering_Targets="$1"
@ -238,7 +237,6 @@ patch_enable_all ()
enable_user32_Painting="$1"
enable_user32_ScrollWindowEx="$1"
enable_user32_WndProc="$1"
enable_vcomp_Functions="$1"
enable_version_VerQueryValue="$1"
enable_wbemdisp_ISWbemSecurity="$1"
enable_wbemdisp_Timeout="$1"
@ -404,9 +402,6 @@ patch_enable ()
dbghelp-Debug_Symbols)
enable_dbghelp_Debug_Symbols="$2"
;;
dbghelp-UnDecorateSymbolNameW)
enable_dbghelp_UnDecorateSymbolNameW="$2"
;;
ddraw-EnumSurfaces)
enable_ddraw_EnumSurfaces="$2"
;;
@ -791,9 +786,6 @@ patch_enable ()
user32-WndProc)
enable_user32_WndProc="$2"
;;
vcomp-Functions)
enable_vcomp_Functions="$2"
;;
version-VerQueryValue)
enable_version_VerQueryValue="$2"
;;
@ -2494,21 +2486,6 @@ if test "$enable_dbghelp_Debug_Symbols" -eq 1; then
) >> "$patchlist"
fi
# Patchset dbghelp-UnDecorateSymbolNameW
# |
# | This patchset fixes the following Wine bugs:
# | * [#38828] Implement dbghelp.UnDecorateSymbolNameW
# |
# | Modified files:
# | * dlls/dbghelp/dbghelp.spec, dlls/dbghelp/symbol.c
# |
if test "$enable_dbghelp_UnDecorateSymbolNameW" -eq 1; then
patch_apply dbghelp-UnDecorateSymbolNameW/0001-dbghelp-Implement-UnDecorateSymbolNameW.patch
(
echo '+ { "Sebastian Lackner", "dbghelp: Implement UnDecorateSymbolNameW.", 2 },';
) >> "$patchlist"
fi
# Patchset ddraw-EnumSurfaces
# |
# | This patchset fixes the following Wine bugs:
@ -4661,24 +4638,6 @@ if test "$enable_user32_WndProc" -eq 1; then
) >> "$patchlist"
fi
# Patchset vcomp-Functions
# |
# | This patchset fixes the following Wine bugs:
# | * [#31640] Implement various vcomp functions
# |
# | Modified files:
# | * dlls/vcomp/main.c, dlls/vcomp/tests/vcomp.c, dlls/vcomp/vcomp.spec, dlls/vcomp100/vcomp100.spec,
# | dlls/vcomp90/vcomp90.spec
# |
if test "$enable_vcomp_Functions" -eq 1; then
patch_apply vcomp-Functions/0001-vcomp-Implement-_vcomp_for_dynamic_init-and-_vcomp_f.patch
patch_apply vcomp-Functions/0002-vcomp-tests-Add-tests-for-_vcomp_for_dynamic_init.patch
(
echo '+ { "Sebastian Lackner", "vcomp: Implement _vcomp_for_dynamic_init and _vcomp_for_dynamic_next.", 1 },';
echo '+ { "Sebastian Lackner", "vcomp/tests: Add tests for _vcomp_for_dynamic_init.", 1 },';
) >> "$patchlist"
fi
# Patchset version-VerQueryValue
# |
# | Modified files:
@ -4868,30 +4827,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_swapchain_present
# |
# | Modified files:
# | * dlls/wined3d/swapchain.c
# |
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Geforce_425M
# |
# | This patchset fixes the following Wine bugs:
@ -4979,6 +4914,30 @@ if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_swapchain_present
# |
# | Modified files:
# | * dlls/wined3d/swapchain.c
# |
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,207 +0,0 @@
From ae5dc1f9033a941c293ad221c19e5d49c140a13f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 19 Jul 2015 01:01:28 +0200
Subject: vcomp: Implement _vcomp_for_dynamic_init and _vcomp_for_dynamic_next.
---
dlls/vcomp/main.c | 77 +++++++++++++++++++++++++++++++++++++++++++++
dlls/vcomp/vcomp.spec | 4 +--
dlls/vcomp100/vcomp100.spec | 4 +--
dlls/vcomp90/vcomp90.spec | 4 +--
4 files changed, 83 insertions(+), 6 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
index 301370c..2433abc 100644
--- a/dlls/vcomp/main.c
+++ b/dlls/vcomp/main.c
@@ -64,6 +64,9 @@ struct vcomp_thread_data
/* section */
unsigned int section;
+
+ /* dynamic */
+ unsigned int dynamic;
};
struct vcomp_team_data
@@ -88,6 +91,14 @@ struct vcomp_task_data
unsigned int section;
int num_sections;
int section_index;
+
+ /* dynamic */
+ unsigned int dynamic;
+ unsigned int dynamic_first;
+ unsigned int dynamic_iterations;
+ int dynamic_step;
+ unsigned int dynamic_chunksize;
+ unsigned int dynamic_min_chunksize;
};
#if defined(__i386__)
@@ -200,6 +211,7 @@ static struct vcomp_thread_data *vcomp_init_thread_data(void)
}
data->task.section = 0;
+ data->task.dynamic = 0;
thread_data = &data->thread;
thread_data->team = NULL;
@@ -208,6 +220,7 @@ static struct vcomp_thread_data *vcomp_init_thread_data(void)
thread_data->parallel = FALSE;
thread_data->fork_threads = 0;
thread_data->section = 1;
+ thread_data->dynamic = 1;
vcomp_set_thread_data(thread_data);
return thread_data;
@@ -634,6 +647,66 @@ void CDECL _vcomp_for_static_end(void)
/* nothing to do here */
}
+void CDECL _vcomp_for_dynamic_init(unsigned int flags, unsigned int first, unsigned int last,
+ int step, unsigned int chunksize)
+{
+ struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
+ struct vcomp_task_data *task_data = thread_data->task;
+
+ TRACE("(%u, %u, %u, %d, %u)\n", flags, first, last, step, chunksize);
+
+ EnterCriticalSection(&vcomp_section);
+ thread_data->dynamic++;
+ if ((int)(thread_data->dynamic - task_data->dynamic) > 0)
+ {
+ struct vcomp_team_data *team_data = thread_data->team;
+ int num_threads = team_data ? team_data->num_threads : 1;
+ unsigned int iterations;
+
+ if (flags & 0x40)
+ iterations = 1 + (last - first) / step;
+ else
+ {
+ iterations = 1 + (first - last) / step;
+ step *= -1;
+ }
+
+ task_data->dynamic = thread_data->dynamic;
+ task_data->dynamic_first = first;
+ task_data->dynamic_iterations = iterations;
+ task_data->dynamic_step = step;
+ task_data->dynamic_chunksize = max(1, iterations / num_threads);
+ task_data->dynamic_min_chunksize = max(1, chunksize);
+ }
+ LeaveCriticalSection(&vcomp_section);
+}
+
+int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
+{
+ struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
+ struct vcomp_task_data *task_data = thread_data->task;
+ unsigned int iterations = 0;
+
+ TRACE("(%p, %p)\n", begin, end);
+
+ EnterCriticalSection(&vcomp_section);
+ if (thread_data->dynamic == task_data->dynamic &&
+ task_data->dynamic_iterations != 0)
+ {
+ iterations = min(task_data->dynamic_iterations, task_data->dynamic_chunksize);
+ *begin = task_data->dynamic_first;
+ *end = task_data->dynamic_first + (iterations - 1) * task_data->dynamic_step;
+
+ task_data->dynamic_iterations -= iterations;
+ task_data->dynamic_first += iterations * task_data->dynamic_step;
+ task_data->dynamic_chunksize = max((task_data->dynamic_chunksize * 3 + 2)/4,
+ task_data->dynamic_min_chunksize);
+ }
+ LeaveCriticalSection(&vcomp_section);
+
+ return (iterations != 0);
+}
+
int CDECL omp_in_parallel(void)
{
TRACE("()\n");
@@ -711,6 +784,7 @@ void WINAPIV _vcomp_fork(BOOL ifval, int nargs, void *wrapper, ...)
team_data.barrier_count = 0;
task_data.section = 0;
+ task_data.dynamic = 0;
thread_data.team = &team_data;
thread_data.task = &task_data;
@@ -718,6 +792,7 @@ void WINAPIV _vcomp_fork(BOOL ifval, int nargs, void *wrapper, ...)
thread_data.parallel = ifval || prev_thread_data->parallel;
thread_data.fork_threads = 0;
thread_data.section = 1;
+ thread_data.dynamic = 1;
list_init(&thread_data.entry);
InitializeConditionVariable(&thread_data.cond);
@@ -736,6 +811,7 @@ void WINAPIV _vcomp_fork(BOOL ifval, int nargs, void *wrapper, ...)
data->parallel = thread_data.parallel;
data->fork_threads = 0;
data->section = 1;
+ data->dynamic = 1;
list_remove(&data->entry);
list_add_tail(&thread_data.entry, &data->entry);
WakeAllConditionVariable(&data->cond);
@@ -757,6 +833,7 @@ void WINAPIV _vcomp_fork(BOOL ifval, int nargs, void *wrapper, ...)
data->parallel = thread_data.parallel;
data->fork_threads = 0;
data->section = 1;
+ data->dynamic = 1;
InitializeConditionVariable(&data->cond);
thread = CreateThread(NULL, 0, _vcomp_fork_worker, data, 0, NULL);
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
index 3a709df..6e2fcec 100644
--- a/dlls/vcomp/vcomp.spec
+++ b/dlls/vcomp/vcomp.spec
@@ -55,9 +55,9 @@
@ stub _vcomp_copyprivate_receive
@ stub _vcomp_enter_critsect
@ stub _vcomp_flush
-@ stub _vcomp_for_dynamic_init
+@ cdecl _vcomp_for_dynamic_init(long long long long long)
@ stub _vcomp_for_dynamic_init_i8
-@ stub _vcomp_for_dynamic_next
+@ cdecl _vcomp_for_dynamic_next(ptr ptr)
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
index 56c7ae3..ab93ec2 100644
--- a/dlls/vcomp100/vcomp100.spec
+++ b/dlls/vcomp100/vcomp100.spec
@@ -55,9 +55,9 @@
@ stub _vcomp_copyprivate_receive
@ stub _vcomp_enter_critsect
@ stub _vcomp_flush
-@ stub _vcomp_for_dynamic_init
+@ cdecl _vcomp_for_dynamic_init(long long long long long) vcomp._vcomp_for_dynamic_init
@ stub _vcomp_for_dynamic_init_i8
-@ stub _vcomp_for_dynamic_next
+@ cdecl _vcomp_for_dynamic_next(ptr ptr) vcomp._vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr) vcomp._vcomp_for_static_init
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
index 56c7ae3..ab93ec2 100644
--- a/dlls/vcomp90/vcomp90.spec
+++ b/dlls/vcomp90/vcomp90.spec
@@ -55,9 +55,9 @@
@ stub _vcomp_copyprivate_receive
@ stub _vcomp_enter_critsect
@ stub _vcomp_flush
-@ stub _vcomp_for_dynamic_init
+@ cdecl _vcomp_for_dynamic_init(long long long long long) vcomp._vcomp_for_dynamic_init
@ stub _vcomp_for_dynamic_init_i8
-@ stub _vcomp_for_dynamic_next
+@ cdecl _vcomp_for_dynamic_next(ptr ptr) vcomp._vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr) vcomp._vcomp_for_static_init
--
2.4.5

View File

@ -1,112 +0,0 @@
From 6c4782b340f4cd6c9262cda2a4023f3d472e380e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 19 Jul 2015 01:05:02 +0200
Subject: vcomp/tests: Add tests for _vcomp_for_dynamic_init.
---
dlls/vcomp/tests/vcomp.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c
index f021a72..faa7bd1 100644
--- a/dlls/vcomp/tests/vcomp.c
+++ b/dlls/vcomp/tests/vcomp.c
@@ -51,6 +51,9 @@ static void (CDECL *p_vcomp_atomic_sub_r4)(float *dest, float val);
static void (CDECL *p_vcomp_atomic_sub_r8)(double *dest, double val);
static void (CDECL *p_vcomp_atomic_xor_i4)(int *dest, int val);
static void (CDECL *p_vcomp_barrier)(void);
+static void (CDECL *p_vcomp_for_dynamic_init)(unsigned int flags, unsigned int first, unsigned int last,
+ int step, unsigned int chunksize);
+static int (CDECL *p_vcomp_for_dynamic_next)(unsigned int *begin, unsigned int *end);
static void (CDECL *p_vcomp_for_static_end)(void);
static void (CDECL *p_vcomp_for_static_init)(int first, int last, int step, int chunksize, unsigned int *loops,
int *begin, int *end, int *next, int *lastchunk);
@@ -214,6 +217,8 @@ static BOOL init_vcomp(void)
VCOMP_GET_PROC(_vcomp_atomic_sub_r8);
VCOMP_GET_PROC(_vcomp_atomic_xor_i4);
VCOMP_GET_PROC(_vcomp_barrier);
+ VCOMP_GET_PROC(_vcomp_for_dynamic_init);
+ VCOMP_GET_PROC(_vcomp_for_dynamic_next);
VCOMP_GET_PROC(_vcomp_for_static_end);
VCOMP_GET_PROC(_vcomp_for_static_init);
VCOMP_GET_PROC(_vcomp_for_static_simple_init);
@@ -991,6 +996,68 @@ static void test_atomic_double(void)
}
}
+static void CDECL for_dynamic_cb(LONG *a, LONG *b, LONG *c)
+{
+ unsigned int begin, end;
+
+ p_vcomp_for_dynamic_init(0x40, 1, 999983, 1, 30);
+ while (p_vcomp_for_dynamic_next(&begin, &end))
+ {
+ InterlockedExchangeAdd(a, end - begin + 1);
+ Sleep(1);
+ }
+
+ p_vcomp_for_dynamic_init(0, 99991, 1, 1, 50);
+ while (p_vcomp_for_dynamic_next(&begin, &end))
+ {
+ InterlockedExchangeAdd(b, begin - end + 1);
+ Sleep(1);
+ }
+
+ p_vcomp_for_dynamic_init(0x40, 1, 9973, 7, 30);
+ while (p_vcomp_for_dynamic_next(&begin, &end))
+ {
+ while (begin <= end)
+ {
+ InterlockedIncrement(c);
+ begin += 7;
+ }
+ Sleep(1);
+ }
+}
+
+static void test_vcomp_for_dynamic_init(void)
+{
+ int max_threads = pomp_get_max_threads();
+ LONG a, b, c;
+ int i;
+
+ a = b = c = 0;
+ for_dynamic_cb(&a, &b, &c);
+ ok(a == 999983, "expected a == 999983, got %d\n", a);
+ ok(b == 99991, "expected b == 99991, got %d\n", b);
+ ok(c == 1425, "expected c == 1425, got %d\n", c);
+
+ for (i = 1; i <= 4; i++)
+ {
+ pomp_set_num_threads(i);
+
+ a = b = c = 0;
+ p_vcomp_fork(TRUE, 3, for_dynamic_cb, &a, &b, &c);
+ ok(a == 999983, "expected a == 999983, got %d\n", a);
+ ok(b == 99991, "expected b == 99991, got %d\n", b);
+ ok(c == 1425, "expected c == 1425, got %d\n", c);
+
+ a = b = c = 0;
+ p_vcomp_fork(FALSE, 3, for_dynamic_cb, &a, &b, &c);
+ ok(a == 999983, "expected a == 999983, got %d\n", a);
+ ok(b == 99991, "expected b == 99991, got %d\n", b);
+ ok(c == 1425, "expected c == 1425, got %d\n", c);
+ }
+
+ pomp_set_num_threads(max_threads);
+}
+
START_TEST(vcomp)
{
if (!init_vcomp())
@@ -1002,6 +1069,7 @@ START_TEST(vcomp)
test_vcomp_sections_init();
test_vcomp_for_static_simple_init();
test_vcomp_for_static_init();
+ test_vcomp_for_dynamic_init();
test_atomic_integer32();
test_atomic_float();
test_atomic_double();
--
2.4.5

View File

@ -1 +0,0 @@
Fixes: [31640] Implement various vcomp functions

View File

@ -1152,7 +1152,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3720,7 +3720,11 @@
@@ -3721,7 +3721,11 @@
float y_offset = context->render_offscreen
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@ -1164,7 +1164,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? 2.0f : 0.0f;
float z_offset = zenable ? -1.0f : 0.0f;
@@ -3843,6 +3847,7 @@
@@ -3844,6 +3848,7 @@
/* case WINED3D_TTFF_COUNT1: Won't ever get here. */
case WINED3D_TTFF_COUNT2:
mat._13 = mat._23 = mat._33 = mat._43 = 0.0f;
@ -1172,7 +1172,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
/* OpenGL divides the first 3 vertex coord by the 4th by default,
* which is essentially the same as D3DTTFF_PROJECTED. Make sure that
* the 4th coord evaluates to 1.0 to eliminate that.
@@ -3855,6 +3860,20 @@
@@ -3856,6 +3861,20 @@
* A more serious problem occurs if the app passes 4 coordinates in, and the
* 4th is != 1.0(opengl default). This would have to be fixed in draw_strided_slow
* or a replacement shader. */
@ -1193,7 +1193,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
default:
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
}
@@ -4310,7 +4329,11 @@
@@ -4311,7 +4330,11 @@
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;