[PATCH 3/8] wined3d: Add registry setting to enable multisample textures.
Józef Kucia
jkucia at codeweavers.com
Fri Feb 9 06:03:22 CST 2018
The registry key helps to add multisample textures support incrementally
without breaking the current support for multisample renderbuffers. It
might be also useful to have a possibility to disable multisample
textures when they are the default code path for multisampling in
wined3d.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
Multisample textures provide a superset of functionality in comparision
to multisample renderbuffers. The plan is to use multisample textures by
default, and prefer them to multisample renderbuffers.
---
dlls/wined3d/directx.c | 2 ++
dlls/wined3d/wined3d_main.c | 3 +++
dlls/wined3d/wined3d_private.h | 1 +
3 files changed, 6 insertions(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 1be6d2bce9a9..6dee5ed234fe 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -4244,6 +4244,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
WARN("Disabling ARB_draw_indirect because ARB_base_instance is not supported.\n");
gl_info->supported[ARB_DRAW_INDIRECT] = FALSE;
}
+ if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE] && !wined3d_settings.multisample_textures)
+ gl_info->supported[ARB_TEXTURE_MULTISAMPLE] = FALSE;
wined3d_adapter_init_limits(gl_info);
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 28a34a71b6f4..d3d3f2d5a227 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -81,6 +81,7 @@ struct wined3d_settings wined3d_settings =
PCI_DEVICE_NONE,/* PCI Device ID */
0, /* The default of memory is set in init_driver_info */
NULL, /* No wine logo by default */
+ FALSE, /* Prefer multisample renderbuffers to multisample textures by default. */
~0u, /* Don't force a specific sample count by default. */
FALSE, /* No strict draw ordering. */
FALSE, /* Don't range check relative addressing indices in float constants. */
@@ -284,6 +285,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
if (!wined3d_settings.logo) ERR("Failed to allocate logo path memory.\n");
else memcpy(wined3d_settings.logo, buffer, len);
}
+ if (!get_config_key_dword(hkey, appkey, "MultisampleTextures", &wined3d_settings.multisample_textures))
+ ERR_(winediag)("Setting multisample textures to %#x.\n", wined3d_settings.multisample_textures);
if (!get_config_key_dword(hkey, appkey, "SampleCount", &wined3d_settings.sample_count))
ERR_(winediag)("Forcing sample count to %u. This may not be compatible with all applications.\n",
wined3d_settings.sample_count);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e2527f2a224a..915e10d42d4c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -391,6 +391,7 @@ struct wined3d_settings
/* Memory tracking and object counting. */
UINT64 emulated_textureram;
char *logo;
+ unsigned int multisample_textures;
unsigned int sample_count;
BOOL strict_draw_ordering;
BOOL check_float_constants;
--
2.13.6
More information about the wine-devel
mailing list