From 302996efaebe7e1b03675bf208f0e274980b5b51 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 2 Feb 2023 19:36:09 -0600 Subject: [PATCH] wined3d: Introduce wined3d_texture_get_swapchain(). --- dlls/wined3d/texture.c | 5 +++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 3 files changed, 7 insertions(+) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 8d416494eb8..33b938ad460 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4313,6 +4313,11 @@ HRESULT CDECL wined3d_texture_update_overlay(struct wined3d_texture *texture, un return WINED3D_OK; } +struct wined3d_swapchain * CDECL wined3d_texture_get_swapchain(struct wined3d_texture *texture) +{ + return texture->swapchain; +} + void * CDECL wined3d_texture_get_sub_resource_parent(struct wined3d_texture *texture, unsigned int sub_resource_idx) { TRACE("texture %p, sub_resource_idx %u.\n", texture, sub_resource_idx); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 827ac295ddc..b22adf07c9c 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -301,6 +301,7 @@ @ cdecl wined3d_texture_get_resource(ptr) @ cdecl wined3d_texture_get_sub_resource_desc(ptr long ptr) @ cdecl wined3d_texture_get_sub_resource_parent(ptr long) +@ cdecl wined3d_texture_get_swapchain(ptr) @ cdecl wined3d_texture_incref(ptr) @ cdecl wined3d_texture_release_dc(ptr long ptr) @ cdecl wined3d_texture_set_color_key(ptr long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f4ec2470bba..5d8a1156b21 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2857,6 +2857,7 @@ struct wined3d_resource * __cdecl wined3d_texture_get_resource(struct wined3d_te HRESULT __cdecl wined3d_texture_get_sub_resource_desc(const struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc); void * __cdecl wined3d_texture_get_sub_resource_parent(struct wined3d_texture *texture, unsigned int sub_resource_idx); +struct wined3d_swapchain * __cdecl wined3d_texture_get_swapchain(struct wined3d_texture *texture); ULONG __cdecl wined3d_texture_incref(struct wined3d_texture *texture); HRESULT __cdecl wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc); HRESULT __cdecl wined3d_texture_set_color_key(struct wined3d_texture *texture,