diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index d7b2af11316..55639828a4b 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -499,8 +499,8 @@ static HRESULT d3d_texture2d_init(struct d3d_texture2d *texture, struct d3d_devi return E_FAIL; } - hr = IWineDXGIDevice_create_surface(wine_device, wined3d_texture_get_resource(texture->wined3d_texture), - 0, NULL, (IUnknown *)&texture->ID3D10Texture2D_iface, (void **)&texture->dxgi_surface); + hr = IWineDXGIDevice_create_surface(wine_device, texture->wined3d_texture, 0, NULL, + (IUnknown *)&texture->ID3D10Texture2D_iface, (void **)&texture->dxgi_surface); IWineDXGIDevice_Release(wine_device); if (FAILED(hr)) { diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index 2486204c8e4..f548ca2ce6f 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -279,14 +279,14 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetMaximumFrameLatency(IWineDXGIDev /* IWineDXGIDevice methods */ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *iface, - struct wined3d_resource *wined3d_resource, DXGI_USAGE usage, + struct wined3d_texture *wined3d_texture, DXGI_USAGE usage, const DXGI_SHARED_RESOURCE *shared_resource, IUnknown *outer, void **surface) { struct dxgi_surface *object; HRESULT hr; - TRACE("iface %p, wined3d_resource %p, usage %#x, shared_resource %p, outer %p, surface %p.\n", - iface, wined3d_resource, usage, shared_resource, outer, surface); + TRACE("iface %p, wined3d_texture %p, usage %#x, shared_resource %p, outer %p, surface %p.\n", + iface, wined3d_texture, usage, shared_resource, outer, surface); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) { @@ -294,7 +294,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa return E_OUTOFMEMORY; } - if (FAILED(hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer, wined3d_resource))) + if (FAILED(hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer, wined3d_texture))) { WARN("Failed to initialize surface, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index b417470c77e..86ba34a32d6 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -183,11 +183,11 @@ struct dxgi_surface LONG refcount; struct wined3d_private_store private_store; IDXGIDevice *device; - struct wined3d_resource *wined3d_resource; + struct wined3d_texture *wined3d_texture; }; HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device, - IUnknown *outer, struct wined3d_resource *wined3d_resource) DECLSPEC_HIDDEN; + IUnknown *outer, struct wined3d_texture *wined3d_texture) DECLSPEC_HIDDEN; D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory, struct dxgi_adapter *adapter, const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count) DECLSPEC_HIDDEN; diff --git a/dlls/dxgi/surface.c b/dlls/dxgi/surface.c index ba957583936..687caaa9a23 100644 --- a/dlls/dxgi/surface.c +++ b/dlls/dxgi/surface.c @@ -170,7 +170,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDesc(IDXGISurface1 *iface, DXGI TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - wined3d_resource_get_desc(surface->wined3d_resource, &wined3d_desc); + wined3d_resource_get_desc(wined3d_texture_get_resource(surface->wined3d_texture), &wined3d_desc); wined3d_mutex_unlock(); desc->Width = wined3d_desc.width; desc->Height = wined3d_desc.height; @@ -240,7 +240,7 @@ static const struct IUnknownVtbl dxgi_surface_inner_unknown_vtbl = }; HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device, - IUnknown *outer, struct wined3d_resource *wined3d_resource) + IUnknown *outer, struct wined3d_texture *wined3d_texture) { surface->IDXGISurface1_iface.lpVtbl = &dxgi_surface_vtbl; surface->IUnknown_iface.lpVtbl = &dxgi_surface_inner_unknown_vtbl; @@ -248,7 +248,7 @@ HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device, wined3d_private_store_init(&surface->private_store); surface->outer_unknown = outer ? outer : &surface->IUnknown_iface; surface->device = device; - surface->wined3d_resource = wined3d_resource; + surface->wined3d_texture = wined3d_texture; return S_OK; } diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl index d9f6677accb..a4f715b6076 100644 --- a/include/wine/winedxgi.idl +++ b/include/wine/winedxgi.idl @@ -28,7 +28,7 @@ import "dxgi.idl"; interface IWineDXGIDevice : IDXGIDevice1 { HRESULT create_surface( - [in] struct wined3d_resource *wined3d_resource, + [in] struct wined3d_texture *wined3d_texture, [in] DXGI_USAGE usage, [in] const DXGI_SHARED_RESOURCE *shared_resource, [in] IUnknown *outer,