From 5b28f7a01cbb112a1936146d3ca1be745eaabafe Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 29 Aug 2015 06:25:20 +0200 Subject: [PATCH] Added patch to fix compile failure in d3d11 with recent versions of gcc. --- debian/changelog | 1 + ...e-failure-with-recent-version-of-gcc.patch | 47 +++++++++++++++++++ patches/patchinstall.sh | 16 +++++++ 3 files changed, 64 insertions(+) create mode 100644 patches/d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch diff --git a/debian/changelog b/debian/changelog index 1fc3f1b3..95802308 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ wine-staging (1.7.51) UNRELEASED; urgency=low repository (fixes Wine Staging Bug #348). * Added patch to return a dummy BIOS name in Win32_BIOS record (fixes Wine Staging Bug #528). + * Added patch to fix compile failure in d3d11 with recent versions of gcc. * Removed patch to fix bug in wineserver debug_children inheritance (accepted upstream). * Removed patch to use helper function for NtWaitForMultipleObjects and diff --git a/patches/d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch b/patches/d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch new file mode 100644 index 00000000..73f3b62b --- /dev/null +++ b/patches/d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch @@ -0,0 +1,47 @@ +From a1747217a5bae6416a157f8bcf9286845364a5fe Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 29 Aug 2015 06:24:21 +0200 +Subject: d3d11: Fix compile failure with recent version of gcc. + +--- + dlls/d3d11/utils.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dlls/d3d11/utils.c b/dlls/d3d11/utils.c +index 307ef23..91de43c 100644 +--- a/dlls/d3d11/utils.c ++++ b/dlls/d3d11/utils.c +@@ -465,10 +465,10 @@ UINT d3d10_cpu_access_flags_from_d3d11_cpu_access_flags(UINT cpu_access_flags) + + UINT d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(UINT resource_misc_flags) + { +- static const UINT bitwise_identical_flags = D3D10_RESOURCE_MISC_GENERATE_MIPS ++ const UINT bitwise_identical_flags = D3D10_RESOURCE_MISC_GENERATE_MIPS + | D3D10_RESOURCE_MISC_SHARED + | D3D10_RESOURCE_MISC_TEXTURECUBE; +- static const UINT handled_flags = bitwise_identical_flags ++ const UINT handled_flags = bitwise_identical_flags + | D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX + | D3D10_RESOURCE_MISC_GDI_COMPATIBLE; + UINT d3d11_resource_misc_flags = resource_misc_flags & bitwise_identical_flags; +@@ -486,7 +486,7 @@ UINT d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(UINT resource_misc + + UINT d3d10_resource_misc_flags_from_d3d11_resource_misc_flags(UINT resource_misc_flags) + { +- static const UINT bitwise_identical_flags = D3D11_RESOURCE_MISC_GENERATE_MIPS ++ const UINT bitwise_identical_flags = D3D11_RESOURCE_MISC_GENERATE_MIPS + | D3D11_RESOURCE_MISC_SHARED + | D3D11_RESOURCE_MISC_TEXTURECUBE + | D3D11_RESOURCE_MISC_BUFFER_STRUCTURED +@@ -496,7 +496,7 @@ UINT d3d10_resource_misc_flags_from_d3d11_resource_misc_flags(UINT resource_misc + | D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE + | D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER + | D3D11_RESOURCE_MISC_GUARDED; +- static const UINT handled_flags = bitwise_identical_flags ++ const UINT handled_flags = bitwise_identical_flags + | D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX + | D3D11_RESOURCE_MISC_GDI_COMPATIBLE; + UINT d3d10_resource_misc_flags = resource_misc_flags & bitwise_identical_flags; +-- +2.5.0 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index dcce8fb1..049332ec 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -94,6 +94,7 @@ patch_enable_all () enable_comctl32_LoadIconMetric="$1" enable_configure_Absolute_RPATH="$1" enable_crypt32_CMS_Certificates="$1" + enable_d3d11_Fix_Compile="$1" enable_d3d9_DesktopWindow="$1" enable_d3d9_Skip_Tests="$1" enable_d3d9_Surface_Refcount="$1" @@ -359,6 +360,9 @@ patch_enable () crypt32-CMS_Certificates) enable_crypt32_CMS_Certificates="$2" ;; + d3d11-Fix_Compile) + enable_d3d11_Fix_Compile="$2" + ;; d3d9-DesktopWindow) enable_d3d9_DesktopWindow="$2" ;; @@ -2240,6 +2244,18 @@ if test "$enable_crypt32_CMS_Certificates" -eq 1; then ) >> "$patchlist" fi +# Patchset d3d11-Fix_Compile +# | +# | Modified files: +# | * dlls/d3d11/utils.c +# | +if test "$enable_d3d11_Fix_Compile" -eq 1; then + patch_apply d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch + ( + echo '+ { "Sebastian Lackner", "d3d11: Fix compile failure with recent version of gcc.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3d9-DesktopWindow # | # | Modified files: