wined3d: Limit the number of WINED3D_MULTISAMPLE_NON_MASKABLE quality levels reported.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2016-01-26 22:51:29 +01:00 committed by Alexandre Julliard
parent 961215b8b8
commit a25c47f59a
2 changed files with 2 additions and 2 deletions

View File

@ -4430,7 +4430,7 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
if (quality_levels)
{
if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
*quality_levels = gl_info->limits.samples;
*quality_levels = wined3d_log2i(gl_info->limits.samples);
else
*quality_levels = 1;
}

View File

@ -2864,7 +2864,7 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
* AMD has a similar feature called Enhanced Quality Anti-Aliasing (EQAA),
* but it does not have an equivalent OpenGL extension. */
if (surface->resource.multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
samples = surface->resource.multisample_quality;
samples = 1u << (surface->resource.multisample_quality + 1);
else
samples = surface->resource.multisample_type;