diff options
author | Marek Olšák <[email protected]> | 2015-07-25 18:40:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-08-26 19:25:18 +0200 |
commit | 0fc21ecfc0891d239f20bf7724e51bc75503570c (patch) | |
tree | 19ffd27a9700601cae150dd229518637e369eb98 /src/gallium/state_trackers | |
parent | 7b5c92391f15533ec02327d617c4e8639a2f8bb4 (diff) |
gallium: add flags parameter to pipe_screen::context_create
This allows creating compute-only and debug contexts.
Reviewed-by: Brian Paul <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/core/queue.cpp | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/omx/vid_dec.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/omx/vid_enc.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/va/context.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_context.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xvmc/context.c | 2 |
9 files changed, 11 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/clover/core/queue.cpp b/src/gallium/state_trackers/clover/core/queue.cpp index 87f9dcc6476..4aaf67de241 100644 --- a/src/gallium/state_trackers/clover/core/queue.cpp +++ b/src/gallium/state_trackers/clover/core/queue.cpp @@ -30,7 +30,7 @@ using namespace clover; command_queue::command_queue(clover::context &ctx, clover::device &dev, cl_command_queue_properties props) : context(ctx), device(dev), props(props) { - pipe = dev.pipe->context_create(dev.pipe, NULL); + pipe = dev.pipe->context_create(dev.pipe, NULL, PIPE_CONTEXT_COMPUTE_ONLY); if (!pipe) throw error(CL_INVALID_DEVICE); } diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index 9d0f2d25025..f598430dc26 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -398,7 +398,7 @@ xmesa_get_context(struct st_framebuffer_iface *stfbi) pipe = xstfb->display->pipe; if (!pipe) { - pipe = xstfb->screen->context_create(xstfb->screen, NULL); + pipe = xstfb->screen->context_create(xstfb->screen, NULL, 0); if (!pipe) return NULL; xstfb->display->pipe = pipe; diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 99197a4361b..f14ffea13e1 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -163,7 +163,7 @@ NineDevice9_ctor( struct NineDevice9 *This, if (This->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING) DBG("Application asked mixed Software Vertex Processing. Ignoring.\n"); - This->pipe = This->screen->context_create(This->screen, NULL); + This->pipe = This->screen->context_create(This->screen, NULL, 0); if (!This->pipe) { return E_OUTOFMEMORY; } /* guess */ This->cso = cso_create_context(This->pipe); diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c index 9e7e7ba7787..5584348761e 100644 --- a/src/gallium/state_trackers/omx/vid_dec.c +++ b/src/gallium/state_trackers/omx/vid_dec.c @@ -162,7 +162,7 @@ static OMX_ERRORTYPE vid_dec_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam return OMX_ErrorInsufficientResources; screen = priv->screen->pscreen; - priv->pipe = screen->context_create(screen, priv->screen); + priv->pipe = screen->context_create(screen, priv->screen, 0); if (!priv->pipe) return OMX_ErrorInsufficientResources; diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c index 2bd0194189f..aa45089ae04 100644 --- a/src/gallium/state_trackers/omx/vid_enc.c +++ b/src/gallium/state_trackers/omx/vid_enc.c @@ -185,7 +185,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_STACKED_FRAMES); - priv->s_pipe = screen->context_create(screen, priv->screen); + priv->s_pipe = screen->context_create(screen, priv->screen, 0); if (!priv->s_pipe) return OMX_ErrorInsufficientResources; @@ -202,7 +202,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam return OMX_ErrorInsufficientResources; } - priv->t_pipe = screen->context_create(screen, priv->screen); + priv->t_pipe = screen->context_create(screen, priv->screen, 0); if (!priv->t_pipe) return OMX_ErrorInsufficientResources; diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 0a733b39004..8b003aedaec 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -100,7 +100,8 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx) if (!drv->vscreen) goto error_screen; - drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen, drv->vscreen); + drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen, + drv->vscreen, 0); if (!drv->pipe) goto error_pipe; diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index ba36afc9421..31c95054f56 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -70,7 +70,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, } pscreen = dev->vscreen->pscreen; - dev->context = pscreen->context_create(pscreen, dev->vscreen); + dev->context = pscreen->context_create(pscreen, dev->vscreen, 0); if (!dev->context) { ret = VDP_STATUS_RESOURCES; goto no_context; diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c index ebfb290af13..5553beb2014 100644 --- a/src/gallium/state_trackers/xa/xa_context.c +++ b/src/gallium/state_trackers/xa/xa_context.c @@ -56,7 +56,7 @@ xa_context_create(struct xa_tracker *xa) struct xa_context *ctx = calloc(1, sizeof(*ctx)); ctx->xa = xa; - ctx->pipe = xa->screen->context_create(xa->screen, NULL); + ctx->pipe = xa->screen->context_create(xa->screen, NULL, 0); ctx->cso = cso_create_context(ctx->pipe); ctx->shaders = xa_shaders_create(ctx); renderer_init_state(ctx); diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c index 9ded2e5f2e2..4702b44d1f4 100644 --- a/src/gallium/state_trackers/xvmc/context.c +++ b/src/gallium/state_trackers/xvmc/context.c @@ -237,7 +237,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id, return BadAlloc; } - pipe = vscreen->pscreen->context_create(vscreen->pscreen, vscreen); + pipe = vscreen->pscreen->context_create(vscreen->pscreen, vscreen, 0); if (!pipe) { XVMC_MSG(XVMC_ERR, "[XvMC] Could not create VL context.\n"); vl_screen_destroy(vscreen); |