From e6447e2e8913ee9666617464fc3fa0dfeb3dbb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Sat, 20 Apr 2019 01:28:03 +0300 Subject: vo_gpu/d3d11: add an option for the adapter name Set it from the adapter name in the d3d11 options. --- video/out/d3d11/context.c | 1 + video/out/gpu/d3d11_helpers.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c index aa11f46d59..8359f7ffd2 100644 --- a/video/out/d3d11/context.c +++ b/video/out/d3d11/context.c @@ -314,6 +314,7 @@ static bool d3d11_init(struct ra_ctx *ctx) .force_warp = p->opts->warp == 1, .max_feature_level = p->opts->feature_level, .max_frame_latency = ctx->vo->opts->swapchain_depth, + .adapter_name = p->opts->adapter_name, }; if (!mp_d3d11_create_present_device(ctx->log, &dopts, &p->device)) goto error; diff --git a/video/out/gpu/d3d11_helpers.h b/video/out/gpu/d3d11_helpers.h index 996b93494f..c28afc5405 100644 --- a/video/out/gpu/d3d11_helpers.h +++ b/video/out/gpu/d3d11_helpers.h @@ -52,6 +52,11 @@ struct d3d11_device_opts { // not supported, device creation will fail. // If unset, defaults to D3D_FEATURE_LEVEL_9_1 int min_feature_level; + + // The adapter name to utilize if a specific adapter is required + // If unset, the default adapter will be utilized when creating + // a device. + char *adapter_name; }; bool mp_d3d11_create_present_device(struct mp_log *log, -- cgit v1.2.3