diff --git a/patches/kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch b/patches/kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch index 3adbb94b..5d852519 100644 --- a/patches/kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch +++ b/patches/kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch @@ -1,4 +1,4 @@ -From 4eee0f21a8b18a784ec6e2978379937d3f5b190d Mon Sep 17 00:00:00 2001 +From cc87b15eede29e05caba38bbf2d15614dcbb1f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Wed, 16 Aug 2017 02:45:23 +0200 Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx. @@ -7,11 +7,11 @@ Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx. .../api-ms-win-core-path-l1-1-0.spec | 2 +- dlls/kernelbase/Makefile.in | 4 +++- dlls/kernelbase/kernelbase.spec | 2 +- - dlls/kernelbase/path.c | 26 ++++++++++++++++++++++ - 4 files changed, 31 insertions(+), 3 deletions(-) + dlls/kernelbase/path.c | 27 ++++++++++++++++++++++ + 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec -index 287c5d6..9895b1b 100644 +index 0524e7c..c11746e 100644 --- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec +++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec @@ -8,7 +8,7 @@ @@ -20,7 +20,7 @@ index 287c5d6..9895b1b 100644 @ stub PathCchCombine -@ stub PathCchCombineEx +@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx - @ stub PathCchFindExtension + @ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension @ stub PathCchIsRoot @ stub PathCchRemoveBackslash diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in @@ -36,7 +36,7 @@ index a7db45e..78c19bd 100644 C_SRCS = \ main.c \ diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec -index eafe5ab..78ab086 100644 +index 6ee822d..fc5ddfd 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1037,7 +1037,7 @@ @@ -45,14 +45,14 @@ index eafe5ab..78ab086 100644 # @ stub PathCchCombine -# @ stub PathCchCombineEx +@ stdcall PathCchCombineEx(ptr long ptr ptr long) - # @ stub PathCchFindExtension + @ stdcall PathCchFindExtension(wstr long ptr) # @ stub PathCchIsRoot # @ stub PathCchRemoveBackslash diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c -index 373c34e..52ef7d9 100644 +index 047017e..598229a 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c -@@ -21,6 +21,7 @@ +@@ -22,6 +22,7 @@ #include "windef.h" #include "winbase.h" #include "pathcch.h" @@ -60,9 +60,9 @@ index 373c34e..52ef7d9 100644 #include "strsafe.h" #include "wine/debug.h" -@@ -65,3 +66,28 @@ HRESULT WINAPI PathCchAddBackslashEx(WCHAR *path, SIZE_T size, WCHAR **endptr, S - - return S_OK; +@@ -183,3 +184,29 @@ HRESULT WINAPI PathCchRenameExtension(WCHAR *path, SIZE_T size, const WCHAR *ext + hr = PathCchAddExtension(path, size, extension); + return FAILED(hr) ? hr : S_OK; } + +/*********************************************************************** @@ -89,6 +89,7 @@ index 373c34e..52ef7d9 100644 + strcpyW(out, result); + return S_OK; +} ++ -- -2.7.4 +1.9.1 diff --git a/patches/kernelbase-PathCchCombineEx/0002-kernelbase-Implement-PathCchRemoveBackslash-PathCchR.patch b/patches/kernelbase-PathCchCombineEx/0002-kernelbase-Implement-PathCchRemoveBackslash-PathCchR.patch index d14cad5a..7a135381 100644 --- a/patches/kernelbase-PathCchCombineEx/0002-kernelbase-Implement-PathCchRemoveBackslash-PathCchR.patch +++ b/patches/kernelbase-PathCchCombineEx/0002-kernelbase-Implement-PathCchRemoveBackslash-PathCchR.patch @@ -1,56 +1,55 @@ -From 0dc009c4320a9cb72dc96bb60bd55970cf6d4345 Mon Sep 17 00:00:00 2001 +From 64f1f3000c1ef0a6211ace3fd361dcfebd000757 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 4 Jul 2018 22:35:16 +0200 Subject: [PATCH] kernelbase: Implement PathCchRemoveBackslash()/PathCchRemoveBackslashEx(). --- - .../api-ms-win-core-path-l1-1-0.spec | 4 +- - dlls/kernelbase/kernelbase.spec | 4 +- - dlls/kernelbase/path.c | 31 +++++ - dlls/kernelbase/tests/path.c | 127 ++++++++++++++++++ - include/pathcch.h | 2 + - 5 files changed, 164 insertions(+), 4 deletions(-) + .../api-ms-win-core-path-l1-1-0.spec | 4 +- + dlls/kernelbase/kernelbase.spec | 4 +- + dlls/kernelbase/path.c | 31 +++++ + dlls/kernelbase/tests/path.c | 128 +++++++++++++++++++++ + include/pathcch.h | 2 + + 5 files changed, 165 insertions(+), 4 deletions(-) diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec -index 9895b1b8e23..591ee7d882f 100644 +index c11746e..c899fd9 100644 --- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec +++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec @@ -11,8 +11,8 @@ @ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx - @ stub PathCchFindExtension + @ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension @ stub PathCchIsRoot -@ stub PathCchRemoveBackslash -@ stub PathCchRemoveBackslashEx +@ stdcall PathCchRemoveBackslash(wstr long) kernelbase.PathCchRemoveBackslash +@ stdcall PathCchRemoveBackslashEx(wstr long ptr ptr) kernelbase.PathCchRemoveBackslashEx - @ stub PathCchRemoveExtension + @ stdcall PathCchRemoveExtension(wstr long) kernelbase.PathCchRemoveExtension @ stub PathCchRemoveFileSpec - @ stub PathCchRenameExtension + @ stdcall PathCchRenameExtension(wstr long wstr) kernelbase.PathCchRenameExtension diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec -index 1f75b080378..c4a75bc1694 100644 +index fc5ddfd..9863d9f 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1040,8 +1040,8 @@ @ stdcall PathCchCombineEx(ptr long ptr ptr long) - # @ stub PathCchFindExtension + @ stdcall PathCchFindExtension(wstr long ptr) # @ stub PathCchIsRoot -# @ stub PathCchRemoveBackslash -# @ stub PathCchRemoveBackslashEx +@ stdcall PathCchRemoveBackslash(wstr long) +@ stdcall PathCchRemoveBackslashEx(wstr long ptr ptr) - # @ stub PathCchRemoveExtension + @ stdcall PathCchRemoveExtension(wstr long) # @ stub PathCchRemoveFileSpec - # @ stub PathCchRenameExtension + @ stdcall PathCchRenameExtension(wstr long wstr) diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c -index 52ef7d97654..3113bfe1255 100644 +index 598229a..68c8dcb 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c -@@ -91,3 +91,34 @@ HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, con - strcpyW(out, result); +@@ -210,3 +210,34 @@ HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, con return S_OK; } -+ + +HRESULT WINAPI PathCchRemoveBackslash(WCHAR *path, SIZE_T size) +{ + return PathCchRemoveBackslashEx(path, size, NULL, NULL); @@ -81,20 +80,21 @@ index 52ef7d97654..3113bfe1255 100644 + + return needs_trim ? S_OK : S_FALSE; +} ++ diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c -index cdba51bf3f6..20f8852faca 100644 +index 1d6f44e..61d2232 100644 --- a/dlls/kernelbase/tests/path.c +++ b/dlls/kernelbase/tests/path.c -@@ -31,6 +31,8 @@ - +@@ -33,6 +33,8 @@ HRESULT (WINAPI *pPathCchAddBackslash)(WCHAR *out, SIZE_T size); HRESULT (WINAPI *pPathCchAddBackslashEx)(WCHAR *out, SIZE_T size, WCHAR **endptr, SIZE_T *remaining); + HRESULT (WINAPI *pPathCchAddExtension)(WCHAR *path, SIZE_T size, const WCHAR *extension); +HRESULT (WINAPI *pPathCchRemoveBackslash)(WCHAR *out, SIZE_T size); +HRESULT (WINAPI *pPathCchRemoveBackslashEx)(WCHAR *out, SIZE_T size, WCHAR **endptr, SIZE_T *remaining); HRESULT (WINAPI *pPathCchCombineEx)(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags); - - static const struct -@@ -245,6 +247,127 @@ static void test_PathCchAddBackslashEx(void) + HRESULT (WINAPI *pPathCchFindExtension)(const WCHAR *path, SIZE_T size, const WCHAR **extension); + HRESULT (WINAPI *pPathCchRemoveExtension)(WCHAR *path, SIZE_T size); +@@ -632,6 +634,127 @@ static void test_PathCchRenameExtension(void) } } @@ -222,30 +222,36 @@ index cdba51bf3f6..20f8852faca 100644 START_TEST(path) { HMODULE hmod = LoadLibraryA("kernelbase.dll"); -@@ -252,8 +375,12 @@ START_TEST(path) - pPathCchCombineEx = (void *)GetProcAddress(hmod, "PathCchCombineEx"); - pPathCchAddBackslash = (void *)GetProcAddress(hmod, "PathCchAddBackslash"); - pPathCchAddBackslashEx = (void *)GetProcAddress(hmod, "PathCchAddBackslashEx"); +@@ -644,6 +767,9 @@ START_TEST(path) + pPathCchRemoveExtension = (void *)GetProcAddress(hmod, "PathCchRemoveExtension"); + pPathCchRenameExtension = (void *)GetProcAddress(hmod, "PathCchRenameExtension"); + + pPathCchRemoveBackslash = (void *)GetProcAddress(hmod, "PathCchRemoveBackslash"); + pPathCchRemoveBackslashEx = (void *)GetProcAddress(hmod, "PathCchRemoveBackslashEx"); - ++ test_PathCchCombineEx(); test_PathCchAddBackslash(); test_PathCchAddBackslashEx(); +@@ -651,4 +777,6 @@ START_TEST(path) + test_PathCchFindExtension(); + test_PathCchRemoveExtension(); + test_PathCchRenameExtension(); + test_PathCchRemoveBackslash(); + test_PathCchRemoveBackslashEx(); } diff --git a/include/pathcch.h b/include/pathcch.h -index 2b2aed4c8f9..c19ed1d9306 100644 +index 3057b6c..dd92b83 100644 --- a/include/pathcch.h +++ b/include/pathcch.h -@@ -25,4 +25,6 @@ - +@@ -28,6 +28,8 @@ HRESULT WINAPI PathCchAddBackslash(WCHAR *path, SIZE_T size); HRESULT WINAPI PathCchAddBackslashEx(WCHAR *path, SIZE_T size, WCHAR **end, SIZE_T *remaining); + HRESULT WINAPI PathCchAddExtension(WCHAR *path, SIZE_T size, const WCHAR *extension); +HRESULT WINAPI PathCchRemoveBackslash(WCHAR *path, SIZE_T size); +HRESULT WINAPI PathCchRemoveBackslashEx(WCHAR *path, SIZE_T size, WCHAR **end, SIZE_T *remaining); HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags); + HRESULT WINAPI PathCchFindExtension(const WCHAR *path, SIZE_T size, const WCHAR **extension); + HRESULT WINAPI PathCchRemoveExtension(WCHAR *path, SIZE_T size); -- -2.18.0 +1.9.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 52fad3c2..09891df7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "488432317206bc816432af0dd740e18979e37e58" + echo "55bcfea8f011c7f31df81a0f05f11a1d5c0d11b1" } # Show version information @@ -354,7 +354,6 @@ patch_enable_all () enable_wined3d_DXTn="$1" enable_wined3d_Dual_Source_Blending="$1" enable_wined3d_Indexed_Vertex_Blending="$1" - enable_wined3d_QUERY_Stubs="$1" enable_wined3d_Restore_DirectX10_Support="$1" enable_wined3d_Silence_FIXMEs="$1" enable_wined3d_UAV_Counters="$1" @@ -1226,9 +1225,6 @@ patch_enable () wined3d-Indexed_Vertex_Blending) enable_wined3d_Indexed_Vertex_Blending="$2" ;; - wined3d-QUERY_Stubs) - enable_wined3d_QUERY_Stubs="$2" - ;; wined3d-Restore-DirectX10-Support) enable_wined3d_Restore_DirectX10_Support="$2" ;; @@ -1809,9 +1805,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then if test "$enable_wined3d_Dual_Source_Blending" -gt 1; then abort "Patchset wined3d-Dual_Source_Blending disabled, but wined3d-CSMT_Main depends on that." fi - if test "$enable_wined3d_QUERY_Stubs" -gt 1; then - abort "Patchset wined3d-QUERY_Stubs disabled, but wined3d-CSMT_Main depends on that." - fi if test "$enable_wined3d_Silence_FIXMEs" -gt 1; then abort "Patchset wined3d-Silence_FIXMEs disabled, but wined3d-CSMT_Main depends on that." fi @@ -1823,7 +1816,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then enable_wined3d_Accounting=1 enable_wined3d_DXTn=1 enable_wined3d_Dual_Source_Blending=1 - enable_wined3d_QUERY_Stubs=1 enable_wined3d_Silence_FIXMEs=1 enable_wined3d_UAV_Counters=1 fi @@ -7263,21 +7255,6 @@ if test "$enable_wined3d_Dual_Source_Blending" -eq 1; then ) >> "$patchlist" fi -# Patchset wined3d-QUERY_Stubs -# | -# | This patchset fixes the following Wine bugs: -# | * [#20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW -# | -# | Modified files: -# | * dlls/d3d10core/tests/d3d10core.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/query.c -# | -if test "$enable_wined3d_QUERY_Stubs" -eq 1; then - patch_apply wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch - ( - printf '%s\n' '+ { "Michael Müller", "wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-Silence_FIXMEs # | # | Modified files: @@ -7308,8 +7285,7 @@ fi # | # | This patchset has the following (direct or indirect) dependencies: # | * nvcuda-CUDA_Support, nvapi-Stub_DLL, d3d11-Deferred_Context, d3d9-Tests, wined3d-Accounting, wined3d- -# | WINED3DFMT_B8G8R8X8_UNORM, wined3d-DXTn, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, -# | wined3d-UAV_Counters +# | WINED3DFMT_B8G8R8X8_UNORM, wined3d-DXTn, wined3d-Dual_Source_Blending, wined3d-Silence_FIXMEs, wined3d-UAV_Counters # | # | Modified files: # | * dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/wined3d_private.h diff --git a/patches/wined3d-Accounting/0001-wined3d-Use-real-values-for-memory-accounting-on-NVI.patch b/patches/wined3d-Accounting/0001-wined3d-Use-real-values-for-memory-accounting-on-NVI.patch index ba1d903a..830f075e 100644 --- a/patches/wined3d-Accounting/0001-wined3d-Use-real-values-for-memory-accounting-on-NVI.patch +++ b/patches/wined3d-Accounting/0001-wined3d-Use-real-values-for-memory-accounting-on-NVI.patch @@ -1,4 +1,4 @@ -From f244bd251e05597fa57e8088c3196e0b17726d5f Mon Sep 17 00:00:00 2001 +From 4cc906486ee06960c3031bb7eaeda7ebf046be66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 6 Jun 2015 06:53:34 +0200 Subject: [PATCH] wined3d: Use real values for memory accounting on NVIDIA @@ -9,15 +9,15 @@ FIXME: Reimplement wined3d_device_get_available_texture_mem --- dlls/d3d9/tests/device.c | 11 +++++++---- dlls/wined3d/adapter_gl.c | 10 ++++++++++ - dlls/wined3d/device.c | 25 +++++++++++++++++++++++++ + dlls/wined3d/device.c | 23 +++++++++++++++++++++++ dlls/wined3d/wined3d_gl.h | 1 + - 4 files changed, 43 insertions(+), 4 deletions(-) + 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index 66bf5b0..b9ff69c 100644 +index cabd15a..84746a9 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c -@@ -9496,10 +9496,13 @@ static void test_vidmem_accounting(void) +@@ -9505,10 +9505,13 @@ static void test_vidmem_accounting(void) } vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device); @@ -36,10 +36,10 @@ index 66bf5b0..b9ff69c 100644 for (i = 0; i < ARRAY_SIZE(textures); i++) { diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c -index 686c79a..15593ce 100644 +index 2a3514a..637bb6f 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c -@@ -220,6 +220,7 @@ static const struct wined3d_extension_map gl_extension_map[] = +@@ -225,6 +225,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_NV_vertex_program2", NV_VERTEX_PROGRAM2 }, {"GL_NV_vertex_program2_option", NV_VERTEX_PROGRAM2_OPTION }, {"GL_NV_vertex_program3", NV_VERTEX_PROGRAM3 }, @@ -47,7 +47,7 @@ index 686c79a..15593ce 100644 }; static const struct wined3d_extension_map wgl_extension_map[] = -@@ -1002,6 +1003,15 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct +@@ -1007,6 +1008,15 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct TRACE("Card reports vendor PCI ID 0x%04x, device PCI ID 0x%04x, 0x%s bytes of video memory.\n", vendor, device, wine_dbgstr_longlong(*vram_bytes)); } @@ -64,16 +64,12 @@ index 686c79a..15593ce 100644 if (wined3d_settings.pci_vendor_id != PCI_VENDOR_NONE) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 5079113..2788320 100644 +index a89a33d..4ce7031 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -1301,8 +1301,33 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device) +@@ -1308,6 +1308,29 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device - UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device) - { -+ /* const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; */ -+ - TRACE("device %p.\n", device); + driver_info = &device->adapter->driver_info; + /* We can not acquire the context unless there is a swapchain. */ + /* @@ -99,13 +95,13 @@ index 5079113..2788320 100644 + */ + TRACE("Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n", - wine_dbgstr_longlong(device->adapter->vram_bytes), + wine_dbgstr_longlong(driver_info->vram_bytes), wine_dbgstr_longlong(device->adapter->vram_bytes_used), diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h -index 525c298..2fc3348 100644 +index a02073c..6e9e58c 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h -@@ -202,6 +202,7 @@ enum wined3d_gl_extension +@@ -206,6 +206,7 @@ enum wined3d_gl_extension NV_VERTEX_PROGRAM2, NV_VERTEX_PROGRAM2_OPTION, NV_VERTEX_PROGRAM3, @@ -114,5 +110,5 @@ index 525c298..2fc3348 100644 WGL_ARB_PIXEL_FORMAT, WGL_EXT_SWAP_CONTROL, -- -2.7.4 +1.9.1 diff --git a/patches/wined3d-CSMT_Main/definition b/patches/wined3d-CSMT_Main/definition index b443d6c1..c27f797e 100644 --- a/patches/wined3d-CSMT_Main/definition +++ b/patches/wined3d-CSMT_Main/definition @@ -1,6 +1,5 @@ Depends: wined3d-Accounting Depends: wined3d-DXTn -Depends: wined3d-QUERY_Stubs Depends: wined3d-Silence_FIXMEs Depends: wined3d-UAV_Counters Depends: wined3d-Dual_Source_Blending diff --git a/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch b/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch deleted file mode 100644 index c78c85a8..00000000 --- a/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 1c3699443060f0ac1e780fddc38483831235026a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 16 Apr 2016 18:18:54 +0200 -Subject: [PATCH] wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and - QUERY_TYPE_SO_OVERFLOW. - ---- - dlls/d3d10core/tests/d3d10core.c | 4 +- - dlls/d3d11/tests/d3d11.c | 4 +- - dlls/wined3d/query.c | 100 +++++++++++++++++++++++++++++++ - 3 files changed, 104 insertions(+), 4 deletions(-) - -diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c -index 2100a6611e5..1d84cc8e269 100644 ---- a/dlls/d3d10core/tests/d3d10core.c -+++ b/dlls/d3d10core/tests/d3d10core.c -@@ -4322,8 +4322,8 @@ static void test_create_query(void) - {D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE}, - {D3D10_QUERY_PIPELINE_STATISTICS, FALSE, FALSE}, - {D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE}, -- {D3D10_QUERY_SO_STATISTICS, FALSE, TRUE}, -- {D3D10_QUERY_SO_OVERFLOW_PREDICATE, TRUE, TRUE}, -+ {D3D10_QUERY_SO_STATISTICS, FALSE, FALSE}, -+ {D3D10_QUERY_SO_OVERFLOW_PREDICATE, TRUE, FALSE}, - }; - - ULONG refcount, expected_refcount; -diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index c499c8401e4..c688ad4f7e5 100644 ---- a/dlls/d3d11/tests/d3d11.c -+++ b/dlls/d3d11/tests/d3d11.c -@@ -5249,8 +5249,8 @@ static void test_create_query(void) - {D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, - {D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, - {D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, -- {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE}, -- {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, TRUE}, -+ {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, -+ {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, - {D3D11_QUERY_SO_STATISTICS_STREAM0, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE}, - {D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE}, - {D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE}, -diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c -index 01e6bcb9905..1eb35306b9a 100644 ---- a/dlls/wined3d/query.c -+++ b/dlls/wined3d/query.c -@@ -920,6 +920,34 @@ static BOOL wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD - return poll; - } - -+static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags) -+{ -+ TRACE("query %p, flags %#x.\n", query, flags); -+ -+ return TRUE; -+} -+ -+static BOOL wined3d_statistics_query_ops_issue(struct wined3d_query *query, DWORD flags) -+{ -+ FIXME("query %p, flags %#x.\n", query, flags); -+ -+ return FALSE; -+} -+ -+static BOOL wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWORD flags) -+{ -+ TRACE("query %p, flags %#x.\n", query, flags); -+ -+ return TRUE; -+} -+ -+static BOOL wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD flags) -+{ -+ FIXME("query %p, flags %#x.\n", query, flags); -+ -+ return FALSE; -+} -+ - static void wined3d_event_query_ops_destroy(struct wined3d_query *query) - { - struct wined3d_event_query *event_query = wined3d_event_query_from_query(query); -@@ -1204,6 +1232,72 @@ static HRESULT wined3d_pipeline_query_create(struct wined3d_device *device, - return WINED3D_OK; - } - -+static void wined3d_statistics_query_ops_destroy(struct wined3d_query *query) -+{ -+ HeapFree(GetProcessHeap(), 0, query); -+} -+ -+static const struct wined3d_query_ops statistics_query_ops = -+{ -+ wined3d_statistics_query_ops_poll, -+ wined3d_statistics_query_ops_issue, -+ wined3d_statistics_query_ops_destroy, -+}; -+ -+static HRESULT wined3d_statistics_query_create(struct wined3d_device *device, -+ enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, -+ struct wined3d_query **query) -+{ -+ static const struct wined3d_query_data_so_statistics statistics = { 1, 1 }; -+ struct wined3d_query *object; -+ -+ FIXME("device %p, type %#x, parent %p, query %p.\n", device, type, parent, query); -+ -+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) -+ return E_OUTOFMEMORY; -+ -+ wined3d_query_init(object, device, type, &statistics, -+ sizeof(statistics), &statistics_query_ops, parent, parent_ops); -+ -+ TRACE("Created query %p.\n", object); -+ *query = object; -+ -+ return WINED3D_OK; -+} -+ -+static void wined3d_overflow_query_ops_destroy(struct wined3d_query *query) -+{ -+ HeapFree(GetProcessHeap(), 0, query); -+} -+ -+static const struct wined3d_query_ops overflow_query_ops = -+{ -+ wined3d_overflow_query_ops_poll, -+ wined3d_overflow_query_ops_issue, -+ wined3d_overflow_query_ops_destroy, -+}; -+ -+static HRESULT wined3d_overflow_query_create(struct wined3d_device *device, -+ enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, -+ struct wined3d_query **query) -+{ -+ static const BOOL overflow = FALSE; -+ struct wined3d_query *object; -+ -+ FIXME("device %p, type %#x, parent %p, query %p.\n", device, type, parent, query); -+ -+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) -+ return E_OUTOFMEMORY; -+ -+ wined3d_query_init(object, device, type, &overflow, -+ sizeof(overflow), &overflow_query_ops, parent, parent_ops); -+ -+ TRACE("Created query %p.\n", object); -+ *query = object; -+ -+ return WINED3D_OK; -+} -+ - HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type, - void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query) - { -@@ -1234,6 +1328,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q - case WINED3D_QUERY_TYPE_PIPELINE_STATISTICS: - return wined3d_pipeline_query_create(device, type, parent, parent_ops, query); - -+ case WINED3D_QUERY_TYPE_SO_STATISTICS: -+ return wined3d_statistics_query_create(device, type, parent, parent_ops, query); -+ -+ case WINED3D_QUERY_TYPE_SO_OVERFLOW: -+ return wined3d_overflow_query_create(device, type, parent, parent_ops, query); -+ - default: - FIXME("Unhandled query type %#x.\n", type); - return WINED3DERR_NOTAVAILABLE; --- -2.18.0 - diff --git a/patches/wined3d-QUERY_Stubs/definition b/patches/wined3d-QUERY_Stubs/definition deleted file mode 100644 index 2ee018d3..00000000 --- a/patches/wined3d-QUERY_Stubs/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW