[Mesa-dev] [PATCH] vl, omx, va, vdpau, xvmc: don't set the priv pointer in context_create
Marek Olšák
maraeo at gmail.com
Wed Jun 7 19:51:26 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
Unused and radeonsi ignores it anyway.
---
src/gallium/auxiliary/vl/vl_winsys_dri3.c | 2 +-
src/gallium/state_trackers/omx/vid_dec.c | 2 +-
src/gallium/state_trackers/omx/vid_enc.c | 4 ++--
src/gallium/state_trackers/va/context.c | 2 +-
src/gallium/state_trackers/vdpau/device.c | 2 +-
src/gallium/state_trackers/xvmc/context.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
index a810dea..c7c615b 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
@@ -816,21 +816,21 @@ vl_dri3_screen_create(Display *display, int screen)
}
free(geom_reply);
if (pipe_loader_drm_probe_fd(&scrn->base.dev, fd))
scrn->base.pscreen = pipe_loader_create_screen(scrn->base.dev);
if (!scrn->base.pscreen)
goto release_pipe;
scrn->pipe = scrn->base.pscreen->context_create(scrn->base.pscreen,
- &scrn->base, 0);
+ NULL, 0);
if (!scrn->pipe)
goto no_context;
scrn->base.destroy = vl_dri3_screen_destroy;
scrn->base.texture_from_drawable = vl_dri3_screen_texture_from_drawable;
scrn->base.get_dirty_area = vl_dri3_screen_get_dirty_area;
scrn->base.get_timestamp = vl_dri3_screen_get_timestamp;
scrn->base.set_next_timestamp = vl_dri3_screen_set_next_timestamp;
scrn->base.get_private = vl_dri3_screen_get_private;
scrn->base.pscreen->flush_frontbuffer = vl_dri3_flush_frontbuffer;
diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c
index 9a6efb8..313bc0a 100644
--- a/src/gallium/state_trackers/omx/vid_dec.c
+++ b/src/gallium/state_trackers/omx/vid_dec.c
@@ -171,21 +171,21 @@ static OMX_ERRORTYPE vid_dec_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
priv->destructor = vid_dec_Destructor;
comp->SetParameter = vid_dec_SetParameter;
comp->GetParameter = vid_dec_GetParameter;
priv->screen = omx_get_screen();
if (!priv->screen)
return OMX_ErrorInsufficientResources;
screen = priv->screen->pscreen;
- priv->pipe = screen->context_create(screen, priv->screen, 0);
+ priv->pipe = screen->context_create(screen, NULL, 0);
if (!priv->pipe)
return OMX_ErrorInsufficientResources;
if (!vl_compositor_init(&priv->compositor, priv->pipe)) {
priv->pipe->destroy(priv->pipe);
priv->pipe = NULL;
return OMX_ErrorInsufficientResources;
}
if (!vl_compositor_init_state(&priv->cstate, priv->pipe)) {
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index 7ad251e..1a4fb62 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -172,38 +172,38 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
priv->screen = omx_get_screen();
if (!priv->screen)
return OMX_ErrorInsufficientResources;
screen = priv->screen->pscreen;
if (!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED))
return OMX_ErrorBadParameter;
- priv->s_pipe = screen->context_create(screen, priv->screen, 0);
+ priv->s_pipe = screen->context_create(screen, NULL, 0);
if (!priv->s_pipe)
return OMX_ErrorInsufficientResources;
if (!vl_compositor_init(&priv->compositor, priv->s_pipe)) {
priv->s_pipe->destroy(priv->s_pipe);
priv->s_pipe = NULL;
return OMX_ErrorInsufficientResources;
}
if (!vl_compositor_init_state(&priv->cstate, priv->s_pipe)) {
vl_compositor_cleanup(&priv->compositor);
priv->s_pipe->destroy(priv->s_pipe);
priv->s_pipe = NULL;
return OMX_ErrorInsufficientResources;
}
- priv->t_pipe = screen->context_create(screen, priv->screen, 0);
+ priv->t_pipe = screen->context_create(screen, NULL, 0);
if (!priv->t_pipe)
return OMX_ErrorInsufficientResources;
priv->sPortTypesParam[OMX_PortDomainVideo].nStartPortNumber = 0;
priv->sPortTypesParam[OMX_PortDomainVideo].nPorts = 2;
priv->ports = CALLOC(2, sizeof(omx_base_PortType *));
if (!priv->ports)
return OMX_ErrorInsufficientResources;
for (i = 0; i < 2; ++i) {
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index ae9154a..6e7a58d 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -136,21 +136,21 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
}
default:
FREE(drv);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
if (!drv->vscreen)
goto error_screen;
drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen,
- drv->vscreen, 0);
+ NULL, 0);
if (!drv->pipe)
goto error_pipe;
drv->htab = handle_table_create();
if (!drv->htab)
goto error_htab;
if (!vl_compositor_init(&drv->compositor, drv->pipe))
goto error_compositor;
if (!vl_compositor_init_state(&drv->cstate, drv->pipe))
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index eae9f04..c3f156f 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -65,21 +65,21 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
dev->vscreen = vl_dri3_screen_create(display, screen);
if (!dev->vscreen)
dev->vscreen = vl_dri2_screen_create(display, screen);
if (!dev->vscreen) {
ret = VDP_STATUS_RESOURCES;
goto no_vscreen;
}
pscreen = dev->vscreen->pscreen;
- dev->context = pscreen->context_create(pscreen, dev->vscreen, 0);
+ dev->context = pscreen->context_create(pscreen, NULL, 0);
if (!dev->context) {
ret = VDP_STATUS_RESOURCES;
goto no_context;
}
if (!pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) {
ret = VDP_STATUS_NO_IMPLEMENTATION;
goto no_context;
}
diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c
index c239b3d..1ecff5e 100644
--- a/src/gallium/state_trackers/xvmc/context.c
+++ b/src/gallium/state_trackers/xvmc/context.c
@@ -232,21 +232,21 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
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");
FREE(context_priv);
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);
FREE(context_priv);
return BadAlloc;
}
templat.profile = ProfileToPipe(mc_type);
templat.entrypoint = (mc_type & XVMC_IDCT) ? PIPE_VIDEO_ENTRYPOINT_IDCT : PIPE_VIDEO_ENTRYPOINT_MC;
templat.chroma_format = FormatToPipe(chroma_format);
--
2.7.4
More information about the mesa-dev
mailing list