From cb127e7145a0a0bd508cd7cc51468502f2fe567e Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 17 Apr 2016 19:07:50 +0200 Subject: [PATCH] wined3d: Use the texture dimension helpers in device_clear_render_targets(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b1d8631fd81..149234bc9da 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -343,8 +343,10 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c else { render_offscreen = TRUE; - drawable_width = depth_stencil->pow2Width; - drawable_height = depth_stencil->pow2Height; + drawable_width = wined3d_texture_get_level_pow2_width(depth_stencil->container, + depth_stencil->texture_level); + drawable_height = wined3d_texture_get_level_pow2_height(depth_stencil->container, + depth_stencil->texture_level); } if (depth_stencil && render_offscreen)