mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
vo_gpu/d3d11: add an option for the adapter name
Set it from the adapter name in the d3d11 options.
This commit is contained in:
parent
8163906299
commit
e6447e2e89
@ -314,6 +314,7 @@ static bool d3d11_init(struct ra_ctx *ctx)
|
|||||||
.force_warp = p->opts->warp == 1,
|
.force_warp = p->opts->warp == 1,
|
||||||
.max_feature_level = p->opts->feature_level,
|
.max_feature_level = p->opts->feature_level,
|
||||||
.max_frame_latency = ctx->vo->opts->swapchain_depth,
|
.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))
|
if (!mp_d3d11_create_present_device(ctx->log, &dopts, &p->device))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -52,6 +52,11 @@ struct d3d11_device_opts {
|
|||||||
// not supported, device creation will fail.
|
// not supported, device creation will fail.
|
||||||
// If unset, defaults to D3D_FEATURE_LEVEL_9_1
|
// If unset, defaults to D3D_FEATURE_LEVEL_9_1
|
||||||
int min_feature_level;
|
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,
|
bool mp_d3d11_create_present_device(struct mp_log *log,
|
||||||
|
Loading…
Reference in New Issue
Block a user