Signed-off-by: Paul Gofman gofmanp@gmail.com --- dlls/wined3d/adapter_gl.c | 2 ++ dlls/wined3d/surface.c | 15 ++++++++++++++- dlls/wined3d/wined3d_gl.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 6e60c5323e..ee091a9b77 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -206,6 +206,8 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_EXT_texture_snorm", EXT_TEXTURE_SNORM }, {"GL_EXT_texture_sRGB", EXT_TEXTURE_SRGB }, {"GL_EXT_texture_sRGB_decode", EXT_TEXTURE_SRGB_DECODE }, + {"GL_EXT_framebuffer_multisample_blit_scaled", + EXT_FRAMEBUFFER_MULTISAMPLE_BLIT_SCALED}, {"GL_EXT_texture_swizzle", ARB_TEXTURE_SWIZZLE }, {"GL_EXT_vertex_array_bgra", ARB_VERTEX_ARRAY_BGRA },
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 6c9f6e46e1..27eeccf04a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -185,7 +185,20 @@ void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_context *co dst_location = WINED3D_LOCATION_RB_RESOLVED;
if (wined3d_texture_gl_is_multisample_location(wined3d_texture_gl(src_texture), src_location)) - src_location = WINED3D_LOCATION_RB_RESOLVED; + { + if (src_texture->resource.format->id == dst_texture->resource.format->id + && wined3d_context_gl(context)->gl_info->supported[EXT_FRAMEBUFFER_MULTISAMPLE_BLIT_SCALED]) + { + if (gl_filter == GL_NEAREST) + gl_filter = GL_SCALED_RESOLVE_FASTEST_EXT; + else + gl_filter = GL_SCALED_RESOLVE_NICEST_EXT; + } + else + { + src_location = WINED3D_LOCATION_RB_RESOLVED; + } + } }
/* Make sure the locations are up-to-date. Loading the destination diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 3372b4b6be..2d838d7f84 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -185,6 +185,7 @@ enum wined3d_gl_extension EXT_TEXTURE_SNORM, EXT_TEXTURE_SRGB, EXT_TEXTURE_SRGB_DECODE, + EXT_FRAMEBUFFER_MULTISAMPLE_BLIT_SCALED, /* NVIDIA */ NV_FENCE, NV_FOG_DISTANCE,