diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3f52300de44..019b415873a 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -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; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c6d5a5adddd..85ad4a40d3e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -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.