summaryrefslogtreecommitdiffstats
path: root/video/out/d3d11/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/d3d11/context.c')
-rw-r--r--video/out/d3d11/context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index 72e3447788..bbdf170df1 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -24,6 +24,7 @@
#include "video/out/gpu/d3d11_helpers.h"
#include "video/out/gpu/spirv.h"
#include "video/out/w32_common.h"
+#include "context.h"
#include "ra_d3d11.h"
static int d3d11_validate_adapter(struct mp_log *log,
@@ -526,6 +527,18 @@ error:
return false;
}
+IDXGISwapChain *ra_d3d11_ctx_get_swapchain(struct ra_ctx *ra)
+{
+ if (ra->swapchain->fns != &d3d11_swapchain)
+ return NULL;
+
+ struct priv *p = ra->priv;
+
+ IDXGISwapChain_AddRef(p->swapchain);
+
+ return p->swapchain;
+}
+
const struct ra_ctx_fns ra_ctx_d3d11 = {
.type = "d3d11",
.name = "d3d11",