Commit b3b91ea5 authored by Andrew Wesie's avatar Andrew Wesie Committed by Alexandre Julliard

wined3d: Implement D3D11_STANDARD_MULTISAMPLE_PATTERN.

parent 649dd129
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment