d3d11/context: implement target_ref_luma
This commit is contained in:
1 parent
069a6f004e
commit
a8a1cdbbbb
1 file changed
+10
@@ -221,6 +221,15 @@ static struct pl_color_space d3d11_target_color_space(struct ra_swapchain *sw)
|
||||
return (struct pl_color_space){0};
|
||||
}
|
||||
|
||||
static float d3d11_target_ref_luma(struct ra_swapchain *sw)
|
||||
{
|
||||
if (sw->ctx->opts.composition)
|
||||
return 0;
|
||||
|
||||
struct priv *p = sw->priv;
|
||||
return mp_dxgi_sdr_white_level_from_hwnd(&p->dxgi_ctx, vo_w32_hwnd(sw->ctx->vo));
|
||||
}
|
||||
|
||||
static bool d3d11_start_frame(struct ra_swapchain *sw, struct ra_fbo *out_fbo)
|
||||
{
|
||||
struct priv *p = sw->priv;
|
||||
@@ -486,6 +495,7 @@ static void d3d11_uninit(struct ra_ctx *ctx)
|
||||
static const struct ra_swapchain_fns d3d11_swapchain = {
|
||||
.color_depth = d3d11_color_depth,
|
||||
.target_csp = d3d11_target_color_space,
|
||||
.target_ref_luma = d3d11_target_ref_luma,
|
||||
.start_frame = d3d11_start_frame,
|
||||
.submit_frame = d3d11_submit_frame,
|
||||
.swap_buffers = d3d11_swap_buffers,
|
||||
|
||||
Reference in new issue
Block a user