Andrew Wesie : wined3d: Implement D3D11_STANDARD_MULTISAMPLE_PATTERN.
Alexandre Julliard
julliard at winehq.org
Mon Oct 22 15:38:45 CDT 2018
Module: wine
Branch: master
Commit: b3b91ea51d7e2f03be470408abc19be8c3737822
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b3b91ea51d7e2f03be470408abc19be8c3737822
Author: Andrew Wesie <awesie at gmail.com>
Date: Mon Oct 22 14:15:21 2018 +0330
wined3d: Implement D3D11_STANDARD_MULTISAMPLE_PATTERN.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45197
Signed-off-by: Andrew Wesie <awesie at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/texture.c | 8 +++++---
include/wine/wined3d.h | 2 ++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index b8e7ef0..15492cd 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -627,6 +627,8 @@ static void wined3d_texture_allocate_gl_immutable_storage(struct wined3d_texture
unsigned int samples = wined3d_texture_get_gl_sample_count(texture);
GLsizei height = wined3d_texture_get_level_pow2_height(texture, 0);
GLsizei width = wined3d_texture_get_level_pow2_width(texture, 0);
+ GLboolean standard_pattern = texture->resource.multisample_type != WINED3D_MULTISAMPLE_NON_MASKABLE
+ && texture->resource.multisample_quality == WINED3D_STANDARD_MULTISAMPLE_PATTERN;
switch (texture->target)
{
@@ -640,11 +642,11 @@ static void wined3d_texture_allocate_gl_immutable_storage(struct wined3d_texture
break;
case GL_TEXTURE_2D_MULTISAMPLE:
GL_EXTCALL(glTexStorage2DMultisample(texture->target, samples,
- gl_internal_format, width, height, GL_FALSE));
+ gl_internal_format, width, height, standard_pattern));
break;
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
GL_EXTCALL(glTexStorage3DMultisample(texture->target, samples,
- gl_internal_format, width, height, texture->layer_count, GL_FALSE));
+ gl_internal_format, width, height, texture->layer_count, standard_pattern));
break;
case GL_TEXTURE_1D_ARRAY:
GL_EXTCALL(glTexStorage2D(texture->target, texture->level_count,
@@ -3604,7 +3606,7 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
}
if (desc->multisample_type != WINED3D_MULTISAMPLE_NON_MASKABLE
&& (!(format->multisample_types & 1u << (desc->multisample_type - 1))
- || desc->multisample_quality))
+ || (desc->multisample_quality && desc->multisample_quality != WINED3D_STANDARD_MULTISAMPLE_PATTERN)))
{
WARN("Unsupported multisample type %u quality %u requested.\n", desc->multisample_type,
desc->multisample_quality);
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 95549e9..1b3a46e 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1571,6 +1571,8 @@ enum wined3d_shader_type
#define WINED3D_TEXTURE_CREATE_GET_DC 0x00000008
#define WINED3D_TEXTURE_CREATE_GENERATE_MIPMAPS 0x00000010
+#define WINED3D_STANDARD_MULTISAMPLE_PATTERN 0xffffffff
+
#define WINED3D_APPEND_ALIGNED_ELEMENT 0xffffffff
#define WINED3D_OUTPUT_SLOT_SEMANTIC 0xffffffff
More information about the wine-cvs
mailing list