Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41929 Signed-off-by: Paul Gofman gofmanp@gmail.com --- dlls/d3d9/tests/visual.c | 26 +++++++++++++------------- dlls/wined3d/surface.c | 7 ++++--- dlls/wined3d/texture.c | 4 ++++ 3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4fe11ed161..b3f6e0f51c 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -3902,24 +3902,24 @@ static void stretchrect_test(void) {&backbuffer, &src_rect, &surf_tex_rt_dest640_480, &dst_rect_flipy, D3DTEXF_NONE}, /* Test filter. */ {&surf_offscreen64, NULL, &surf_offscreen_dest64, NULL, D3DTEXF_NONE, TRUE}, - {&surf_offscreen64, NULL, &surf_offscreen_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, + {&surf_offscreen64, NULL, &surf_offscreen_dest64, NULL, D3DTEXF_ANISOTROPIC}, {&surf_offscreen32, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_NONE, TRUE}, - {&surf_offscreen32, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_PYRAMIDALQUAD, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_GAUSSIANQUAD, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_CONVOLUTIONMONO, FALSE, TRUE}, - {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, 0xbadf, FALSE, TRUE}, + {&surf_offscreen32, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_PYRAMIDALQUAD}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_GAUSSIANQUAD}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_CONVOLUTIONMONO}, + {&surf_offscreen64, NULL, &surf_tex_rt_dest64, NULL, 0xbadf}, {&surf_tex64, NULL, &surf_rt_dest64, NULL, D3DTEXF_NONE, TRUE}, - {&surf_tex64, NULL, &surf_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, - {&surf_rt64, NULL, &surf_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, + {&surf_tex64, NULL, &surf_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, + {&surf_rt64, NULL, &surf_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, {&surf_tex_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_NONE, TRUE}, - {&surf_tex_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, + {&surf_tex_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, {&surf_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_NONE, TRUE}, - {&surf_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, + {&surf_rt64, NULL, &surf_tex_rt_dest64, NULL, D3DTEXF_ANISOTROPIC}, {&backbuffer, NULL, &surf_tex_rt_dest640_480, NULL, D3DTEXF_NONE, TRUE}, - {&backbuffer, NULL, &surf_tex_rt_dest640_480, NULL, D3DTEXF_ANISOTROPIC, FALSE, TRUE}, + {&backbuffer, NULL, &surf_tex_rt_dest640_480, NULL, D3DTEXF_ANISOTROPIC}, };
window = create_window(); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index b7dd54cb61..2e9bf396b8 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -171,13 +171,14 @@ void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_context *co gl_filter = scaled_resolve ? GL_SCALED_RESOLVE_NICEST_EXT : GL_LINEAR; break;
- default: - FIXME("Unsupported filter mode %s (%#x).\n", debug_d3dtexturefiltertype(filter), filter); - /* fall through */ case WINED3D_TEXF_NONE: case WINED3D_TEXF_POINT: gl_filter = scaled_resolve ? GL_SCALED_RESOLVE_FASTEST_EXT : GL_NEAREST; break; + + default: + assert(0); + break; }
/* Make sure the locations are up-to-date. Loading the destination diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index b663a44fbb..85f09ee348 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3569,6 +3569,10 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned || src_texture->resource.type != WINED3D_RTYPE_TEXTURE_2D) return WINED3DERR_INVALIDCALL;
+ if (filter != WINED3D_TEXF_NONE && filter != WINED3D_TEXF_POINT + && filter != WINED3D_TEXF_LINEAR) + return WINED3DERR_INVALIDCALL; + dst_format_flags = dst_texture->resource.format_flags; if (FAILED(hr = wined3d_texture_check_box_dimensions(dst_texture, dst_sub_resource_idx % dst_texture->level_count, &dst_box)))