2015-08-25 13:44:50 -07:00
|
|
|
From 20c5727bab6314d9d788f5b782cf8f5d1b6fc281 Mon Sep 17 00:00:00 2001
|
2015-02-27 15:36:25 -08:00
|
|
|
From: Austin English <austinenglish@gmail.com>
|
|
|
|
Date: Sat, 28 Feb 2015 00:34:07 +0100
|
|
|
|
Subject: wined3d: Allow to specify multisampling AA quality levels via
|
|
|
|
registry.
|
|
|
|
|
|
|
|
---
|
2015-08-25 13:44:50 -07:00
|
|
|
dlls/wined3d/directx.c | 7 ++++++-
|
2015-02-27 15:36:25 -08:00
|
|
|
dlls/wined3d/wined3d_main.c | 12 ++++++++++++
|
|
|
|
dlls/wined3d/wined3d_private.h | 1 +
|
2015-08-25 13:44:50 -07:00
|
|
|
3 files changed, 19 insertions(+), 1 deletion(-)
|
2015-02-27 15:36:25 -08:00
|
|
|
|
|
|
|
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
2015-08-25 13:44:50 -07:00
|
|
|
index 019b415..b9eb03c 100644
|
2015-02-27 15:36:25 -08:00
|
|
|
--- a/dlls/wined3d/directx.c
|
|
|
|
+++ b/dlls/wined3d/directx.c
|
2015-08-25 13:44:50 -07:00
|
|
|
@@ -4404,7 +4404,12 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
|
2015-02-27 15:36:25 -08:00
|
|
|
|
|
|
|
if (quality_levels)
|
|
|
|
{
|
|
|
|
- if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
|
|
|
|
+ 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;
|
|
|
|
else
|
|
|
|
*quality_levels = 1;
|
|
|
|
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
|
2015-08-25 13:44:50 -07:00
|
|
|
index 0543d97..c985c2d 100644
|
2015-02-27 15:36:25 -08:00
|
|
|
--- a/dlls/wined3d/wined3d_main.c
|
|
|
|
+++ b/dlls/wined3d/wined3d_main.c
|
2015-08-25 13:44:50 -07:00
|
|
|
@@ -77,6 +77,7 @@ struct wined3d_settings wined3d_settings =
|
2015-02-27 15:36:25 -08:00
|
|
|
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. */
|
2015-08-25 13:44:50 -07:00
|
|
|
@@ -261,6 +262,17 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
|
2015-02-27 15:36:25 -08:00
|
|
|
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
|
2015-08-25 13:44:50 -07:00
|
|
|
index 7847557..9e39dd7 100644
|
2015-02-27 15:36:25 -08:00
|
|
|
--- a/dlls/wined3d/wined3d_private.h
|
|
|
|
+++ b/dlls/wined3d/wined3d_private.h
|
2015-08-25 13:44:50 -07:00
|
|
|
@@ -268,6 +268,7 @@ struct wined3d_settings
|
2015-02-27 15:36:25 -08:00
|
|
|
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;
|
|
|
|
--
|
2015-08-25 13:44:50 -07:00
|
|
|
2.5.0
|
2015-02-27 15:36:25 -08:00
|
|
|
|