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 new file mode 100644 index 00000000..3adbb94b --- /dev/null +++ b/patches/kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch @@ -0,0 +1,94 @@ +From 4eee0f21a8b18a784ec6e2978379937d3f5b190d 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. + +--- + .../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(-) + +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 +--- 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 @@ + @ stub PathCchCanonicalize + @ stub PathCchCanonicalizeEx + @ stub PathCchCombine +-@ stub PathCchCombineEx ++@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx + @ stub PathCchFindExtension + @ stub PathCchIsRoot + @ stub PathCchRemoveBackslash +diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in +index a7db45e..78c19bd 100644 +--- a/dlls/kernelbase/Makefile.in ++++ b/dlls/kernelbase/Makefile.in +@@ -1,4 +1,6 @@ +-MODULE = kernelbase.dll ++MODULE = kernelbase.dll ++IMPORTLIB = kernelbase ++IMPORTS = shlwapi + + C_SRCS = \ + main.c \ +diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec +index eafe5ab..78ab086 100644 +--- a/dlls/kernelbase/kernelbase.spec ++++ b/dlls/kernelbase/kernelbase.spec +@@ -1037,7 +1037,7 @@ + # @ stub PathCchCanonicalize + # @ stub PathCchCanonicalizeEx + # @ stub PathCchCombine +-# @ stub PathCchCombineEx ++@ stdcall PathCchCombineEx(ptr long ptr ptr long) + # @ stub PathCchFindExtension + # @ stub PathCchIsRoot + # @ stub PathCchRemoveBackslash +diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c +index 373c34e..52ef7d9 100644 +--- a/dlls/kernelbase/path.c ++++ b/dlls/kernelbase/path.c +@@ -21,6 +21,7 @@ + #include "windef.h" + #include "winbase.h" + #include "pathcch.h" ++#include "shlwapi.h" + #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; + } ++ ++/*********************************************************************** ++ * PathCchCombineEx (KERNELBASE.@) ++ */ ++HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags) ++{ ++ WCHAR result[MAX_PATH]; ++ ++ FIXME("(%p, %lu, %s, %s, %x): semi-stub\n", out, size, wine_dbgstr_w(path1), wine_dbgstr_w(path2), flags); ++ ++ if (!out || !size) return E_INVALIDARG; ++ if (flags) FIXME("Flags %x not supported\n", flags); ++ ++ if (!PathCombineW(result, path1, path2)) ++ return E_INVALIDARG; ++ ++ if (strlenW(result) + 1 > size) ++ { ++ out[0] = 0; ++ return STRSAFE_E_INSUFFICIENT_BUFFER; ++ } ++ ++ strcpyW(out, result); ++ return S_OK; ++} +-- +2.7.4 + diff --git a/patches/kernelbase-PathCchCombineEx/definition b/patches/kernelbase-PathCchCombineEx/definition new file mode 100644 index 00000000..22110c1b --- /dev/null +++ b/patches/kernelbase-PathCchCombineEx/definition @@ -0,0 +1 @@ +Fixes: [42474] Implement kernelbase.PathCchCombineEx diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index da312072..ce025439 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -194,6 +194,7 @@ patch_enable_all () enable_kernel32_SetFileCompletionNotificationModes="$1" enable_kernel32_TimezoneInformation_Registry="$1" enable_kernel32_UmsStubs="$1" + enable_kernelbase_PathCchCombineEx="$1" enable_krnl386_exe16_GDT_LDT_Emulation="$1" enable_krnl386_exe16_Invalid_Console_Handles="$1" enable_krnl386_exe16__lclose16="$1" @@ -807,6 +808,9 @@ patch_enable () kernel32-UmsStubs) enable_kernel32_UmsStubs="$2" ;; + kernelbase-PathCchCombineEx) + enable_kernelbase_PathCchCombineEx="$2" + ;; krnl386.exe16-GDT_LDT_Emulation) enable_krnl386_exe16_GDT_LDT_Emulation="$2" ;; @@ -1482,6 +1486,9 @@ patch_enable () wined3d-UAV_Counters) enable_wined3d_UAV_Counters="$2" ;; + wined3d-Viewports) + enable_wined3d_Viewports="$2" + ;; wined3d-WINED3DFMT_R32G32_UINT) enable_wined3d_WINED3DFMT_R32G32_UINT="$2" ;; @@ -2091,6 +2098,19 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then enable_wined3d_UAV_Counters=1 fi +if test "$enable_wined3d_Dual_Source_Blending" -eq 1; then + if test "$enable_wined3d_Viewports" -gt 1; then + abort "Patchset wined3d-Viewports disabled, but wined3d-Dual_Source_Blending depends on that." + fi + enable_wined3d_Viewports=1 +fi + +if test "$enable_wined3d_Viewports" -eq 1; then + if test "$enable_wined3d_Core_Context" -gt 1; then + abort "Patchset wined3d-Core_Context disabled, but wined3d-Viewports depends on that." + fi + enable_wined3d_Core_Context=1 +fi if test "$enable_wined3d_Core_Context" -eq 1; then if test "$enable_d3d11_Depth_Bias" -gt 1; then @@ -4945,6 +4965,22 @@ if test "$enable_kernel32_TimezoneInformation_Registry" -eq 1; then ) >> "$patchlist" fi +# Patchset kernelbase-PathCchCombineEx +# | +# | This patchset fixes the following Wine bugs: +# | * [#42474] Implement kernelbase.PathCchCombineEx +# | +# | Modified files: +# | * dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec, dlls/kernelbase/Makefile.in, +# | dlls/kernelbase/kernelbase.spec, dlls/kernelbase/path.c +# | +if test "$enable_kernelbase_PathCchCombineEx" -eq 1; then + patch_apply kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch + ( + printf '%s\n' '+ { "Michael Müller", "kernelbase: Add semi-stub for PathCchCombineEx.", 1 },'; + ) >> "$patchlist" +fi + # Patchset krnl386.exe16-GDT_LDT_Emulation # | # | This patchset fixes the following Wine bugs: @@ -8620,7 +8656,7 @@ fi # | * d3d11-Depth_Bias # | # | Modified files: -# | * dlls/dxgi/factory.c, include/wine/wined3d.h +# | * dlls/dxgi/factory.c, dlls/wined3d/directx.c, include/wine/wined3d.h # | if test "$enable_wined3d_Core_Context" -eq 1; then patch_apply wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch @@ -8629,12 +8665,28 @@ if test "$enable_wined3d_Core_Context" -eq 1; then ) >> "$patchlist" fi -# Patchset wined3d-Dual_Source_Blending +# Patchset wined3d-Viewports # | # | This patchset has the following (direct or indirect) dependencies: # | * d3d11-Depth_Bias, wined3d-Core_Context # | # | Modified files: +# | * dlls/d3d11/tests/d3d11.c, dlls/d3d8/directx.c, dlls/d3d9/directx.c, dlls/ddraw/ddraw_private.h, dlls/wined3d/state.c, +# | include/wine/wined3d.h +# | +if test "$enable_wined3d_Viewports" -eq 1; then + patch_apply wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch + ( + printf '%s\n' '+ { "Michael Müller", "wined3d: Allow arbitrary viewports for d3d11.", 1 },'; + ) >> "$patchlist" +fi + +# Patchset wined3d-Dual_Source_Blending +# | +# | This patchset has the following (direct or indirect) dependencies: +# | * d3d11-Depth_Bias, wined3d-Core_Context, wined3d-Viewports +# | +# | Modified files: # | * dlls/d3d11/tests/d3d11.c, dlls/wined3d/context.c, dlls/wined3d/directx.c, dlls/wined3d/glsl_shader.c, # | dlls/wined3d/shader.c, dlls/wined3d/state.c, dlls/wined3d/wined3d_private.h # | @@ -8699,7 +8751,7 @@ fi # | This patchset has the following (direct or indirect) dependencies: # | * wined3d-1DTextures, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll- # | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, wined3d-DXTn, d3d11-Depth_Bias, wined3d-Core_Context, -# | wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters +# | wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters # | # | Modified files: # | * configure.ac, dlls/wined3d-csmt/Makefile.in, dlls/wined3d-csmt/version.rc @@ -8865,7 +8917,7 @@ fi # | This patchset has the following (direct or indirect) dependencies: # | * wined3d-1DTextures, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll- # | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, wined3d-DXTn, d3d11-Depth_Bias, wined3d-Core_Context, -# | wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters, +# | wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters, # | wined3d-CSMT_Helper # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 26c2a869..7327d086 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -160,7 +160,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -1215,6 +1215,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) +@@ -1212,6 +1212,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) wine_rb_clear(&device->samplers, device_free_sampler, NULL); @@ -170,7 +170,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_device_delete_opengl_contexts(device); if (device->fb.depth_stencil) -@@ -4211,6 +4214,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev +@@ -4208,6 +4211,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev return WINED3DERR_INVALIDCALL; } @@ -178,7 +178,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (dst_texture->sub_resources[dst_sub_resource_idx].map_count) { WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx); -@@ -4221,6 +4225,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev +@@ -4218,6 +4222,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev { WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx); return WINED3DERR_INVALIDCALL; @@ -198,7 +198,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } if (!src_box) -@@ -4322,8 +4339,10 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str +@@ -4319,8 +4336,10 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str return; } @@ -209,7 +209,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); } -@@ -5323,3 +5342,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -5320,3 +5339,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL else return CallWindowProcA(proc, window, message, wparam, lparam); } @@ -576,7 +576,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2895,6 +2895,16 @@ struct wined3d_dummy_textures +@@ -2898,6 +2898,16 @@ struct wined3d_dummy_textures GLuint tex_2d_ms_array; }; @@ -593,7 +593,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h #define WINED3D_UNMAPPED_STAGE ~0u /* Multithreaded flag. Removed from the public header to signal that -@@ -2995,6 +3005,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -2998,6 +3008,12 @@ 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; @@ -606,7 +606,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -3194,7 +3210,11 @@ struct wined3d_texture +@@ -3197,7 +3213,11 @@ struct wined3d_texture unsigned int map_count; DWORD locations; @@ -618,7 +618,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h } sub_resources[1]; }; -@@ -3519,6 +3539,9 @@ struct wined3d_cs_queue +@@ -3522,6 +3542,9 @@ struct wined3d_cs_queue struct wined3d_cs_ops { diff --git a/patches/wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch b/patches/wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch index b98759f0..04a95d25 100644 --- a/patches/wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch +++ b/patches/wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch @@ -1,39 +1,80 @@ -From 844796a26ebe527847f1c1a46c1a1cf8ec9c29b1 Mon Sep 17 00:00:00 2001 +From e9287323cc0cb911c4cfae5410d1f8e3e44eeb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 9 Jul 2017 17:04:05 +0200 Subject: wined3d: Use OpenGL core context for D3D10/11 when necessary. --- dlls/dxgi/factory.c | 2 +- - dlls/wined3d/directx.c | 29 ++++++++++++++++++++++++++--- + dlls/wined3d/directx.c | 23 +++++++++++++++++++++++ include/wine/wined3d.h | 1 + - 3 files changed, 28 insertions(+), 4 deletions(-) + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c -index c218276a220..49c0a10a95d 100644 +index 7fc3279..cc6ba0d 100644 --- a/dlls/dxgi/factory.c +++ b/dlls/dxgi/factory.c -@@ -562,7 +562,7 @@ static HRESULT dxgi_factory_init(struct +@@ -549,7 +549,7 @@ static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended) wined3d_private_store_init(&factory->private_store); wined3d_mutex_lock(); - factory->wined3d = wined3d_create(0); -+ factory->wined3d = wined3d_create(WINED3D_FORWARD_DEPTH_BIAS | WINED3D_REQUEST_D3D10); ++ factory->wined3d = wined3d_create(WINED3D_REQUEST_D3D10); wined3d_mutex_unlock(); if (!factory->wined3d) { +diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c +index 93e4fc3..a2ea3f3 100644 +--- a/dlls/wined3d/directx.c ++++ b/dlls/wined3d/directx.c +@@ -6584,6 +6584,18 @@ static DWORD get_max_gl_version(const struct wined3d_gl_info *gl_info, DWORD fla + return MAKEDWORD_VERSION(4, 4); + } + ++static BOOL has_extension(const char *list, const char *ext) ++{ ++ size_t len = strlen(ext); ++ while (list) ++ { ++ while (*list == ' ') list++; ++ if (!strncmp(list, ext, len) && (!list[len] || list[len] == ' ')) return TRUE; ++ list = strchr(list, ' '); ++ } ++ return FALSE; ++} ++ + static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal, DWORD wined3d_creation_flags) + { + static const DWORD supported_gl_versions[] = +@@ -6642,6 +6654,17 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal, + } + + max_gl_version = get_max_gl_version(gl_info, wined3d_creation_flags); ++ ++ if (wined3d_creation_flags & WINED3D_REQUEST_D3D10) ++ { ++ const char *gl_extensions = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_EXTENSIONS); ++ if (!has_extension(gl_extensions, "GL_ARB_compatibility")) ++ { ++ ERR_(winediag)("GL_ARB_compatibility not supported, requesting context with GL version 3.2.\n"); ++ max_gl_version = MAKEDWORD_VERSION(3, 2); ++ } ++ } ++ + for (i = 0; i < ARRAY_SIZE(supported_gl_versions); ++i) + { + if (supported_gl_versions[i] <= max_gl_version) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 90862d61535..11a5bc4e933 100644 +index 8864965..f555d1d 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -1310,6 +1310,8 @@ enum wined3d_shader_byte_code_format +@@ -1311,6 +1311,7 @@ enum wined3d_shader_byte_code_format #define WINED3D_NO_PRIMITIVE_RESTART 0x00000800 #define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000 #define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000 -+#define WINED3D_FORWARD_DEPTH_BIAS 0x00002000 +#define WINED3D_REQUEST_D3D10 0x00004000 #define WINED3D_RESZ_CODE 0x7fa05000 -- -2.13.1 +2.7.4 + diff --git a/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch b/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch index 3193d49a..a2205462 100644 --- a/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch +++ b/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch @@ -1,4 +1,4 @@ -From d65e13ace614a7fbce7ac65436f0d6b6b9611c17 Mon Sep 17 00:00:00 2001 +From 0fa0ee7e130eb76702db6420a8f78f5b2d391728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 18 Aug 2017 23:22:16 +0200 Subject: [PATCH] d3d11/tests: Add basic dual source blend test. @@ -8,10 +8,10 @@ Subject: [PATCH] d3d11/tests: Add basic dual source blend test. 1 file changed, 169 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 3088bccb71..ff6bf28259 100644 +index c6b9221..ae1e954 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -26010,6 +26010,174 @@ static void test_unbound_multisample_texture(void) +@@ -25392,6 +25392,174 @@ static void test_unbound_multisample_texture(void) release_test_context(&test_context); } @@ -186,8 +186,8 @@ index 3088bccb71..ff6bf28259 100644 START_TEST(d3d11) { unsigned int argc, i; -@@ -26137,6 +26305,7 @@ START_TEST(d3d11) - test_fractional_viewports(); +@@ -25518,6 +25686,7 @@ START_TEST(d3d11) + test_negative_viewports(); test_early_depth_stencil(); test_conservative_depth_output(); + test_dual_blending(); @@ -195,5 +195,5 @@ index 3088bccb71..ff6bf28259 100644 test_clip_distance(); test_combined_clip_and_cull_distances(); -- -2.16.1 +2.7.4 diff --git a/patches/wined3d-Dual_Source_Blending/definition b/patches/wined3d-Dual_Source_Blending/definition index db32d303..943f9691 100644 --- a/patches/wined3d-Dual_Source_Blending/definition +++ b/patches/wined3d-Dual_Source_Blending/definition @@ -1 +1,2 @@ Fixes: Implement dual source blending in wined3d +Depends: wined3d-Viewports \ No newline at end of file diff --git a/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch b/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch index 2eecce88..ea8baf33 100644 --- a/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch +++ b/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch @@ -1,4 +1,4 @@ -From cea7f4b70408dd2ceb7f571b3b2efac2b58a389f Mon Sep 17 00:00:00 2001 +From 2ff2aaf55df96d6dade866d11f273630a2fcbf90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 17 Aug 2017 19:29:30 +0200 Subject: wined3d: Allow arbitrary viewports for d3d11. @@ -8,15 +8,15 @@ Subject: wined3d: Allow arbitrary viewports for d3d11. dlls/d3d8/directx.c | 2 +- dlls/d3d9/directx.c | 2 +- dlls/ddraw/ddraw_private.h | 2 +- - dlls/wined3d/state.c | 23 +++++++++++-------- + dlls/wined3d/state.c | 11 ++++++---- include/wine/wined3d.h | 1 + - 6 files changed, 73 insertions(+), 12 deletions(-) + 6 files changed, 66 insertions(+), 7 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 06708b5f2b4..9795a2c68ba 100644 +index f4abd51..c6b9221 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -23822,6 +23822,60 @@ static void test_fractional_viewports(vo +@@ -23392,6 +23392,60 @@ static void test_fractional_viewports(void) release_test_context(&test_context); } @@ -77,7 +77,7 @@ index 06708b5f2b4..9795a2c68ba 100644 static void test_early_depth_stencil(void) { ID3D11DepthStencilState *depth_stencil_state; -@@ -25805,6 +25859,7 @@ START_TEST(d3d11) +@@ -25461,6 +25515,7 @@ START_TEST(d3d11) test_gather_c(); test_depth_bias(); test_fractional_viewports(); @@ -86,10 +86,10 @@ index 06708b5f2b4..9795a2c68ba 100644 test_conservative_depth_output(); test_format_compatibility(); diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c -index 24bd8315983..491efea31e2 100644 +index 68300c0..6e8f93a 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c -@@ -418,7 +418,7 @@ BOOL d3d8_init(struct d3d8 *d3d8) +@@ -417,7 +417,7 @@ BOOL d3d8_init(struct d3d8 *d3d8) DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING | WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART @@ -99,10 +99,10 @@ index 24bd8315983..491efea31e2 100644 d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl; d3d8->refcount = 1; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c -index fe7163fa88a..c1389529588 100644 +index cdce669..644766c 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c -@@ -579,7 +579,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL e +@@ -579,7 +579,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended) DWORD flags = WINED3D_PRESENT_CONVERSION | WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER | WINED3D_SRGB_READ_WRITE_CONTROL | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART | WINED3D_LEGACY_CUBEMAP_FILTERING @@ -112,10 +112,10 @@ index fe7163fa88a..c1389529588 100644 if (!extended) flags |= WINED3D_VIDMEM_ACCOUNTING; diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h -index 0ae45328709..214c1718694 100644 +index 3cf9b76..d744a5c 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h -@@ -62,7 +62,7 @@ struct FvfToDecl +@@ -65,7 +65,7 @@ struct FvfToDecl #define DDRAW_WINED3D_FLAGS (WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING \ | WINED3D_RESTORE_MODE_ON_ACTIVATE | WINED3D_FOCUS_MESSAGES | WINED3D_PIXEL_CENTER_INTEGER \ | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART \ @@ -125,57 +125,39 @@ index 0ae45328709..214c1718694 100644 enum ddraw_device_state { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index 8b1729de2a3..53be418a623 100644 +index 9753186..486d22a 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c -@@ -4642,11 +4642,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine +@@ -4696,10 +4696,13 @@ static void get_viewport(struct wined3d_context *context, const struct wined3d_s if (target) { -- if (vp.width > target->width) -- vp.width = target->width; -- if (vp.height > target->height) -- vp.height = target->height; -- +- if (viewport->width > target->width) +- viewport->width = target->width; +- if (viewport->height > target->height) +- viewport->height = target->height; + if (context->d3d_info->wined3d_creation_flags & WINED3D_LIMIT_VIEWPORT) + { -+ if (vp.width > target->width) -+ vp.width = target->width; -+ if (vp.height > target->height) -+ vp.height = target->height; ++ if (viewport->width > target->width) ++ viewport->width = target->width; ++ if (viewport->height > target->height) ++ viewport->height = target->height; + } - wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); } - else if (depth_stencil) -@@ -4688,10 +4690,13 @@ static void viewport_miscpart_cc(struct wined3d_context *context, - if (target) - { -- if (vp.width > target->width) -- vp.width = target->width; -- if (vp.height > target->height) -- vp.height = target->height; -+ if (context->d3d_info->wined3d_creation_flags & WINED3D_LIMIT_VIEWPORT) -+ { -+ if (vp.width > target->width) -+ vp.width = target->width; -+ if (vp.height > target->height) -+ vp.height = target->height; -+ } - - wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); - } + /* diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index f468e307b36..4a6b9ff7f3d 100644 +index f555d1d..2184a00 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1312,6 +1312,7 @@ enum wined3d_shader_byte_code_format + #define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000 #define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000 - #define WINED3D_FORWARD_DEPTH_BIAS 0x00002000 #define WINED3D_REQUEST_D3D10 0x00004000 +#define WINED3D_LIMIT_VIEWPORT 0x00008000 #define WINED3D_RESZ_CODE 0x7fa05000 -- -2.14.1 +2.7.4 +