From ea51e1f1073a5bee670a0eed0df70d2eff49e666 Mon Sep 17 00:00:00 2001 From: Riccardo Bortolato Date: Mon, 12 Oct 2015 12:44:09 +0200 Subject: [PATCH] d3d8: Don't use a wined3d_surface in d3d8_surface_GetDesc. Signed-off-by: Riccardo Bortolato Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d8/surface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index 75deac3377c..165e048ef7e 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -176,13 +176,13 @@ static HRESULT WINAPI d3d8_surface_GetDesc(IDirect3DSurface8 *iface, D3DSURFACE_ { struct d3d8_surface *surface = impl_from_IDirect3DSurface8(iface); struct wined3d_resource_desc wined3d_desc; - struct wined3d_resource *wined3d_resource; + struct wined3d_resource *sub_resource; TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - wined3d_resource = wined3d_surface_get_resource(surface->wined3d_surface); - wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); + sub_resource = wined3d_texture_get_sub_resource(surface->wined3d_texture, surface->sub_resource_idx); + wined3d_resource_get_desc(sub_resource, &wined3d_desc); wined3d_mutex_unlock(); desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);