Commit b471b217 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Handle multisample_quality if type == MULTISAMPLE_NON_MASKABLE.

parent 599d92a2
......@@ -4405,7 +4405,6 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
if (quality_levels)
{
if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
/* FIXME: This is probably wrong. */
*quality_levels = gl_info->limits.samples;
else
*quality_levels = 1;
......
......@@ -2844,12 +2844,25 @@ void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl
{
if (multisample)
{
DWORD samples;
if (surface->rb_multisample)
return;
/* TODO: Nvidia exposes their Coverage Sample Anti-Aliasing (CSAA) feature
* through type == MULTISAMPLE_XX and quality != 0. This could be mapped
* to GL_NV_framebuffer_multisample_coverage.
*
* 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;
else
samples = surface->resource.multisample_type;
gl_info->fbo_ops.glGenRenderbuffers(1, &surface->rb_multisample);
gl_info->fbo_ops.glBindRenderbuffer(GL_RENDERBUFFER, surface->rb_multisample);
gl_info->fbo_ops.glRenderbufferStorageMultisample(GL_RENDERBUFFER, surface->resource.multisample_type,
gl_info->fbo_ops.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
surface->resource.format->glInternal, surface->pow2Width, surface->pow2Height);
checkGLcall("glRenderbufferStorageMultisample()");
TRACE("Created multisample rb %u.\n", surface->rb_multisample);
......@@ -5395,12 +5408,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
unsigned int resource_size;
HRESULT hr;
if (multisample_quality > 0)
{
FIXME("multisample_quality set to %u, substituting 0.\n", multisample_quality);
multisample_quality = 0;
}
/* Quick lockable sanity check.
* TODO: remove this after surfaces, usage and lockability have been debugged properly
* this function is too deep to need to care about things like this.
......
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