diff --git a/README.md b/README.md index f91b4603..ab118178 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,12 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [9]:** +**Bugfixes and features included in the next upcoming release [10]:** * Add stub for gdiplus.GdipCreateEffect ([Wine Bug #32163](https://bugs.winehq.org/show_bug.cgi?id=32163)) * Add support for CopyFileEx progress callback ([Wine Bug #22692](https://bugs.winehq.org/show_bug.cgi?id=22692)) * Allow to cancel a file operation via progress callback ([Wine Bug #22690](https://bugs.winehq.org/show_bug.cgi?id=22690)) +* Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. ([Wine Bug #12652](https://bugs.winehq.org/show_bug.cgi?id=12652)) * Enforce that surfaces are flushed after ReleaseDC * Fallback to global key state for threads without a queue ([Wine Bug #27238](https://bugs.winehq.org/show_bug.cgi?id=27238)) * Fix race-condition when threads are killed during shutdown diff --git a/debian/changelog b/debian/changelog index 1f75e124..ae28f352 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ wine-staging (1.7.38) UNRELEASED; urgency=low * Added patch to display animations for SHFileOperation progress dialog. * Added patch to enforce that surfaces are flushed after ReleaseDC. * Added patch to implement IProgressDialog::SetAnimation. + * Added patch in order to allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. * Removed patch to properly call DriverUnload when unloading device drivers (accepted upstream). * Removed patch to allow Accept-Encoding for HTTP/1.0 in wininet (accepted upstream). * Removed patch to declare pDirectInputCreateEx in a MSVC compatible way (accepted upstream). diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2f1b1e04..88c03e3b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -197,6 +197,7 @@ patch_enable_all () enable_wined3d_CSMT_Helper="$1" enable_wined3d_CSMT_Main="$1" enable_wined3d_DXTn="$1" + enable_wined3d_Multisampling="$1" enable_wined3d_Revert_PixelFormat="$1" enable_winedevice_Fix_Relocation="$1" enable_winemenubuilder_Desktop_Icon_Path="$1" @@ -625,6 +626,9 @@ patch_enable () wined3d-DXTn) enable_wined3d_DXTn="$2" ;; + wined3d-Multisampling) + enable_wined3d_Multisampling="$2" + ;; wined3d-Revert_PixelFormat) enable_wined3d_Revert_PixelFormat="$2" ;; @@ -1614,6 +1618,21 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-Multisampling +# | +# | This patchset fixes the following Wine bugs: +# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE. +# | +# | Modified files: +# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h +# | +if test "$enable_wined3d_Multisampling" -eq 1; then + patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch + ( + echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-Revert_PixelFormat # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch b/patches/wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch new file mode 100644 index 00000000..8893ca99 --- /dev/null +++ b/patches/wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch @@ -0,0 +1,80 @@ +From 6e90ea5d3a677b1f073effab2eef34edc328075b Mon Sep 17 00:00:00 2001 +From: Austin English +Date: Sat, 28 Feb 2015 00:34:07 +0100 +Subject: wined3d: Allow to specify multisampling AA quality levels via + registry. + +--- + dlls/wined3d/directx.c | 11 +++++++++-- + dlls/wined3d/wined3d_main.c | 12 ++++++++++++ + dlls/wined3d/wined3d_private.h | 1 + + 3 files changed, 22 insertions(+), 2 deletions(-) + +diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c +index 4ca13f4..94a2f7b 100644 +--- a/dlls/wined3d/directx.c ++++ b/dlls/wined3d/directx.c +@@ -4231,9 +4231,16 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3 + + if (quality_levels) + { +- if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE) +- /* FIXME: This is probably wrong. */ ++ if (wined3d_settings.msaa_quality_levels) ++ { ++ *quality_levels = wined3d_settings.msaa_quality_levels; ++ TRACE("Overriding MSAA quality levels to %i\n", *quality_levels); ++ } ++ else if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE) ++ { + *quality_levels = gl_info->limits.samples; ++ WARN("probably wrong, setting quality_levels to %d\n", *quality_levels); ++ } + else + *quality_levels = 1; + } +diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c +index 758ba43..0bf6c9f 100644 +--- a/dlls/wined3d/wined3d_main.c ++++ b/dlls/wined3d/wined3d_main.c +@@ -76,6 +76,7 @@ struct wined3d_settings wined3d_settings = + ORM_FBO, /* Use FBOs to do offscreen rendering */ + PCI_VENDOR_NONE,/* PCI Vendor ID */ + PCI_DEVICE_NONE,/* PCI Device ID */ ++ 0, /* Multisampling AA Quality Levels */ + 0, /* The default of memory is set in init_driver_info */ + NULL, /* No wine logo by default */ + TRUE, /* Multisampling enabled by default. */ +@@ -251,6 +252,17 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) + wined3d_settings.pci_vendor_id = pci_vendor_id; + } + } ++ if (!get_config_key( hkey, appkey, "MultisamplingAAQualityLevels", buffer, size )) ++ { ++ int quality_levels = atoi(buffer); ++ if(quality_levels > 0) ++ { ++ wined3d_settings.msaa_quality_levels = quality_levels; ++ TRACE("Setting MultisamplingAAQualityLevels to %i\n", quality_levels); ++ } ++ else ++ ERR("MultisamplingAAQualityLevels is %i but must be >0\n", quality_levels); ++ } + if ( !get_config_key( hkey, appkey, "VideoMemorySize", buffer, size) ) + { + int TmpVideoMemorySize = atoi(buffer); +diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h +index b0c7a53..2f2511e 100644 +--- a/dlls/wined3d/wined3d_private.h ++++ b/dlls/wined3d/wined3d_private.h +@@ -269,6 +269,7 @@ struct wined3d_settings + unsigned short pci_vendor_id; + unsigned short pci_device_id; + /* Memory tracking and object counting. */ ++ unsigned int msaa_quality_levels; + UINT64 emulated_textureram; + char *logo; + int allow_multisampling; +-- +2.3.0 + diff --git a/patches/wined3d-Multisampling/definition b/patches/wined3d-Multisampling/definition new file mode 100644 index 00000000..ce387043 --- /dev/null +++ b/patches/wined3d-Multisampling/definition @@ -0,0 +1 @@ +Fixes: [12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.