Rebase against 1ddf2b4db8c42da36bdccd43dc336eee6ba03cce.

This commit is contained in:
Sebastian Lackner 2017-03-10 03:25:38 +01:00
parent 3b1cd79e05
commit 0ef6532241
23 changed files with 541 additions and 1734 deletions

View File

@ -20,6 +20,5 @@ Fixes: Add kernelbase dll
Fixes: Add iertutil dll
Fixes: Add shcore dll
Fixes: [40451] Add feclient dll
Depends: kernel32-GetCurrentPackageFamilyName
Depends: combase-RoApi
Depends: kernel32-UmsStubs

View File

@ -1,32 +0,0 @@
From d98a585a7d809889d84a45546d7d259a9ab35356 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 27 Oct 2016 01:33:34 +0200
Subject: cabinet: Set index of folder in FDICopy callback.
---
dlls/cabinet/fdi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
index fdff0bf..758133e 100644
--- a/dlls/cabinet/fdi.c
+++ b/dlls/cabinet/fdi.c
@@ -2640,6 +2640,7 @@ BOOL __cdecl FDICopy(
fdin.date = file->date;
fdin.time = file->time;
fdin.attribs = file->attribs;
+ fdin.iFolder = file->index;
if ((filehf = ((*pfnfdin)(fdintCOPY_FILE, &fdin))) == -1) {
set_error( fdi, FDIERROR_USER_ABORT, 0 );
filehf = 0;
@@ -2765,6 +2766,7 @@ BOOL __cdecl FDICopy(
fdin.date = file->date;
fdin.time = file->time;
fdin.attribs = file->attribs; /* FIXME: filter _A_EXEC? */
+ fdin.iFolder = file->index;
((*pfnfdin)(fdintCLOSE_FILE_INFO, &fdin));
filehf = 0;
--
2.9.0

View File

@ -1 +0,0 @@
Fixes: [10858] Set index of folder in FDICopy callback

View File

@ -1,4 +1,4 @@
From 29ccadcb0e716255ac5e43b8784d129f3fc2a441 Mon Sep 17 00:00:00 2001
From caafb5926a24065e96350fc255ea92c0863c2730 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Fri, 19 Dec 2014 22:31:46 +0100
Subject: d3dx9_36: Implement ID3DXEffect_FindNextValidTechnique + add tests.
@ -9,7 +9,7 @@ Subject: d3dx9_36: Implement ID3DXEffect_FindNextValidTechnique + add tests.
2 files changed, 91 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 7772406..00c486c 100644
index 42f5aea966b..7c1d1787bf1 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -3538,13 +3538,41 @@ static HRESULT WINAPI ID3DXEffectImpl_ValidateTechnique(ID3DXEffect* iface, D3DX
@ -58,10 +58,10 @@ index 7772406..00c486c 100644
static BOOL walk_parameter_dep(struct d3dx_parameter *param, walk_parameter_dep_func param_func,
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 41db494..efc991e 100644
index 56d9fe627be..1b9bea6a55c 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -4275,6 +4275,65 @@ static void test_effect_isparameterused(IDirect3DDevice9 *device)
@@ -4413,6 +4413,65 @@ static void test_effect_out_of_bounds_selector(IDirect3DDevice9 *device)
effect->lpVtbl->Release(effect);
}
@ -127,14 +127,14 @@ index 41db494..efc991e 100644
START_TEST(effect)
{
HWND wnd;
@@ -4318,6 +4377,7 @@ START_TEST(effect)
test_effect_preshader(device);
@@ -4457,6 +4516,7 @@ START_TEST(effect)
test_effect_preshader_ops(device);
test_effect_isparameterused(device);
test_effect_out_of_bounds_selector(device);
+ test_effect_technique_validation(device);
count = IDirect3DDevice9_Release(device);
ok(count == 0, "The device was not properly freed: refcount %u\n", count);
--
2.8.0
2.11.0

View File

@ -1,160 +0,0 @@
From e2c6e94c6dd1312f467e5528fa2767b7da6eaca4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 Jan 2016 13:23:02 +0100
Subject: kernel32: Add stub for GetCurrentPackageFamilyName and add related
functions to spec file.
---
.../api-ms-win-appmodel-runtime-l1-1-1.spec | 2 +-
dlls/kernel32/kernel32.spec | 34 ++++++++++++++++++++++
dlls/kernel32/version.c | 9 ++++++
3 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
index 2c5cf9e5bda..50f8594785f 100644
--- a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
+++ b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
@@ -3,7 +3,7 @@
@ stub FormatApplicationUserModelId
@ stub GetApplicationUserModelId
@ stub GetCurrentApplicationUserModelId
-@ stub GetCurrentPackageFamilyName
+@ stdcall GetCurrentPackageFamilyName(ptr ptr) kernel32.GetCurrentPackageFamilyName
@ stdcall GetCurrentPackageFullName(ptr ptr) kernel32.GetCurrentPackageFullName
@ stdcall GetCurrentPackageId(ptr ptr) kernel32.GetCurrentPackageId
@ stub GetCurrentPackageInfo
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 59e39a74917..e01e8605d53 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -225,6 +225,7 @@
@ stdcall ClearCommError(long ptr ptr)
@ stdcall CloseConsoleHandle(long)
@ stdcall CloseHandle(long)
+@ stub ClosePackageInfo
# @ stub ClosePrivateNamespace
@ stdcall CloseProfileUserMapping()
@ stub CloseSystemHandle
@@ -506,6 +507,7 @@
@ stdcall FindNextVolumeW(long ptr long)
# @ stub FindNLSString
# @ stub FindNLSStringEx
+@ stub FindPackagesByPackageFamily
@ stdcall FindResourceA(long str str)
@ stdcall FindResourceExA(long str str long)
@ stdcall FindResourceExW(long wstr wstr long)
@@ -524,6 +526,7 @@
@ stdcall FlushViewOfFile(ptr long)
@ stdcall FoldStringA(long str long ptr long)
@ stdcall FoldStringW(long wstr long ptr long)
+@ stub FormatApplicationUserModelId
@ stdcall FormatMessageA(long ptr long long ptr long ptr)
@ stdcall FormatMessageW(long ptr long long ptr long ptr)
@ stdcall FreeConsole()
@@ -544,6 +547,8 @@
# @ stub GetActiveProcessorGroupCount
# @ stub GetApplicationRecoveryCallback
# @ stub GetApplicationRestartSettings
+@ stub GetApplicationUserModelId
+@ stub GetApplicationUserModelIdFromToken
@ stdcall GetAtomNameA(long ptr long)
@ stdcall GetAtomNameW(long ptr long)
@ stdcall GetBinaryType(str ptr) GetBinaryTypeA
@@ -624,12 +629,16 @@
# @ stub GetCurrencyFormatEx
@ stdcall GetCurrencyFormatW(long long str ptr str long)
@ stdcall GetCurrentActCtx(ptr)
+@ stub GetCurrentApplicationUserModelId
@ stdcall GetCurrentConsoleFont(long long ptr)
# @ stub GetCurrentConsoleFontEx
@ stdcall GetCurrentDirectoryA(long ptr)
@ stdcall GetCurrentDirectoryW(long ptr)
+@ stdcall GetCurrentPackageFamilyName(ptr ptr)
@ stdcall GetCurrentPackageId(ptr ptr)
@ stdcall GetCurrentPackageFullName(ptr ptr)
+@ stub GetCurrentPackageInfo
+@ stub GetCurrentPackagePath
@ stdcall -norelay GetCurrentProcess()
@ stdcall -norelay GetCurrentProcessId()
@ stdcall GetCurrentProcessorNumber() ntdll.NtGetCurrentProcessorNumber
@@ -760,6 +769,16 @@
@ stdcall GetOEMCP()
@ stdcall GetOverlappedResult(long ptr ptr long)
@ stdcall GetUserPreferredUILanguages(long ptr ptr ptr)
+@ stub GetPackageApplicationIds
+@ stub GetPackageFamilyName
+@ stub GetPackageFamilyNameFromToken
+@ stub GetPackageFullName
+@ stub GetPackageFullNameFromToken
+@ stub GetPackageId
+@ stub GetPackageInfo
+@ stub GetPackagePath
+@ stub GetPackagePathByFullName
+@ stub GetPackagesByPackageFamily
@ stdcall GetPhysicallyInstalledSystemMemory(ptr)
@ stdcall GetPriorityClass(long)
@ stdcall GetPrivateProfileIntA(str str long str)
@@ -806,6 +825,8 @@
@ stub -i386 GetSLCallbackTemplate
@ stdcall GetShortPathNameA(str ptr long)
@ stdcall GetShortPathNameW(wstr ptr long)
+@ stub GetStagedPackageOrigin
+@ stub GetStagedPackagePathByFullName
@ stdcall GetStartupInfoA(ptr)
@ stdcall GetStartupInfoW(ptr)
@ stdcall GetStdHandle(long)
@@ -1119,6 +1140,8 @@
@ stdcall OpenJobObjectW(long long wstr)
@ stdcall OpenMutexA(long long str)
@ stdcall OpenMutexW(long long wstr)
+@ stub OpenPackageInfoByFullName
+@ stub OpenPackageInfoByFullNameForUser
# @ stub OpenPrivateNamespaceA
# @ stub OpenPrivateNamespaceW
@ stdcall OpenProcess(long long long)
@@ -1133,6 +1156,12 @@
@ stdcall OpenWaitableTimerW(long long wstr)
@ stdcall OutputDebugStringA(str)
@ stdcall OutputDebugStringW(wstr)
+@ stub PackageFamilyNameFromFullName
+@ stub PackageFamilyNameFromId
+@ stub PackageFullNameFromId
+@ stub PackageIdFromFullName
+@ stub PackageNameAndPublisherIdFromFamilyName
+@ stub ParseApplicationUserModelId
@ stdcall PeekConsoleInputA(ptr ptr long ptr)
@ stdcall PeekConsoleInputW(ptr ptr long ptr)
@ stdcall PeekNamedPipe(long ptr long ptr ptr ptr)
@@ -1549,7 +1578,12 @@
@ stdcall VerLanguageNameA(long str long)
@ stdcall VerLanguageNameW(long wstr long)
@ stdcall -ret64 VerSetConditionMask(long long long long) ntdll.VerSetConditionMask
+@ stub VerifyApplicationUserModelId
@ stdcall VerifyConsoleIoHandle(long)
+@ stub VerifyPackageFamilyName
+@ stub VerifyPackageFullName
+@ stub VerifyPackageId
+@ stub VerifyPackageRelativeApplicationId
# @ stub VerifyScripts
@ stdcall VerifyVersionInfoA(long long int64)
@ stdcall VerifyVersionInfoW(long long int64)
diff --git a/dlls/kernel32/version.c b/dlls/kernel32/version.c
index cf783af6195..aabc9bc2c64 100644
--- a/dlls/kernel32/version.c
+++ b/dlls/kernel32/version.c
@@ -216,3 +216,12 @@ LONG WINAPI GetCurrentPackageFullName(UINT32 *length, PWSTR name)
FIXME("(%p %p): stub\n", length, name);
return APPMODEL_ERROR_NO_PACKAGE;
}
+
+/***********************************************************************
+ * GetCurrentPackageFamilyName (KERNEL32.@)
+ */
+LONG WINAPI GetCurrentPackageFamilyName(UINT32 *length, PWSTR name)
+{
+ FIXME("(%p %p): stub\n", length, name);
+ return APPMODEL_ERROR_NO_PACKAGE;
+}
--
2.11.0

View File

@ -1 +0,0 @@
Fixes: Add stub for kernel32.GetCurrentPackageFamilyName

View File

@ -1,17 +1,17 @@
From 21c71f172c52f18692e2601e40ae5e8d050de4a8 Mon Sep 17 00:00:00 2001
From 594e57c855592fe07e73003926c09520bc357416 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 2 Feb 2017 20:49:15 +0100
Subject: kernel32: Add stub for GetPackageFullName.
---
.../api-ms-win-appmodel-runtime-l1-1-1.spec | 2 +-
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/kernel32.spec | 1 +
dlls/kernel32/version.c | 9 +++++++++
dlls/kernelbase/kernelbase.spec | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
index af7774d3679..066a674f8f5 100644
index 50f8594785f..4d2edd60f5a 100644
--- a/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
+++ b/dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec
@@ -10,7 +10,7 @@
@ -24,23 +24,22 @@ index af7774d3679..066a674f8f5 100644
@ stub GetPackageInfo
@ stub GetPackagePath
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 31811281e61..efb2bdddf32 100644
index 2668386bf84..f2fcf109715 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -772,7 +772,7 @@
@ stub GetPackageApplicationIds
@ stub GetPackageFamilyName
@ stub GetPackageFamilyNameFromToken
-@ stub GetPackageFullName
@@ -761,6 +761,7 @@
@ stdcall GetOEMCP()
@ stdcall GetOverlappedResult(long ptr ptr long)
@ stdcall GetUserPreferredUILanguages(long ptr ptr ptr)
+@ stdcall GetPackageFullName(long ptr ptr)
@ stub GetPackageFullNameFromToken
@ stub GetPackageId
@ stub GetPackageInfo
@ stdcall GetPhysicallyInstalledSystemMemory(ptr)
@ stdcall GetPriorityClass(long)
@ stdcall GetPrivateProfileIntA(str str long str)
diff --git a/dlls/kernel32/version.c b/dlls/kernel32/version.c
index 53f594eccab..72d1152d20f 100644
index 5a233efe56f..3cca2ae68ee 100644
--- a/dlls/kernel32/version.c
+++ b/dlls/kernel32/version.c
@@ -216,3 +216,12 @@ LONG WINAPI GetCurrentPackageFamilyName(UINT32 *length, PWSTR name)
@@ -228,3 +228,12 @@ LONG WINAPI GetCurrentPackageFullName(UINT32 *length, PWSTR name)
FIXME("(%p %p): stub\n", length, name);
return APPMODEL_ERROR_NO_PACKAGE;
}
@ -54,7 +53,7 @@ index 53f594eccab..72d1152d20f 100644
+ return APPMODEL_ERROR_NO_PACKAGE;
+}
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index a4951f1baa3..bdfc067cf6d 100644
index 12f36c5ede3..daba198bec5 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -569,7 +569,7 @@

View File

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

View File

@ -1,4 +1,4 @@
From ea7ab1f3cb71ed5b80a0c67215b3470465f82f39 Mon Sep 17 00:00:00 2001
From caf89ae3ed2f1ff8e2fb16cc1c80f101a2897722 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 4 Feb 2017 16:20:37 +0100
Subject: kernel32: Implement some processor group functions.
@ -88,10 +88,10 @@ index 756d8f94ab2..5fb806746a0 100644
+ return system_info.NumberOfProcessors;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index efb2bdddf32..8348621136f 100644
index 2668386bf84..e6081aeb04a 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -543,8 +543,8 @@
@@ -540,8 +540,8 @@
@ stdcall GenerateConsoleCtrlEvent(long long)
@ stdcall -i386 -private Get16DLLAddress(long str) krnl386.exe16.Get16DLLAddress
@ stdcall GetACP()
@ -101,8 +101,8 @@ index efb2bdddf32..8348621136f 100644
+@ stdcall GetActiveProcessorGroupCount()
# @ stub GetApplicationRecoveryCallback
# @ stub GetApplicationRestartSettings
@ stub GetApplicationUserModelId
@@ -724,8 +724,8 @@
@ stdcall GetAtomNameA(long ptr long)
@@ -716,8 +716,8 @@
# @ stub GetLongPathNameTransactedW
@ stdcall GetLongPathNameW (wstr long long)
@ stdcall GetMailslotInfo(long ptr ptr ptr ptr)
@ -114,7 +114,7 @@ index efb2bdddf32..8348621136f 100644
@ stdcall GetModuleFileNameW(long ptr long)
@ stdcall GetModuleHandleA(str)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index f66ab45b90e..b4370ca8922 100644
index 68d6b648252..5e5346af749 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -91,6 +91,7 @@ static SIZE_T (WINAPI *pGetLargePageMinimum)(void);
@ -169,10 +169,10 @@ index f66ab45b90e..b4370ca8922 100644
test_ProcThreadAttributeList();
diff --git a/include/winnt.h b/include/winnt.h
index 9e611c555a4..5cdd8a3a22f 100644
index 5bd1b1b4a83..2fc4a190e48 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -5873,6 +5873,8 @@ typedef struct _GROUP_AFFINITY
@@ -5855,6 +5855,8 @@ typedef struct _GROUP_AFFINITY
WORD Reserved[3];
} GROUP_AFFINITY, *PGROUP_AFFINITY;

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "9eecacbeb1561218d4870c83f89a233cabbf7e0c"
echo "1ddf2b4db8c42da36bdccd43dc336eee6ba03cce"
}
# Show version information
@ -97,7 +97,6 @@ patch_enable_all ()
enable_avifile_dll16_AVIStreamGetFrame="$1"
enable_bcrypt_Improvements="$1"
enable_browseui_Progress_Dialog="$1"
enable_cabinet_iFolder="$1"
enable_combase_RoApi="$1"
enable_comctl32_Button_Theming="$1"
enable_comctl32_Listview_DrawItem="$1"
@ -178,7 +177,6 @@ patch_enable_all ()
enable_kernel32_Cwd_Startup_Info="$1"
enable_kernel32_Debugger="$1"
enable_kernel32_FindFirstFile="$1"
enable_kernel32_GetCurrentPackageFamilyName="$1"
enable_kernel32_GetPackageFullName="$1"
enable_kernel32_GetShortPathName="$1"
enable_kernel32_K32GetPerformanceInfo="$1"
@ -295,7 +293,6 @@ patch_enable_all ()
enable_qcap_O_CLOEXEC="$1"
enable_quartz_MediaSeeking_Positions="$1"
enable_quartz_Silence_FIXMEs="$1"
enable_rasapi32_RasEnumDevicesA="$1"
enable_riched20_Class_Tests="$1"
enable_riched20_IText_Interface="$1"
enable_secur32_Zero_Buffer_Length="$1"
@ -511,9 +508,6 @@ patch_enable ()
browseui-Progress_Dialog)
enable_browseui_Progress_Dialog="$2"
;;
cabinet-iFolder)
enable_cabinet_iFolder="$2"
;;
combase-RoApi)
enable_combase_RoApi="$2"
;;
@ -754,9 +748,6 @@ patch_enable ()
kernel32-FindFirstFile)
enable_kernel32_FindFirstFile="$2"
;;
kernel32-GetCurrentPackageFamilyName)
enable_kernel32_GetCurrentPackageFamilyName="$2"
;;
kernel32-GetPackageFullName)
enable_kernel32_GetPackageFullName="$2"
;;
@ -1105,9 +1096,6 @@ patch_enable ()
quartz-Silence_FIXMEs)
enable_quartz_Silence_FIXMEs="$2"
;;
rasapi32-RasEnumDevicesA)
enable_rasapi32_RasEnumDevicesA="$2"
;;
riched20-Class_Tests)
enable_riched20_Class_Tests="$2"
;;
@ -2335,11 +2323,7 @@ if test "$enable_kernel32_GetPackageFullName" -eq 1; then
if test "$enable_api_ms_win_Stub_DLLs" -gt 1; then
abort "Patchset api-ms-win-Stub_DLLs disabled, but kernel32-GetPackageFullName depends on that."
fi
if test "$enable_kernel32_GetCurrentPackageFamilyName" -gt 1; then
abort "Patchset kernel32-GetCurrentPackageFamilyName disabled, but kernel32-GetPackageFullName depends on that."
fi
enable_api_ms_win_Stub_DLLs=1
enable_kernel32_GetCurrentPackageFamilyName=1
fi
if test "$enable_kernel32_CopyFileEx" -eq 1; then
@ -2428,14 +2412,10 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
if test "$enable_combase_RoApi" -gt 1; then
abort "Patchset combase-RoApi disabled, but api-ms-win-Stub_DLLs depends on that."
fi
if test "$enable_kernel32_GetCurrentPackageFamilyName" -gt 1; then
abort "Patchset kernel32-GetCurrentPackageFamilyName disabled, but api-ms-win-Stub_DLLs depends on that."
fi
if test "$enable_kernel32_UmsStubs" -gt 1; then
abort "Patchset kernel32-UmsStubs disabled, but api-ms-win-Stub_DLLs depends on that."
fi
enable_combase_RoApi=1
enable_kernel32_GetCurrentPackageFamilyName=1
enable_kernel32_UmsStubs=1
fi
@ -2721,19 +2701,6 @@ if test "$enable_combase_RoApi" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-GetCurrentPackageFamilyName
# |
# | Modified files:
# | * dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec, dlls/kernel32/kernel32.spec,
# | dlls/kernel32/version.c
# |
if test "$enable_kernel32_GetCurrentPackageFamilyName" -eq 1; then
patch_apply kernel32-GetCurrentPackageFamilyName/0001-kernel32-Add-stub-for-GetCurrentPackageFamilyName-an.patch
(
printf '%s\n' '+ { "Michael Müller", "kernel32: Add stub for GetCurrentPackageFamilyName and add related functions to spec file.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-UmsStubs
# |
# | Modified files:
@ -2752,7 +2719,7 @@ fi
# Patchset api-ms-win-Stub_DLLs
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * combase-RoApi, kernel32-GetCurrentPackageFamilyName, kernel32-UmsStubs
# | * combase-RoApi, kernel32-UmsStubs
# |
# | This patchset fixes the following Wine bugs:
# | * [#40451] Add feclient dll
@ -2956,21 +2923,6 @@ if test "$enable_browseui_Progress_Dialog" -eq 1; then
) >> "$patchlist"
fi
# Patchset cabinet-iFolder
# |
# | This patchset fixes the following Wine bugs:
# | * [#10858] Set index of folder in FDICopy callback
# |
# | Modified files:
# | * dlls/cabinet/fdi.c
# |
if test "$enable_cabinet_iFolder" -eq 1; then
patch_apply cabinet-iFolder/0001-cabinet-Set-index-of-folder-in-FDICopy-callback.patch
(
printf '%s\n' '+ { "Michael Müller", "cabinet: Set index of folder in FDICopy callback.", 1 },';
) >> "$patchlist"
fi
# Patchset comctl32-Button_Theming
# |
# | This patchset fixes the following Wine bugs:
@ -4476,7 +4428,7 @@ fi
# Patchset kernel32-GetPackageFullName
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * combase-RoApi, kernel32-GetCurrentPackageFamilyName, kernel32-UmsStubs, api-ms-win-Stub_DLLs
# | * combase-RoApi, kernel32-UmsStubs, api-ms-win-Stub_DLLs
# |
# | Modified files:
# | * dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-appmodel-runtime-l1-1-1.spec, dlls/kernel32/kernel32.spec,
@ -4719,7 +4671,7 @@ fi
# Patchset kernel32-Processor_Group
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * combase-RoApi, kernel32-GetCurrentPackageFamilyName, kernel32-UmsStubs, api-ms-win-Stub_DLLs
# | * combase-RoApi, kernel32-UmsStubs, api-ms-win-Stub_DLLs
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/api-ms-win-core-
@ -6461,21 +6413,6 @@ if test "$enable_quartz_Silence_FIXMEs" -eq 1; then
) >> "$patchlist"
fi
# Patchset rasapi32-RasEnumDevicesA
# |
# | This patchset fixes the following Wine bugs:
# | * [#30378] Initialize *lpcDevices in RasEnumDevicesA
# |
# | Modified files:
# | * dlls/rasapi32/rasapi.c, dlls/rasapi32/tests/rasapi.c
# |
if test "$enable_rasapi32_RasEnumDevicesA" -eq 1; then
patch_apply rasapi32-RasEnumDevicesA/0001-rasapi32-Set-lpcDevices-in-RasEnumDevicesA.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "rasapi32: Set *lpcDevices in RasEnumDevicesA.", 1 },';
) >> "$patchlist"
fi
# Patchset riched20-Class_Tests
# |
# | Modified files:
@ -8537,7 +8474,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
printf '%s\n' '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send buffer copy requests through CS.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Avoid destroying views in color and depth fills.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Add a separate variable to check if queries are started.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wait for the cs to finish before destroying the device.", 1 },';

View File

@ -1,123 +0,0 @@
From 8377389407d8ab624c79cbb072e7c6e5c1b4a8d5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 28 Jun 2015 03:58:23 +0200
Subject: rasapi32: Set *lpcDevices in RasEnumDevicesA.
Based on a patch by Qian Hong.
---
dlls/rasapi32/rasapi.c | 2 ++
dlls/rasapi32/tests/rasapi.c | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/dlls/rasapi32/rasapi.c b/dlls/rasapi32/rasapi.c
index 235ab65..c2a4b55 100644
--- a/dlls/rasapi32/rasapi.c
+++ b/dlls/rasapi32/rasapi.c
@@ -254,6 +254,8 @@ DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD l
if(lpRasDevinfo && lpRasDevinfo->dwSize != sizeof(RASDEVINFOA))
return ERROR_INVALID_SIZE;
+ *lpcDevices = 1;
+
if (!lpRasDevinfo || (*lpcb < sizeof(RASDEVINFOA))) {
*lpcb = sizeof(RASDEVINFOA);
return ERROR_BUFFER_TOO_SMALL;
diff --git a/dlls/rasapi32/tests/rasapi.c b/dlls/rasapi32/tests/rasapi.c
index e0ff25f..5171bb2 100644
--- a/dlls/rasapi32/tests/rasapi.c
+++ b/dlls/rasapi32/tests/rasapi.c
@@ -77,54 +77,71 @@ static void test_rasenum(void)
/* test first parameter */
cb = bufsize;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(NULL, &cb, &cDevices);
+ ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
ok(result == ERROR_BUFFER_TOO_SMALL ||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
"Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
rasDevInfo[0].dwSize = 0;
cb = bufsize;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_SIZE ||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) -1;
cb = bufsize;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_SIZE ||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) +1;
cb = bufsize;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_SIZE ||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
/* test second parameter */
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, NULL, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
cb = 0;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ todo_wine
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_BUFFER_TOO_SMALL ||
result == ERROR_INVALID_SIZE, /* vista, 2k8 */
"Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
cb = bufsize -1;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
ok(result == ERROR_BUFFER_TOO_SMALL,
"Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
cb = bufsize +1;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
ok(result == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08d\n", result);
@@ -136,7 +153,9 @@ static void test_rasenum(void)
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
/* test combinations of invalid parameters */
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(NULL, NULL, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
@@ -147,7 +166,9 @@ static void test_rasenum(void)
cb = 0;
rasDevInfo[0].dwSize = 0;
+ cDevices = 0xdeadbeef;
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
+ ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
ok(result == ERROR_INVALID_SIZE ||
broken(result == ERROR_BUFFER_TOO_SMALL), /* win98 */
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
--
2.4.3

View File

@ -1 +0,0 @@
Fixes: [30378] Initialize *lpcDevices in RasEnumDevicesA

View File

@ -1,4 +1,4 @@
From 6a1701127f6f8f1c885cb787249496179a69b06b Mon Sep 17 00:00:00 2001
From 16e895f9770039a4d9129d577698c8dcec90334e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 23 Aug 2016 22:54:14 +0200
Subject: wined3d: Create dummy 1d textures.
@ -10,10 +10,10 @@ Subject: wined3d: Create dummy 1d textures.
3 files changed, 40 insertions(+)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index cd0057e1591..a4820d337c0 100644
index a423fac2079..65853209864 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1531,6 +1531,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
@@ -1514,6 +1514,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
checkGLcall("glActiveTexture");
@ -21,8 +21,8 @@ index cd0057e1591..a4820d337c0 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
@@ -1543,7 +1544,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_textures.tex_cube);
@@ -1529,7 +1530,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, device->dummy_textures.tex_cube_array);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ {
@ -32,7 +32,7 @@ index cd0057e1591..a4820d337c0 100644
if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT])
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, device->dummy_textures.tex_buffer);
@@ -2426,6 +2430,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
@@ -2411,6 +2415,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
case GL_NONE:
/* nothing to do */
break;
@ -48,10 +48,10 @@ index cd0057e1591..a4820d337c0 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
checkGLcall("glBindTexture");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7898527f6c0..b5a42905d33 100644
index eef9818affd..5b598e2f3a4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -624,6 +624,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@@ -628,6 +628,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
* to each texture stage when the currently set D3D texture is NULL. */
context_active_texture(context, gl_info, 0);
@ -69,7 +69,7 @@ index 7898527f6c0..b5a42905d33 100644
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d);
checkGLcall("glGenTextures");
TRACE("Dummy 2D texture given name %u.\n", device->dummy_textures.tex_2d);
@@ -682,6 +693,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@@ -704,6 +715,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
if (gl_info->supported[EXT_TEXTURE_ARRAY])
{
@ -87,7 +87,7 @@ index 7898527f6c0..b5a42905d33 100644
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_array);
checkGLcall("glGenTextures");
TRACE("Dummy 2D array texture given name %u.\n", device->dummy_textures.tex_2d_array);
@@ -729,7 +751,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
@@ -751,7 +773,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_buffer);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
@ -96,9 +96,9 @@ index 7898527f6c0..b5a42905d33 100644
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d_array);
+ }
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube);
@@ -741,6 +766,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY])
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube_array);
@@ -766,6 +791,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_rect);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d);
@ -107,10 +107,10 @@ index 7898527f6c0..b5a42905d33 100644
checkGLcall("Delete dummy textures");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 051836c7414..a71ea9e73ef 100644
index cdc240058a2..34d8f18d698 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2582,10 +2582,12 @@ struct wined3d_device
@@ -2666,11 +2666,13 @@ struct wined3d_device
/* Textures for when no other textures are mapped */
struct
{
@ -119,6 +119,7 @@ index 051836c7414..a71ea9e73ef 100644
GLuint tex_rect;
GLuint tex_3d;
GLuint tex_cube;
GLuint tex_cube_array;
+ GLuint tex_1d_array;
GLuint tex_2d_array;
GLuint tex_buffer;

View File

@ -1,4 +1,4 @@
From ec1172f3bd0ba8c66347ed17edf086c850665f24 Mon Sep 17 00:00:00 2001
From 9e6e4d61e56980850bbbc340d510e9a57f9d5627 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Feb 2017 05:50:11 +0100
Subject: wined3d: Send push_constants through the CS.
@ -10,18 +10,18 @@ Subject: wined3d: Send push_constants through the CS.
3 files changed, 77 insertions(+), 58 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 543528ae570..72c0ace384c 100644
index 8c0abf449f2..0d74ea806a9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,6 +66,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_MAP,
@@ -67,6 +67,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UNMAP,
WINED3D_CS_OP_BLT_SUB_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
+ WINED3D_CS_OP_PUSH_CONSTANTS,
};
struct wined3d_cs_sync
@@ -366,6 +367,15 @@ struct wined3d_cs_update_sub_resource
@@ -381,6 +382,15 @@ struct wined3d_cs_update_sub_resource
struct wined3d_sub_resource_data data;
};
@ -37,7 +37,7 @@ index 543528ae570..72c0ace384c 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1773,6 +1783,64 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -1856,6 +1866,64 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
cs->ops->submit_and_wait(cs);
}
@ -102,15 +102,15 @@ index 543528ae570..72c0ace384c 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -1815,6 +1883,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_MAP */ wined3d_cs_exec_map,
@@ -1899,6 +1967,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
+ /* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1861,55 +1930,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
@@ -1945,55 +2014,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
HeapFree(GetProcessHeap(), 0, data);
}
@ -167,10 +167,10 @@ index 543528ae570..72c0ace384c 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ea27553e8c8..a06cae6412e 100644
index e328f32403f..c3a10a2d13a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2337,7 +2337,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2376,7 +2376,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
@ -179,7 +179,7 @@ index ea27553e8c8..a06cae6412e 100644
}
return WINED3D_OK;
@@ -2386,7 +2386,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2425,7 +2425,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -188,7 +188,7 @@ index ea27553e8c8..a06cae6412e 100644
}
return WINED3D_OK;
@@ -2431,7 +2431,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2470,7 +2470,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@ -197,7 +197,7 @@ index ea27553e8c8..a06cae6412e 100644
return WINED3D_OK;
}
@@ -2570,7 +2570,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2591,7 +2591,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
@ -206,7 +206,7 @@ index ea27553e8c8..a06cae6412e 100644
}
return WINED3D_OK;
@@ -2619,7 +2619,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2640,7 +2640,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -215,7 +215,7 @@ index ea27553e8c8..a06cae6412e 100644
}
return WINED3D_OK;
@@ -2665,7 +2665,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
@@ -2686,7 +2686,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@ -225,10 +225,10 @@ index ea27553e8c8..a06cae6412e 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d2e0052067f..2a8f075667a 100644
index 2922caaa412..9c68628ed6c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3199,8 +3199,6 @@ struct wined3d_cs_ops
@@ -3200,8 +3200,6 @@ struct wined3d_cs_ops
void *(*require_space)(struct wined3d_cs *cs, size_t size);
void (*submit)(struct wined3d_cs *cs);
void (*submit_and_wait)(struct wined3d_cs *cs);
@ -237,7 +237,7 @@ index d2e0052067f..2a8f075667a 100644
};
struct wined3d_cs
@@ -3229,6 +3227,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
@@ -3234,6 +3232,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
@ -246,7 +246,7 @@ index d2e0052067f..2a8f075667a 100644
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
@@ -3289,12 +3289,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -3294,12 +3294,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 5ee5e16ac78dcad58eaa40fe41ee7c771b8721cf Mon Sep 17 00:00:00 2001
From 706645d08ae7ebd9175f91532077694b988aef7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@ -6,335 +6,45 @@ Subject: wined3d: Send blits through the command stream.
This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.
---
dlls/wined3d/cs.c | 52 +++++++++++++++
dlls/wined3d/surface.c | 140 ++++++++++++++++++++++++-----------------
dlls/wined3d/texture.c | 9 ++-
dlls/wined3d/wined3d_private.h | 7 +++
4 files changed, 148 insertions(+), 60 deletions(-)
dlls/wined3d/device.c | 18 +++++++++---------
dlls/wined3d/texture.c | 9 +++++++--
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1366973c1e6..f2eb87e35b8 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -67,6 +67,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UNMAP,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
+ WINED3D_CS_OP_BLT,
};
struct wined3d_cs_sync
@@ -376,6 +377,18 @@ struct wined3d_cs_push_constants
BYTE constants[1];
};
+struct wined3d_cs_blt
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_surface *dst_surface;
+ RECT dst_rect;
+ struct wined3d_surface *src_surface;
+ RECT src_rect;
+ DWORD flags;
+ struct wined3d_blt_fx fx;
+ enum wined3d_texture_filter_type filter;
+};
+
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1857,6 +1870,44 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
+static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_blt *op = data;
+
+ surface_blt_ugly(op->dst_surface, &op->dst_rect,
+ op->src_surface, &op->src_rect,
+ op->flags, &op->fx, op->filter);
+
+ wined3d_resource_release(&op->dst_surface->container->resource);
+ if (op->src_surface && op->src_surface != op->dst_surface)
+ wined3d_resource_release(&op->src_surface->container->resource);
+}
+
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
+ enum wined3d_texture_filter_type filter)
+{
+ struct wined3d_cs_blt *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_BLT;
+ op->dst_surface = dst_surface;
+ op->dst_rect = *dst_rect;
+ op->src_surface = src_surface;
+ op->src_rect = *src_rect;
+ op->flags = flags;
+ op->filter = filter;
+ if (fx)
+ op->fx = *fx;
+
+ wined3d_resource_acquire(&dst_surface->container->resource);
+ if (src_surface && src_surface != dst_surface)
+ wined3d_resource_acquire(&src_surface->container->resource);
+
+ cs->ops->submit(cs);
+}
+
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -1900,6 +1951,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
+ /* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index cd82d46a001..637d300b2f5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3738,7 +3738,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
-HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
{
@@ -3748,8 +3748,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
struct wined3d_texture *dst_texture = dst_surface->container;
struct wined3d_device *device = dst_texture->resource.device;
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
- struct wined3d_texture *src_texture = NULL;
- unsigned int src_sub_resource_idx = 0;
+ struct wined3d_texture *src_texture;
+ unsigned int src_sub_resource_idx;
DWORD src_ds_flags, dst_ds_flags;
BOOL scale, convert;
@@ -3762,52 +3762,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
| WINED3D_BLT_DO_NOT_WAIT
| WINED3D_BLT_ALPHA_TEST;
- TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
- dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
- flags, fx, debug_d3dtexturefiltertype(filter));
- TRACE("Usage is %s.\n", debug_d3dusage(dst_texture->resource.usage));
-
- if (fx)
- {
- TRACE("fx %#x.\n", fx->fx);
- TRACE("fill_color 0x%08x.\n", fx->fill_color);
- TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
- fx->dst_color_key.color_space_low_value,
- fx->dst_color_key.color_space_high_value);
- TRACE("src_color_key {0x%08x, 0x%08x}.\n",
- fx->src_color_key.color_space_low_value,
- fx->src_color_key.color_space_high_value);
- }
-
if (src_surface)
{
src_texture = src_surface->container;
src_sub_resource_idx = surface_get_sub_resource_idx(src_surface);
+ src_swapchain = src_texture->swapchain;
}
-
- if (!fx || !(fx->fx))
- flags &= ~WINED3D_BLT_FX;
-
- if (flags & WINED3D_BLT_WAIT)
- flags &= ~WINED3D_BLT_WAIT;
-
- if (flags & WINED3D_BLT_ASYNC)
- {
- static unsigned int once;
-
- if (!once++)
- FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
- flags &= ~WINED3D_BLT_ASYNC;
- }
-
- /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
- if (flags & WINED3D_BLT_DO_NOT_WAIT)
+ else
{
- static unsigned int once;
-
- if (!once++)
- FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
- flags &= ~WINED3D_BLT_DO_NOT_WAIT;
+ src_texture = NULL;
+ src_sub_resource_idx = 0;
+ src_swapchain = NULL;
}
if (!device->d3d_initialized)
@@ -3832,11 +3797,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
}
- if (src_texture)
- src_swapchain = src_texture->swapchain;
- else
- src_swapchain = NULL;
-
dst_swapchain = dst_texture->swapchain;
/* This isn't strictly needed. FBO blits for example could deal with
@@ -3872,15 +3832,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
TRACE("Depth fill.\n");
if (!wined3d_format_convert_color_to_float(dst_texture->resource.format, NULL, fx->fill_color, &color))
- return WINED3DERR_INVALIDCALL;
+ return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, color.r)))
- return WINED3D_OK;
+ return;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index c3a10a2d13a..31453ed0ff8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4154,16 +4154,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return WINED3DERR_INVALIDCALL;
}
else if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_texture->resource.draw_binding,
src_rect, dst_surface, dst_texture->resource.draw_binding, dst_rect)))
- if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
{
- return WINED3D_OK;
+ return;
- WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
- return WINED3DERR_INVALIDCALL;
- }
-
- if (src_texture->sub_resources[src_sub_resource_idx].map_count)
- {
- WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
- return WINED3DERR_INVALIDCALL;
+ wined3d_cs_emit_sync(dst_texture->resource.device->cs);
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
+ {
+ WARN("Destination or source sub-resource is mapped.\n");
+ return WINEDDERR_SURFACEBUSY;
+ }
}
}
else
@@ -3916,7 +3876,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
- return WINED3D_OK;
+ return;
}
else
{
@@ -3960,7 +3920,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
context, dst_texture->resource.draw_binding);
context_release(context);
}
- return WINED3D_OK;
+ return;
}
}
}
@@ -3984,7 +3944,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0);
dst_swapchain->desc.swap_effect = swap_effect;
- return WINED3D_OK;
+ return;
}
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
@@ -4005,7 +3965,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx,
~dst_texture->resource.draw_binding);
- return WINED3D_OK;
+ return;
}
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
@@ -4015,7 +3975,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
{
blitter->blit_surface(device, blit_op, filter, src_surface,
src_rect, dst_surface, dst_rect, color_key);
- return WINED3D_OK;
+ return;
}
}
}
@@ -4023,9 +3983,73 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
fallback:
/* Special cases for render targets. */
if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter)))
- return WINED3D_OK;
+ return;
cpu:
- return surface_cpu_blt(dst_texture, dst_sub_resource_idx, &dst_box,
+ surface_cpu_blt(dst_texture, dst_sub_resource_idx, &dst_box,
src_texture, src_sub_resource_idx, &src_box, flags, fx, filter);
}
+
+HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
+ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
+{
+ struct wined3d_texture *dst_texture = dst_surface->container;
+ struct wined3d_device *device = dst_texture->resource.device;
+
+ TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
+ dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
+ flags, fx, debug_d3dtexturefiltertype(filter));
+ TRACE("Usage is %s.\n", debug_d3dusage(dst_texture->resource.usage));
+
+ if (fx)
+ {
+ TRACE("fx %#x.\n", fx->fx);
+ TRACE("fill_color 0x%08x.\n", fx->fill_color);
+ TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
+ fx->dst_color_key.color_space_low_value,
+ fx->dst_color_key.color_space_high_value);
+ TRACE("src_color_key {0x%08x, 0x%08x}.\n",
+ fx->src_color_key.color_space_low_value,
+ fx->src_color_key.color_space_high_value);
+ }
+
+ /* FIXME: We should select the blitter in the main thread, that way we can return an error if the blit
+ * is unsupported without duplicating all the checks... */
+ if (flags & WINED3D_BLT_COLOR_FILL && (dst_surface->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS))
+ {
+ WARN("Block color fill, returning WINED3DERR_INVALIDCALL\n");
+ return WINED3DERR_INVALIDCALL;
+ }
+
+ if (!fx || !(fx->fx))
+ flags &= ~WINED3D_BLT_FX;
+
+ if (flags & WINED3D_BLT_WAIT)
+ flags &= ~WINED3D_BLT_WAIT;
+
+ if (flags & WINED3D_BLT_ASYNC)
+ {
+ static unsigned int once;
+
+ if (!once++)
+ FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
+ flags &= ~WINED3D_BLT_ASYNC;
+ }
+
+ /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
+ if (flags & WINED3D_BLT_DO_NOT_WAIT)
+ {
+ static unsigned int once;
+
+ if (!once++)
+ FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
+ flags &= ~WINED3D_BLT_DO_NOT_WAIT;
+ }
+
+ TRACE("Emitting blit %p <== %p\n", dst_surface, src_surface);
+ wined3d_cs_emit_blt(device->cs, dst_surface, dst_rect, src_surface, src_rect,
+ flags, fx, filter);
+
+ return WINED3D_OK;
+}
if (!src_box)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index a65367398f0..7cd69134a0c 100644
index 60e53f55463..9d0909852cd 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -3190,8 +3190,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
@@ -3189,8 +3189,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|| (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
{
@ -350,31 +60,6 @@ index a65367398f0..7cd69134a0c 100644
}
if ((dst_format_flags & WINED3DFMT_FLAG_BLOCKS) && (flags & WINED3D_BLT_COLOR_FILL))
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a3716e937a5..1c3ba4644f1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3067,6 +3067,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
+ struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -3218,6 +3221,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
+ enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
--
2.11.0

View File

@ -1,4 +1,4 @@
From da8e396548580773fb77f92c866163693dd576e5 Mon Sep 17 00:00:00 2001
From b880794502fe7d805e3f49b61c8a8b6664cbd187 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 21:10:16 +0200
Subject: wined3d: Send render target view clears through the command stream
@ -24,19 +24,19 @@ index 8e5be756654..88e0e44c4d3 100644
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f2eb87e35b8..c38bbbd2754 100644
index bf1b63b897b..b8c99985af4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,6 +68,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_BLT_SUB_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_BLT,
+ WINED3D_CS_OP_CLEAR_RTV,
};
struct wined3d_cs_sync
@@ -389,6 +390,18 @@ struct wined3d_cs_blt
enum wined3d_texture_filter_type filter;
@@ -391,6 +392,18 @@ struct wined3d_cs_push_constants
BYTE constants[1];
};
+struct wined3d_cs_clear_rtv
@ -54,7 +54,7 @@ index f2eb87e35b8..c38bbbd2754 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1908,6 +1921,41 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -1940,6 +1953,41 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
@ -96,19 +96,19 @@ index f2eb87e35b8..c38bbbd2754 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -1952,6 +2000,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1984,6 +2032,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
+ /* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a06cae6412e..0e491b3b8cd 100644
index c3a10a2d13a..728e5570777 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4246,10 +4246,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4320,10 +4320,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@ -122,11 +122,11 @@ index a06cae6412e..0e491b3b8cd 100644
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1c3ba4644f1..6fbfa5d9c9c 100644
index 8a07bb98523..f69cead4d1c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3227,6 +3227,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -3225,6 +3225,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,

View File

@ -1,4 +1,4 @@
From ae3267b2c9b77715d189c233472c870a0f55d41b Mon Sep 17 00:00:00 2001
From 8f9e2da3bc48abffee005b95c2b996352db2de16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -11,18 +11,18 @@ FIXME: This logic duplication is ugly.
3 files changed, 141 insertions(+), 75 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c38bbbd2754..47678602fed 100644
index b8c99985af4..bbea6bbb454 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -69,6 +69,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_CLEAR_RTV,
+ WINED3D_CS_OP_UPDATE_TEXTURE,
};
struct wined3d_cs_sync
@@ -402,6 +403,12 @@ struct wined3d_cs_clear_rtv
@@ -404,6 +405,12 @@ struct wined3d_cs_clear_rtv
const struct blit_shader *blitter;
};
@ -35,7 +35,7 @@ index c38bbbd2754..47678602fed 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1956,6 +1963,35 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -1988,6 +1995,35 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -71,19 +71,19 @@ index c38bbbd2754..47678602fed 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2001,6 +2037,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2033,6 +2069,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
+ /* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2fdfd944b7e..d244091782f 100644
index 364eac4411e..d0e1fe6e9d7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3627,34 +3627,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3659,34 +3659,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
start_idx, index_count, start_instance, instance_count, TRUE);
}
@ -122,7 +122,7 @@ index 2fdfd944b7e..d244091782f 100644
/* Only a prepare, since we're uploading entire volumes. */
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
@@ -3662,32 +3645,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3694,32 +3677,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
@ -222,7 +222,7 @@ index 2fdfd944b7e..d244091782f 100644
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
@@ -3724,63 +3764,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3756,63 +3796,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
return WINED3DERR_INVALIDCALL;
}
@ -316,10 +316,10 @@ index 2fdfd944b7e..d244091782f 100644
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6fbfa5d9c9c..5b68475945d 100644
index f69cead4d1c..fcefe12d226 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2702,6 +2702,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2703,6 +2703,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
@ -328,7 +328,7 @@ index 6fbfa5d9c9c..5b68475945d 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3294,6 +3296,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -3292,6 +3294,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int slice_pitch) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 41decdb7669a8e83c5c6a244b50822d93ad8d1db Mon Sep 17 00:00:00 2001
From cdbc30321bd78951ffc6e2deaca50b1414ff7abe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 16 Mar 2014 14:13:42 +0100
Subject: wined3d: Send getdc and releasedc through the command stream.
@ -11,11 +11,11 @@ Another hacky patch to avoid using GL outside the worker thread.
3 files changed, 119 insertions(+), 29 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 47678602fed..735991db6e2 100644
index bbea6bbb454..2a3a984088d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -70,6 +70,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_UPDATE_TEXTURE,
+ WINED3D_CS_OP_GET_DC,
@ -23,7 +23,7 @@ index 47678602fed..735991db6e2 100644
};
struct wined3d_cs_sync
@@ -409,6 +411,14 @@ struct wined3d_cs_update_texture
@@ -411,6 +413,14 @@ struct wined3d_cs_update_texture
struct wined3d_texture *src, *dst;
};
@ -38,7 +38,7 @@ index 47678602fed..735991db6e2 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1992,6 +2002,54 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2024,6 +2034,54 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs);
}
@ -93,8 +93,8 @@ index 47678602fed..735991db6e2 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2038,6 +2096,8 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
@@ -2070,6 +2128,8 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
+ /* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
@ -103,10 +103,10 @@ index 47678602fed..735991db6e2 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 378ce476ca0..5c9cadef95a 100644
index 60e53f55463..b692c504501 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -3473,13 +3473,41 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -3509,13 +3509,41 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
return WINED3D_OK;
}
@ -150,7 +150,7 @@ index 378ce476ca0..5c9cadef95a 100644
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
@@ -3504,28 +3532,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -3540,28 +3568,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -200,7 +200,7 @@ index 378ce476ca0..5c9cadef95a 100644
}
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
@@ -3556,14 +3588,5 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -3592,14 +3624,5 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3DERR_INVALIDCALL;
}
@ -217,10 +217,10 @@ index 378ce476ca0..5c9cadef95a 100644
+ return wined3d_cs_emit_release_dc(device->cs, texture, sub_resource_idx);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5b68475945d..0d85fadec75 100644
index fcefe12d226..6373ee3df67 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2947,6 +2947,7 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
@@ -2948,6 +2948,7 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
HRESULT wined3d_texture_check_box_dimensions(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
@ -228,7 +228,7 @@ index 5b68475945d..0d85fadec75 100644
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN;
@@ -2962,6 +2963,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -2963,6 +2964,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
@ -237,7 +237,7 @@ index 5b68475945d..0d85fadec75 100644
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -3237,6 +3240,8 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -3235,6 +3238,8 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
unsigned int start_idx, unsigned int index_count, unsigned int start_instance,
unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
@ -246,7 +246,7 @@ index 5b68475945d..0d85fadec75 100644
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
@@ -3244,6 +3249,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -3242,6 +3247,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
unsigned int start_idx, unsigned int count, const void *constants) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;

View File

@ -1,132 +0,0 @@
From 3bf5f63ec62c705afb14d485df3e2d0bd799d7dd Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 7 Feb 2017 14:37:07 +0100
Subject: wined3d: Send buffer copy requests through CS.
---
dlls/wined3d/cs.c | 44 ++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 8 ++++----
dlls/wined3d/wined3d_private.h | 3 +++
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index be7e041b86c..51ac0c2b000 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -75,6 +75,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
+ WINED3D_CS_OP_BUFFER_COPY,
};
struct wined3d_cs_sync
@@ -443,6 +444,16 @@ struct wined3d_cs_texture_add_dirty_region
unsigned int sub_resource_idx;
};
+struct wined3d_cs_buffer_copy
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_buffer *dst_buffer;
+ unsigned int dst_offset;
+ struct wined3d_buffer *src_buffer;
+ unsigned int src_offset;
+ unsigned int size;
+};
+
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2150,6 +2161,38 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
+static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_buffer_copy *op = data;
+ HRESULT hr;
+
+ if (FAILED(hr = wined3d_buffer_copy(op->dst_buffer, op->dst_offset, op->src_buffer, op->src_offset, op->size)))
+ ERR("Failed to copy buffer, hr %#x.\n", hr);
+
+ wined3d_resource_release(&op->dst_buffer->resource);
+ wined3d_resource_release(&op->src_buffer->resource);
+}
+
+void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
+ unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset,
+ unsigned int size)
+{
+ struct wined3d_cs_buffer_copy *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_BUFFER_COPY;
+ op->dst_buffer = dst_buffer;
+ op->dst_offset = dst_offset;
+ op->src_buffer = src_buffer;
+ op->src_offset = src_offset;
+ op->size = size;
+
+ wined3d_resource_acquire(&dst_buffer->resource);
+ wined3d_resource_acquire(&src_buffer->resource);
+
+ cs->ops->submit(cs);
+}
+
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2201,6 +2244,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
+ /* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 749ba9ca19c..a8ca7cbaf56 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3991,10 +3991,9 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
if (dst_resource->type == WINED3D_RTYPE_BUFFER)
{
- if (FAILED(hr = wined3d_buffer_copy(buffer_from_resource(dst_resource), 0,
+ wined3d_cs_emit_buffer_copy(device->cs, buffer_from_resource(dst_resource), 0,
buffer_from_resource(src_resource), 0,
- dst_resource->size)))
- ERR("Failed to copy buffer, hr %#x.\n", hr);
+ dst_resource->size);
return;
}
@@ -4116,8 +4115,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return WINED3DERR_INVALIDCALL;
}
- return wined3d_buffer_copy(buffer_from_resource(dst_resource), dst_x,
+ wined3d_cs_emit_buffer_copy(device->cs, buffer_from_resource(dst_resource), dst_x,
buffer_from_resource(src_resource), src_offset, size);
+ return WINED3D_OK;
}
if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d45c45c09dc..708091f573b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3239,6 +3239,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
+ unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset,
+ unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
--
2.11.0

View File

@ -1,21 +1,21 @@
From 47ebfc4321e0e43a4e182c7b53451e9d474678e2 Mon Sep 17 00:00:00 2001
From bfb7d6f0b22ec9b8512083cd8044051217cf7155 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
---
dlls/wined3d/context.c | 3 +
dlls/wined3d/cs.c | 436 ++++++++++++++++++++++++++++++++++++-----
dlls/wined3d/cs.c | 432 ++++++++++++++++++++++++++++++++++++-----
dlls/wined3d/device.c | 2 +-
dlls/wined3d/wined3d_main.c | 10 +
dlls/wined3d/wined3d_private.h | 33 +++-
5 files changed, 425 insertions(+), 59 deletions(-)
5 files changed, 422 insertions(+), 58 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 1e995707608..9358d601bfb 100644
index e1ca83395e7..03d007da870 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3721,6 +3721,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
@@ -3730,6 +3730,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
@ -26,7 +26,7 @@ index 1e995707608..9358d601bfb 100644
current_context = NULL;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 5b5073f18e5..27737527deb 100644
index 5789172697b..f94c20a8cb9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -18,6 +18,7 @@
@ -37,16 +37,16 @@ index 5b5073f18e5..27737527deb 100644
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@@ -76,6 +77,7 @@ enum wined3d_cs_op
@@ -75,6 +76,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
WINED3D_CS_OP_BUFFER_COPY,
+ WINED3D_CS_OP_STOP,
};
struct wined3d_cs_sync
@@ -454,8 +456,14 @@ struct wined3d_cs_buffer_copy
unsigned int size;
@@ -445,8 +447,14 @@ struct wined3d_cs_texture_add_dirty_region
unsigned int sub_resource_idx;
};
-static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
@ -61,7 +61,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -468,12 +476,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -459,12 +467,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
cs->ops->submit_and_wait(cs);
}
@ -77,7 +77,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -486,7 +496,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -477,7 +487,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
cs->ops->submit_and_wait(cs);
}
@ -86,7 +86,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_present *op = data;
struct wined3d_swapchain *swapchain;
@@ -504,6 +514,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -495,6 +505,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
{
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
}
@ -95,7 +95,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
@@ -543,13 +555,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -534,13 +546,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
}
@ -111,7 +111,7 @@ index 5b5073f18e5..27737527deb 100644
device = cs->device;
wined3d_get_draw_rect(state, &draw_rect);
@@ -567,6 +580,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -558,6 +571,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
}
if (op->flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
wined3d_resource_release(state->fb->depth_stencil->resource);
@ -120,7 +120,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
@@ -705,7 +720,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
@@ -696,7 +711,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
}
}
@ -129,7 +129,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_dispatch *op = data;
struct wined3d_state *state = &cs->state;
@@ -716,6 +731,8 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
@@ -707,6 +722,8 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
release_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
@ -138,7 +138,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -737,7 +754,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -728,7 +745,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -147,7 +147,7 @@ index 5b5073f18e5..27737527deb 100644
{
struct wined3d_state *state = &cs->state;
const struct wined3d_cs_draw *op = data;
@@ -782,6 +799,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -773,6 +790,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
@ -156,7 +156,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx, unsigned int start_idx,
@@ -827,12 +846,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
@@ -818,12 +837,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
cs->ops->submit(cs);
}
@ -172,7 +172,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
@@ -847,12 +868,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -838,12 +859,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
cs->ops->submit(cs);
}
@ -188,7 +188,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
@@ -866,12 +889,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -857,12 +880,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
cs->ops->submit(cs);
}
@ -204,7 +204,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -885,12 +910,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -876,12 +901,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
cs->ops->submit(cs);
}
@ -220,7 +220,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
@@ -906,7 +933,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -897,7 +924,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
cs->ops->submit(cs);
}
@ -229,7 +229,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_depth_stencil_view *op = data;
struct wined3d_device *device = cs->device;
@@ -941,6 +968,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -932,6 +959,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
}
device_invalidate_state(device, STATE_FRAMEBUFFER);
@ -238,7 +238,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
@@ -954,12 +983,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -945,12 +974,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -254,7 +254,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
@@ -973,7 +1004,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -964,7 +995,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -263,7 +263,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_stream_source *op = data;
struct wined3d_stream_state *stream;
@@ -991,6 +1022,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
@@ -982,6 +1013,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_STREAMSRC);
@ -272,7 +272,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1008,7 +1041,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -999,7 +1032,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -281,7 +281,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_stream_source_freq *op = data;
struct wined3d_stream_state *stream;
@@ -1018,6 +1051,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
@@ -1009,6 +1042,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
stream->flags = op->flags;
device_invalidate_state(cs->device, STATE_STREAMSRC);
@ -290,7 +290,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
@@ -1033,7 +1068,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1024,7 +1059,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
cs->ops->submit(cs);
}
@ -299,7 +299,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_stream_output *op = data;
struct wined3d_stream_output *stream;
@@ -1048,6 +1083,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
@@ -1039,6 +1074,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
InterlockedIncrement(&op->buffer->resource.bind_count);
if (prev)
InterlockedDecrement(&prev->resource.bind_count);
@ -308,7 +308,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1064,7 +1101,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1055,7 +1092,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -317,7 +317,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_index_buffer *op = data;
struct wined3d_buffer *prev;
@@ -1080,6 +1117,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
@@ -1071,6 +1108,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
@ -326,7 +326,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
@@ -1096,7 +1135,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1087,7 +1126,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
cs->ops->submit(cs);
}
@ -335,7 +335,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_constant_buffer *op = data;
struct wined3d_buffer *prev;
@@ -1110,6 +1149,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
@@ -1101,6 +1140,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
@ -343,7 +343,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1126,7 +1166,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1117,7 +1157,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
cs->ops->submit(cs);
}
@ -352,7 +352,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
@@ -1203,6 +1243,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1194,6 +1234,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (new_use_color_key)
device_invalidate_state(cs->device, STATE_COLOR_KEY);
@ -361,7 +361,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -1217,7 +1259,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1208,7 +1250,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -370,7 +370,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_shader_resource_view *op = data;
struct wined3d_shader_resource_view *prev;
@@ -1234,6 +1276,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
@@ -1225,6 +1267,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
else
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
@ -379,7 +379,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1250,7 +1294,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1241,7 +1285,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@ -388,7 +388,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_unordered_access_view *op = data;
struct wined3d_unordered_access_view *prev;
@@ -1264,6 +1308,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
@@ -1255,6 +1299,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
InterlockedDecrement(&prev->resource->bind_count);
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
@ -397,7 +397,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
@@ -1280,7 +1326,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1271,7 +1317,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
cs->ops->submit(cs);
}
@ -406,7 +406,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_sampler *op = data;
@@ -1289,6 +1335,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1280,6 +1326,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
else
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
@ -415,7 +415,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1305,7 +1353,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1296,7 +1344,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -424,7 +424,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_shader *op = data;
@@ -1315,6 +1363,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1306,6 +1354,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
else
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
@ -433,7 +433,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -1329,12 +1379,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1320,12 +1370,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -449,7 +449,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1349,12 +1401,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1340,12 +1392,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -465,7 +465,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -1369,12 +1423,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1360,12 +1414,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@ -481,7 +481,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1391,12 +1447,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1382,12 +1438,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@ -497,7 +497,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1413,13 +1471,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1404,13 +1462,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@ -514,7 +514,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -1435,12 +1495,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1426,12 +1486,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs->ops->submit(cs);
}
@ -530,7 +530,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -1455,7 +1517,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1446,7 +1508,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs->ops->submit(cs);
}
@ -539,7 +539,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -1516,6 +1578,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
@@ -1507,6 +1569,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
@ -548,7 +548,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -1538,12 +1602,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1529,12 +1593,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@ -564,7 +564,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -1557,7 +1623,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1548,7 +1614,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs->ops->submit(cs);
}
@ -573,7 +573,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_light *op = data;
struct wined3d_light_info *light_info;
@@ -1571,7 +1637,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1562,7 +1628,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
if (!(light_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*light_info))))
{
ERR("Failed to allocate light info.\n");
@ -582,7 +582,7 @@ index 5b5073f18e5..27737527deb 100644
}
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
@@ -1592,6 +1658,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1583,6 +1649,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
light_info->direction = op->light.direction;
light_info->exponent = op->light.exponent;
light_info->cutoff = op->light.cutoff;
@ -591,7 +591,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
@@ -1605,7 +1673,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1596,7 +1664,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
cs->ops->submit(cs);
}
@ -600,7 +600,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_set_light_enable *op = data;
struct wined3d_device *device = cs->device;
@@ -1615,7 +1683,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
@@ -1606,7 +1674,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
if (!(light_info = wined3d_state_get_light(&cs->state, op->idx)))
{
ERR("Light doesn't exist.\n");
@ -609,7 +609,7 @@ index 5b5073f18e5..27737527deb 100644
}
prev_idx = light_info->glIndex;
@@ -1625,6 +1693,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
@@ -1616,6 +1684,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
device_invalidate_state(device, STATE_LIGHT_TYPE);
device_invalidate_state(device, STATE_ACTIVELIGHT(op->enable ? light_info->glIndex : prev_idx));
}
@ -618,7 +618,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
@@ -1639,7 +1709,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1630,7 +1700,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
cs->ops->submit(cs);
}
@ -627,7 +627,7 @@ index 5b5073f18e5..27737527deb 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
@@ -1647,6 +1717,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1638,6 +1708,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
memset(&cs->state, 0, sizeof(cs->state));
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
@ -636,7 +636,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1659,11 +1731,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1650,11 +1722,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -651,7 +651,7 @@ index 5b5073f18e5..27737527deb 100644
}
static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
@@ -1688,12 +1762,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
@@ -1679,12 +1753,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
wined3d_cs_emit_callback(cs, callback, object);
}
@ -667,7 +667,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1708,12 +1784,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1699,12 +1775,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs);
}
@ -683,7 +683,7 @@ index 5b5073f18e5..27737527deb 100644
}
BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1732,13 +1810,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
@@ -1723,13 +1801,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
return ret;
}
@ -700,7 +700,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1754,13 +1834,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1745,13 +1825,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
@ -717,7 +717,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1776,13 +1858,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1767,13 +1849,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@ -734,7 +734,7 @@ index 5b5073f18e5..27737527deb 100644
}
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -1805,12 +1889,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1796,12 +1880,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
return hr;
}
@ -750,16 +750,34 @@ index 5b5073f18e5..27737527deb 100644
}
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
@@ -1829,7 +1915,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1820,7 +1906,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
return hr;
}
-static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_blt_sub_resource *op = data;
@@ -1859,6 +1945,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
if (op->src_resource)
wined3d_resource_release(op->src_resource);
wined3d_resource_release(op->dst_resource);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource,
@@ -1888,7 +1976,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
-static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_update_sub_resource *op = data;
const struct wined3d_box *box = &op->box;
@@ -1879,6 +1965,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
@@ -1938,6 +2026,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
done:
wined3d_resource_release(op->resource);
@ -767,7 +785,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1923,10 +2010,11 @@ push_constant_info[] =
@@ -1982,10 +2071,11 @@ push_constant_info[] =
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
};
@ -780,7 +798,7 @@ index 5b5073f18e5..27737527deb 100644
unsigned int context_count;
unsigned int i;
size_t offset;
@@ -1942,6 +2030,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
@@ -2001,6 +2091,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
{
device->contexts[i]->constant_update_mask |= push_constant_info[op->p].mask;
}
@ -789,25 +807,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
@@ -1959,7 +2049,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
-static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_blt *op = data;
@@ -1970,6 +2060,8 @@ static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
wined3d_resource_release(&op->dst_surface->container->resource);
if (op->src_surface && op->src_surface != op->dst_surface)
wined3d_resource_release(&op->src_surface->container->resource);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
@@ -1997,7 +2089,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -2018,7 +2110,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
@ -816,7 +816,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_clear_rtv *op = data;
struct wined3d_device *device = cs->device;
@@ -2008,6 +2100,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
@@ -2029,6 +2121,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
wined3d_resource_release(op->view->resource);
@ -825,7 +825,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
@@ -2032,7 +2126,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2053,7 +2147,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -834,7 +834,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_update_texture *op = data;
struct wined3d_context *context;
@@ -2043,6 +2137,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
@@ -2064,6 +2158,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
wined3d_resource_release(&op->src->resource);
wined3d_resource_release(&op->dst->resource);
@ -843,7 +843,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
@@ -2061,11 +2157,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2082,11 +2178,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs);
}
@ -858,7 +858,7 @@ index 5b5073f18e5..27737527deb 100644
}
HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -2085,11 +2183,13 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
@@ -2106,11 +2204,13 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
return hr;
}
@ -873,7 +873,7 @@ index 5b5073f18e5..27737527deb 100644
}
HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -2109,11 +2209,13 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
@@ -2130,11 +2230,13 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
return hr;
}
@ -888,7 +888,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
@@ -2127,7 +2229,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2148,7 +2250,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
cs->ops->submit_and_wait(cs);
}
@ -897,7 +897,7 @@ index 5b5073f18e5..27737527deb 100644
{
const struct wined3d_cs_texture_add_dirty_region *op = data;
struct wined3d_texture *texture = op->texture;
@@ -2145,6 +2247,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
@@ -2166,6 +2268,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
context_release(context);
wined3d_resource_release(&texture->resource);
@ -906,25 +906,7 @@ index 5b5073f18e5..27737527deb 100644
}
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2166,7 +2270,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
-static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_buffer_copy *op = data;
HRESULT hr;
@@ -2176,6 +2280,8 @@ static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
wined3d_resource_release(&op->dst_buffer->resource);
wined3d_resource_release(&op->src_buffer->resource);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
@@ -2198,7 +2304,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
@@ -2187,7 +2291,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -933,7 +915,7 @@ index 5b5073f18e5..27737527deb 100644
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
@@ -2303,6 +2409,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -2291,6 +2395,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_submit,
};
@ -1135,7 +1117,7 @@ index 5b5073f18e5..27737527deb 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -2332,12 +2633,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2320,12 +2619,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@ -1178,10 +1160,10 @@ index 5b5073f18e5..27737527deb 100644
HeapFree(GetProcessHeap(), 0, cs->data);
HeapFree(GetProcessHeap(), 0, cs);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f359d332aae..c1a5f54f9c1 100644
index eecc5787b5c..a04a6b697ef 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1289,7 +1289,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
@@ -1310,7 +1310,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
/* We can not acquire the context unless there is a swapchain. */
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
@ -1221,7 +1203,7 @@ index 1ce5937f173..4ef747ca89a 100644
if (hkey) RegCloseKey( hkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3d6aaf923b3..2b64485e82e 100644
index eb3384c1675..508c4cba0e9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -391,6 +391,7 @@ struct wined3d_settings
@ -1232,7 +1214,7 @@ index 3d6aaf923b3..2b64485e82e 100644
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -2792,11 +2793,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
@@ -2793,11 +2794,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
InterlockedDecrement(&resource->access_count);
}
@ -1244,7 +1226,7 @@ index 3d6aaf923b3..2b64485e82e 100644
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
enum wined3d_resource_type type, const struct wined3d_format *format,
@@ -3215,6 +3211,21 @@ enum wined3d_push_constants
@@ -3213,6 +3209,21 @@ enum wined3d_push_constants
WINED3D_PUSH_CONSTANTS_PS_B,
};
@ -1266,7 +1248,7 @@ index 3d6aaf923b3..2b64485e82e 100644
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -3232,9 +3243,21 @@ struct wined3d_cs
@@ -3230,9 +3241,21 @@ struct wined3d_cs
size_t data_size, start, end;
void *data;

