tu: Implement fallback linear staging blit for CopyImage
[mesa.git] / src / gallium / state_trackers / xvmc / context.c
index a6991ab8d6107153550b21683bc30491a696d40a..1ecff5e8ac153c05e9bd42a396803a53a4c742b0 100644 (file)
@@ -229,7 +229,9 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       return BadAlloc;
 
    /* TODO: Reuse screen if process creates another context */
-   vscreen = vl_dri2_screen_create(dpy, scrn);
+   vscreen = vl_dri3_screen_create(dpy, scrn);
+   if (!vscreen)
+      vscreen = vl_dri2_screen_create(dpy, scrn);
 
    if (!vscreen) {
       XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL screen.\n");
@@ -237,7 +239,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       return BadAlloc;
    }
 
-   pipe = vscreen->pscreen->context_create(vscreen->pscreen, vscreen, 0);
+   pipe = vscreen->pscreen->context_create(vscreen->pscreen, NULL, 0);
    if (!pipe) {
       XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL context.\n");
       vscreen->destroy(vscreen);
@@ -293,7 +295,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
       context_priv->color_standard,
       &context_priv->procamp, true, &csc
    );
-   vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc);
+   vl_compositor_set_csc_matrix(&context_priv->cstate, (const vl_csc_matrix *)&csc, 1.0f, 0.0f);
 
    context_priv->vscreen = vscreen;
    context_priv->pipe = pipe;