Henri Verbeet : wined3d: Require a valid source rectangle in surface_upload_from_surface().
Module: wine Branch: master Commit: 2310378042e50690adc130129a69ec6907035cc8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2310378042e50690adc130129a... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 10 23:47:35 2017 +0200 wined3d: Require a valid source rectangle in surface_upload_from_surface(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index dfb083d..d809282 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -859,13 +859,6 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w } } -static BOOL wined3d_surface_check_rect_dimensions(struct wined3d_surface *surface, const RECT *rect) -{ - struct wined3d_box box = {rect->left, rect->top, rect->right, rect->bottom, 0, 1}; - - return SUCCEEDED(wined3d_texture_check_box_dimensions(surface->container, surface->texture_level, &box)); -} - static HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) { @@ -878,25 +871,11 @@ static HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, struct wined3d_context *context; struct wined3d_bo_address data; UINT update_w, update_h; - RECT r; TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n", dst_surface, wine_dbgstr_point(dst_point), src_surface, wine_dbgstr_rect(src_rect)); - if (!src_rect) - { - SetRect(&r, 0, 0, wined3d_texture_get_level_width(src_texture, src_surface->texture_level), - wined3d_texture_get_level_height(src_texture, src_surface->texture_level)); - src_rect = &r; - } - - if (!wined3d_surface_check_rect_dimensions(src_surface, src_rect)) - { - WARN("Source rectangle not block-aligned.\n"); - return WINED3DERR_INVALIDCALL; - } - context = context_acquire(dst_texture->resource.device, NULL, 0); gl_info = context->gl_info;
participants (1)
-
Alexandre Julliard