View File

@ -1,18 +1,18 @@
From 6d4b64128fef7fd8d9e186eaf18b45d0108a6780 Mon Sep 17 00:00:00 2001
From 2c6f63e68a369302556be78022b0e60482698153 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 8 Feb 2017 00:12:31 +0100
Subject: wined3d: Introduce a separate priority queue.
---
dlls/wined3d/cs.c | 127 ++++++++++++++++++++++-------------------
dlls/wined3d/cs.c | 125 ++++++++++++++++++++++-------------------
dlls/wined3d/wined3d_private.h | 4 +-
2 files changed, 71 insertions(+), 60 deletions(-)
2 files changed, 70 insertions(+), 59 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c6c6b49f5fc..271b38de6c4 100644
index 3f629388176..8b92a76e4d4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -470,7 +470,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -461,7 +461,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
{
struct wined3d_cs_sync *op;
@ -21,7 +21,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SYNC;
cs->ops->submit_and_wait(cs);
@@ -490,7 +490,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -481,7 +481,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
{
struct wined3d_cs_glfinish *op;
@ -30,7 +30,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_GLFINISH;
cs->ops->submit_and_wait(cs);
@@ -525,7 +525,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -516,7 +516,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
unsigned int i;
LONG pending;
@ -39,7 +39,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_PRESENT;
op->dst_window_override = dst_window_override;
op->swapchain = swapchain;
@@ -591,7 +591,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -582,7 +582,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
struct wined3d_cs_clear *op;
unsigned int i;
@ -48,7 +48,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags;
op->color = *color;
@@ -741,7 +741,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -732,7 +732,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
const struct wined3d_state *state = &cs->device->state;
struct wined3d_cs_dispatch *op;
@ -57,7 +57,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_DISPATCH;
op->group_count_x = group_count_x;
op->group_count_y = group_count_y;
@@ -810,7 +810,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
@@ -801,7 +801,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
struct wined3d_cs_draw *op;
unsigned int i;
@ -66,7 +66,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_DRAW;
op->primitive_type = primitive_type;
op->base_vertex_idx = base_vertex_idx;
@@ -860,7 +860,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -851,7 +851,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
{
struct wined3d_cs_set_predication *op;
@ -75,7 +75,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
op->predicate = predicate;
op->value = value;
@@ -882,7 +882,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -873,7 +873,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
{
struct wined3d_cs_set_viewport *op;
@ -84,7 +84,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@@ -903,7 +903,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -894,7 +894,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
{
struct wined3d_cs_set_scissor_rect *op;
@ -93,7 +93,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@@ -925,7 +925,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -916,7 +916,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
{
struct wined3d_cs_set_rendertarget_view *op;
@ -102,7 +102,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
op->view_idx = view_idx;
op->view = view;
@@ -976,7 +976,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -967,7 +967,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
{
struct wined3d_cs_set_depth_stencil_view *op;
@ -111,7 +111,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@@ -997,7 +997,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -988,7 +988,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
{
struct wined3d_cs_set_vertex_declaration *op;
@ -120,7 +120,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@@ -1031,7 +1031,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1022,7 +1022,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_source *op;
@ -129,7 +129,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
op->stream_idx = stream_idx;
op->buffer = buffer;
@@ -1059,7 +1059,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1050,7 +1050,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
{
struct wined3d_cs_set_stream_source_freq *op;
@ -138,7 +138,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
op->stream_idx = stream_idx;
op->frequency = frequency;
@@ -1092,7 +1092,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1083,7 +1083,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_output *op;
@ -147,7 +147,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
op->stream_idx = stream_idx;
op->buffer = buffer;
@@ -1126,7 +1126,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1117,7 +1117,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
{
struct wined3d_cs_set_index_buffer *op;
@ -156,7 +156,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
op->buffer = buffer;
op->format_id = format_id;
@@ -1157,7 +1157,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1148,7 +1148,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
{
struct wined3d_cs_set_constant_buffer *op;
@ -165,7 +165,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
op->type = type;
op->cb_idx = cb_idx;
@@ -1251,7 +1251,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1242,7 +1242,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
{
struct wined3d_cs_set_texture *op;
@ -174,7 +174,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
@@ -1285,7 +1285,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1276,7 +1276,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
{
struct wined3d_cs_set_shader_resource_view *op;
@ -183,7 +183,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
op->type = type;
op->view_idx = view_idx;
@@ -1317,7 +1317,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1308,7 +1308,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
{
struct wined3d_cs_set_unordered_access_view *op;
@ -192,7 +192,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
op->pipeline = pipeline;
op->view_idx = view_idx;
@@ -1344,7 +1344,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1335,7 +1335,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_sampler *op;
@ -201,7 +201,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
op->type = type;
op->sampler_idx = sampler_idx;
@@ -1371,7 +1371,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1362,7 +1362,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_shader *op;
@ -210,7 +210,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_SHADER;
op->type = type;
op->shader = shader;
@@ -1394,7 +1394,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1385,7 +1385,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
{
struct wined3d_cs_set_rasterizer_state *op;
@ -219,7 +219,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@@ -1415,7 +1415,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1406,7 +1406,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
{
struct wined3d_cs_set_render_state *op;
@ -228,7 +228,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
op->state = state;
op->value = value;
@@ -1438,7 +1438,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1429,7 +1429,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
{
struct wined3d_cs_set_texture_state *op;
@ -237,7 +237,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
op->stage = stage;
op->state = state;
@@ -1462,7 +1462,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1453,7 +1453,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
{
struct wined3d_cs_set_sampler_state *op;
@ -246,7 +246,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
op->sampler_idx = sampler_idx;
op->state = state;
@@ -1487,7 +1487,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1478,7 +1478,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
{
struct wined3d_cs_set_transform *op;
@ -255,7 +255,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
op->state = state;
op->matrix = *matrix;
@@ -1509,7 +1509,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1500,7 +1500,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
{
struct wined3d_cs_set_clip_plane *op;
@ -264,7 +264,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
op->plane_idx = plane_idx;
op->plane = *plane;
@@ -1587,7 +1587,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1578,7 +1578,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
{
struct wined3d_cs_set_color_key *op;
@ -273,7 +273,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
op->texture = texture;
op->flags = flags;
@@ -1616,7 +1616,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1607,7 +1607,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
{
struct wined3d_cs_set_material *op;
@ -282,7 +282,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@@ -1666,7 +1666,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1657,7 +1657,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
{
struct wined3d_cs_set_light *op;
@ -291,7 +291,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@@ -1701,7 +1701,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1692,7 +1692,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
{
struct wined3d_cs_set_light_enable *op;
@ -300,7 +300,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
op->idx = idx;
op->enable = enable;
@@ -1725,7 +1725,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1716,7 +1716,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
{
struct wined3d_cs_reset_state *op;
@ -309,7 +309,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_RESET_STATE;
cs->ops->submit(cs);
@@ -1744,7 +1744,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
@@ -1735,7 +1735,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
{
struct wined3d_cs_callback *op;
@ -318,7 +318,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_CALLBACK;
op->callback = callback;
op->object = object;
@@ -1776,7 +1776,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1767,7 +1767,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
{
struct wined3d_cs_query_issue *op;
@ -327,7 +327,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
op->query = query;
op->flags = flags;
@@ -1799,7 +1799,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
@@ -1790,7 +1790,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
struct wined3d_cs_query_poll *op;
BOOL ret;
@ -336,7 +336,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_QUERY_POLL;
op->query = query;
op->flags = flags;
@@ -1825,7 +1825,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1816,7 +1816,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_preload_resource *op;
@ -345,7 +345,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
op->resource = resource;
@@ -1849,7 +1849,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1840,7 +1840,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
{
struct wined3d_cs_unload_resource *op;
@ -354,7 +354,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
op->resource = resource;
@@ -1875,7 +1875,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1866,7 +1866,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
struct wined3d_cs_map *op;
HRESULT hr;
@ -363,7 +363,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_MAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -1904,7 +1904,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1895,7 +1895,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
struct wined3d_cs_unmap *op;
HRESULT hr;
@ -372,7 +372,16 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_UNMAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -1974,7 +1974,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -1956,7 +1956,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_blt_sub_resource *op;
- op = cs->ops->require_space(cs, sizeof(*op));
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE;
op->dst_resource = dst_resource;
op->dst_sub_resource_idx = dst_sub_resource_idx;
@@ -2035,7 +2035,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
{
struct wined3d_cs_update_sub_resource *op;
@ -381,7 +390,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -2039,7 +2039,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
@@ -2100,7 +2100,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
{
struct wined3d_cs_push_constants *op;
@ -390,16 +399,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
op->p = p;
op->start_idx = start_idx;
@@ -2071,7 +2071,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
{
struct wined3d_cs_blt *op;
- op = cs->ops->require_space(cs, sizeof(*op));
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_BLT;
op->dst_surface = dst_surface;
op->dst_rect = *dst_rect;
@@ -2110,7 +2110,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2131,7 +2131,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
{
struct wined3d_cs_clear_rtv *op;
@ -408,7 +408,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_CLEAR_RTV;
op->view = view;
op->rect = *rect;
@@ -2146,7 +2146,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2167,7 +2167,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
{
struct wined3d_cs_update_texture *op;
@ -417,7 +417,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_UPDATE_TEXTURE;
op->src = src;
op->dst = dst;
@@ -2172,7 +2172,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
@@ -2193,7 +2193,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
struct wined3d_cs_get_release_dc *op;
HRESULT hr;
@ -426,7 +426,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_GET_DC;
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@@ -2198,7 +2198,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
@@ -2219,7 +2219,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
struct wined3d_cs_get_release_dc *op;
HRESULT hr;
@ -435,7 +435,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_RELEASE_DC;
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@@ -2222,7 +2222,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2243,7 +2243,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
{
struct wined3d_cs_update_swap_interval *op;
@ -444,7 +444,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
op->swapchain = swapchain;
@@ -2260,7 +2260,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2281,7 +2281,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
if (dirty_region)
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
@ -453,17 +453,8 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@@ -2290,7 +2290,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
{
struct wined3d_cs_buffer_copy *op;
- op = cs->ops->require_space(cs, sizeof(*op));
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_BUFFER_COPY;
op->dst_buffer = dst_buffer;
op->dst_offset = dst_offset;
@@ -2358,7 +2358,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
@@ -2344,7 +2344,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
};
-static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@ -471,7 +462,7 @@ index c6c6b49f5fc..271b38de6c4 100644
{
if (size > (cs->data_size - cs->end))
{
@@ -2442,6 +2442,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
@@ -2428,6 +2428,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
/* FIXME: Use an event to wait after a couple of spins. */
for (;;)
{
@ -480,7 +471,7 @@ index c6c6b49f5fc..271b38de6c4 100644
if ((block = wined3d_cs_list_dequeue(&cs->exec_list)))
return block;
}
@@ -2469,7 +2471,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
@@ -2455,7 +2457,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
DeleteCriticalSection(&list->lock);
}
@ -489,7 +480,7 @@ index c6c6b49f5fc..271b38de6c4 100644
{
struct wined3d_cs_block *block;
@@ -2483,26 +2485,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
@@ -2469,26 +2471,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
}
block->pos = 0;
@ -522,7 +513,7 @@ index c6c6b49f5fc..271b38de6c4 100644
cs->current_block = block;
}
@@ -2514,10 +2518,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
@@ -2500,10 +2504,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
{
@ -537,7 +528,7 @@ index c6c6b49f5fc..271b38de6c4 100644
cs->current_block = NULL;
}
@@ -2531,7 +2538,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
@@ -2517,7 +2524,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
block = cs->current_block;
block->fence = &fence;
@ -546,7 +537,7 @@ index c6c6b49f5fc..271b38de6c4 100644
cs->current_block = NULL;
/* A busy wait should be fine, we're not supposed to have to wait very
@@ -2553,7 +2560,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
@@ -2539,7 +2546,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
assert(cs->thread_id != GetCurrentThreadId());
assert(cs->ops == &wined3d_cs_mt_ops);
@ -555,7 +546,7 @@ index c6c6b49f5fc..271b38de6c4 100644
op->opcode = WINED3D_CS_OP_STOP;
cs->ops->submit(cs);
@@ -2639,6 +2646,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2625,6 +2632,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
wined3d_cs_list_init(&cs->free_list);
wined3d_cs_list_init(&cs->exec_list);
@ -563,7 +554,7 @@ index c6c6b49f5fc..271b38de6c4 100644
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
{
@@ -2664,6 +2672,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2650,6 +2658,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
WaitForSingleObject(cs->thread, INFINITE);
CloseHandle(cs->thread);
@ -572,10 +563,10 @@ index c6c6b49f5fc..271b38de6c4 100644
wined3d_cs_list_cleanup(&cs->free_list);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2b64485e82e..2662342cbba 100644
index 508c4cba0e9..0223a6c3cac 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3222,13 +3222,14 @@ struct wined3d_cs_block
@@ -3220,13 +3220,14 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@ -591,7 +582,7 @@ index 2b64485e82e..2662342cbba 100644
void (*submit)(struct wined3d_cs *cs);
void (*submit_and_wait)(struct wined3d_cs *cs);
};
@@ -3248,6 +3249,7 @@ struct wined3d_cs
@@ -3246,6 +3247,7 @@ struct wined3d_cs
struct wined3d_cs_block *current_block;
struct wined3d_cs_list free_list;
struct wined3d_cs_list exec_list;

View File

@ -1,4 +1,4 @@
From 66849c6928010aa02b9d9d049fcc43c5a3823b0c Mon Sep 17 00:00:00 2001
From ec94556fda1517b698ed180ebd06f20bf59d2438 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 8 Feb 2017 12:32:55 +0100
Subject: wined3d: Do not immediately submit stateblock updates.
@ -9,10 +9,10 @@ Subject: wined3d: Do not immediately submit stateblock updates.
2 files changed, 36 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 705d30b2879..25f833dfdce 100644
index 75907ff6146..ffea25e50c0 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -882,7 +882,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -856,7 +856,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
op->predicate = predicate;
op->value = value;
@ -21,7 +21,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
@@ -903,7 +903,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -877,7 +877,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@ -30,7 +30,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
@@ -924,7 +924,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -898,7 +898,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@ -39,7 +39,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
@@ -947,7 +947,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -921,7 +921,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
op->view_idx = view_idx;
op->view = view;
@ -48,7 +48,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
@@ -997,7 +997,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -971,7 +971,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@ -57,7 +57,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
@@ -1018,7 +1018,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -992,7 +992,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@ -66,7 +66,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
@@ -1055,7 +1055,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1029,7 +1029,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
op->offset = offset;
op->stride = stride;
@ -75,7 +75,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
@@ -1082,7 +1082,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1056,7 +1056,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
op->frequency = frequency;
op->flags = flags;
@ -84,7 +84,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
@@ -1115,7 +1115,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1089,7 +1089,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
op->buffer = buffer;
op->offset = offset;
@ -93,7 +93,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
@@ -1149,7 +1149,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1123,7 +1123,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
op->format_id = format_id;
op->offset = offset;
@ -102,7 +102,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
@@ -1180,7 +1180,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1154,7 +1154,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
op->cb_idx = cb_idx;
op->buffer = buffer;
@ -111,7 +111,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1273,7 +1273,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1247,7 +1247,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
op->stage = stage;
op->texture = texture;
@ -120,7 +120,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
@@ -1308,7 +1308,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1282,7 +1282,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
op->view_idx = view_idx;
op->view = view;
@ -129,7 +129,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
@@ -1340,7 +1340,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1314,7 +1314,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
op->view_idx = view_idx;
op->view = view;
@ -138,7 +138,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1367,7 +1367,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1341,7 +1341,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
op->sampler_idx = sampler_idx;
op->sampler = sampler;
@ -147,7 +147,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1393,7 +1393,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1367,7 +1367,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
op->type = type;
op->shader = shader;
@ -156,7 +156,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
@@ -1415,7 +1415,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1389,7 +1389,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@ -165,7 +165,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
@@ -1437,7 +1437,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1411,7 +1411,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->state = state;
op->value = value;
@ -174,7 +174,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1461,7 +1461,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1435,7 +1435,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
op->state = state;
op->value = value;
@ -183,7 +183,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
@@ -1485,7 +1485,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1459,7 +1459,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
op->state = state;
op->value = value;
@ -192,7 +192,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
@@ -1509,7 +1509,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1483,7 +1483,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op->state = state;
op->matrix = *matrix;
@ -201,7 +201,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
@@ -1531,7 +1531,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1505,7 +1505,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op->plane_idx = plane_idx;
op->plane = *plane;
@ -210,7 +210,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
@@ -1616,7 +1616,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1590,7 +1590,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
else
op->set = 0;
@ -219,7 +219,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
@@ -1637,7 +1637,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1611,7 +1611,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@ -228,7 +228,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1687,7 +1687,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1661,7 +1661,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@ -237,7 +237,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
@@ -1723,7 +1723,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1697,7 +1697,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
op->idx = idx;
op->enable = enable;
@ -246,7 +246,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1745,7 +1745,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1719,7 +1719,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_RESET_STATE;
@ -255,7 +255,7 @@ index 705d30b2879..25f833dfdce 100644
}
static UINT wined3d_cs_exec_callback(struct wined3d_cs *cs, const void *data)
@@ -1994,7 +1994,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
@@ -2111,7 +2111,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
op->count = count;
memcpy(op->constants, constants, count * push_constant_info[p].size);
@ -263,8 +263,8 @@ index 705d30b2879..25f833dfdce 100644
+ cs->ops->submit_delayed(cs);
}
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
@@ -2514,6 +2514,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
@@ -2397,6 +2397,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
wined3d_cs_st_submit,
@ -272,7 +272,7 @@ index 705d30b2879..25f833dfdce 100644
};
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
@@ -2690,11 +2691,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
@@ -2573,11 +2574,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
while (!InterlockedCompareExchange(&fence, TRUE, TRUE));
}
@ -291,10 +291,10 @@ index 705d30b2879..25f833dfdce 100644
static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e71dfbb2ca8..b8c14275406 100644
index 893768527b1..367e17fb7a7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3216,6 +3216,7 @@ struct wined3d_cs_ops
@@ -3231,6 +3231,7 @@ struct wined3d_cs_ops
void *(*require_space)(struct wined3d_cs *cs, size_t size, int priority);
void (*submit)(struct wined3d_cs *cs);
void (*submit_and_wait)(struct wined3d_cs *cs);

File diff suppressed because it is too large Load Diff