summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-06 16:41:42 +0200
committerMarek Olšák <[email protected]>2016-08-10 01:11:10 +0200
commit54272e18a682c8b82d4a86b2c07b51c303d8cead (patch)
treec9c0ac7ad2fb4144ebeb9c7851eaa19a8103973c /src/gallium/state_trackers
parentc6043e7d54fc48771856a50235f9141b711151f3 (diff)
gallium: add a pipe_context parameter to fence_finish
required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/clover/core/event.cpp4
-rw-r--r--src/gallium/state_trackers/dri/dri2.c6
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c2
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c2
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c6
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c4
-rw-r--r--src/gallium/state_trackers/xa/xa_context.c2
-rw-r--r--src/gallium/state_trackers/xvmc/surface.c2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp
index d75b8397794..8275e16a4dd 100644
--- a/src/gallium/state_trackers/clover/core/event.cpp
+++ b/src/gallium/state_trackers/clover/core/event.cpp
@@ -141,7 +141,7 @@ hard_event::status() const {
else if (!_fence)
return CL_QUEUED;
- else if (!screen->fence_finish(screen, _fence, 0))
+ else if (!screen->fence_finish(screen, NULL, _fence, 0))
return CL_SUBMITTED;
else
@@ -168,7 +168,7 @@ hard_event::wait() const {
queue()->flush();
if (!_fence ||
- !screen->fence_finish(screen, _fence, PIPE_TIMEOUT_INFINITE))
+ !screen->fence_finish(screen, NULL, _fence, PIPE_TIMEOUT_INFINITE))
throw error(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST);
}
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index c22a8cdc430..9803b0e1971 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1252,7 +1252,7 @@ dri2_blit_image(__DRIcontext *context, __DRIimage *dst, __DRIimage *src,
screen = dri_screen(ctx->sPriv)->base.screen;
pipe->flush_resource(pipe, dst->texture);
ctx->st->flush(ctx->st, 0, &fence);
- (void) screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
+ (void) screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
}
}
@@ -1451,13 +1451,13 @@ dri2_client_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags,
/* No need to flush. The context was flushed when the fence was created. */
if (fence->pipe_fence)
- return screen->fence_finish(screen, fence->pipe_fence, timeout);
+ return screen->fence_finish(screen, NULL, fence->pipe_fence, timeout);
else if (fence->cl_event) {
struct pipe_fence_handle *pipe_fence =
driscreen->opencl_dri_event_get_fence(fence->cl_event);
if (pipe_fence)
- return screen->fence_finish(screen, pipe_fence, timeout);
+ return screen->fence_finish(screen, NULL, pipe_fence, timeout);
else
return driscreen->opencl_dri_event_wait(fence->cl_event, timeout);
}
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index adc51284767..edcd0e68439 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -525,7 +525,7 @@ dri_flush(__DRIcontext *cPriv,
fence = swap_fences_pop_front(drawable);
if (fence) {
- (void) screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
+ (void) screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
}
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 5799cce033c..8d1b36056ee 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -1376,7 +1376,7 @@ void XMesaFlush( XMesaContext c )
c->st->flush(c->st, ST_FLUSH_FRONT, &fence);
if (fence) {
- xmdpy->screen->fence_finish(xmdpy->screen, fence,
+ xmdpy->screen->fence_finish(xmdpy->screen, NULL, fence,
PIPE_TIMEOUT_INFINITE);
xmdpy->screen->fence_reference(xmdpy->screen, &fence, NULL);
}
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index bc01c2dd4cf..08ee482f0d3 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -621,7 +621,7 @@ static void work_present(void *data)
{
struct end_present_struct *work = data;
if (work->fence_to_wait) {
- (void) work->screen->fence_finish(work->screen, work->fence_to_wait, PIPE_TIMEOUT_INFINITE);
+ (void) work->screen->fence_finish(work->screen, NULL, work->fence_to_wait, PIPE_TIMEOUT_INFINITE);
work->screen->fence_reference(work->screen, &(work->fence_to_wait), NULL);
}
ID3DPresent_PresentBuffer(work->present, work->present_handle, work->hDestWindowOverride, NULL, NULL, NULL, 0);
@@ -743,7 +743,7 @@ bypass_rendering:
BOOL still_draw = FALSE;
fence = swap_fences_see_front(This);
if (fence) {
- still_draw = !This->screen->fence_finish(This->screen, fence, 0);
+ still_draw = !This->screen->fence_finish(This->screen, NULL, fence, 0);
This->screen->fence_reference(This->screen, &fence, NULL);
}
if (still_draw)
@@ -754,7 +754,7 @@ bypass_rendering:
This->tasks[0]=NULL;
fence = swap_fences_pop_front(This);
if (fence) {
- (void) This->screen->fence_finish(This->screen, fence, PIPE_TIMEOUT_INFINITE);
+ (void) This->screen->fence_finish(This->screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
This->screen->fence_reference(This->screen, &fence, NULL);
}
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index e7f387e6173..2862eafa1da 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -327,7 +327,7 @@ vlVdpPresentationQueueBlockUntilSurfaceIdle(VdpPresentationQueue presentation_qu
pipe_mutex_lock(pq->device->mutex);
if (surf->fence) {
screen = pq->device->vscreen->pscreen;
- screen->fence_finish(screen, surf->fence, PIPE_TIMEOUT_INFINITE);
+ screen->fence_finish(screen, NULL, surf->fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &surf->fence, NULL);
}
pipe_mutex_unlock(pq->device->mutex);
@@ -369,7 +369,7 @@ vlVdpPresentationQueueQuerySurfaceStatus(VdpPresentationQueue presentation_queue
} else {
pipe_mutex_lock(pq->device->mutex);
screen = pq->device->vscreen->pscreen;
- if (screen->fence_finish(screen, surf->fence, 0)) {
+ if (screen->fence_finish(screen, NULL, surf->fence, 0)) {
screen->fence_reference(screen, &surf->fence, NULL);
*status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE;
pipe_mutex_unlock(pq->device->mutex);
diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c
index 5553beb2014..715b48d7c84 100644
--- a/src/gallium/state_trackers/xa/xa_context.c
+++ b/src/gallium/state_trackers/xa/xa_context.c
@@ -383,7 +383,7 @@ xa_fence_wait(struct xa_fence *fence, uint64_t timeout)
struct pipe_screen *screen = fence->xa->screen;
boolean timed_out;
- timed_out = !screen->fence_finish(screen, fence->pipe_fence, timeout);
+ timed_out = !screen->fence_finish(screen, NULL, fence->pipe_fence, timeout);
if (timed_out)
return -XA_ERR_BUSY;
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
index 199712ba168..a4cd2aa2e12 100644
--- a/src/gallium/state_trackers/xvmc/surface.c
+++ b/src/gallium/state_trackers/xvmc/surface.c
@@ -488,7 +488,7 @@ Status XvMCGetSurfaceStatus(Display *dpy, XvMCSurface *surface, int *status)
*status = 0;
if (surface_priv->fence)
- if (!pipe->screen->fence_finish(pipe->screen, surface_priv->fence, 0))
+ if (!pipe->screen->fence_finish(pipe->screen, NULL, surface_priv->fence, 0))
*status |= XVMC_RENDERING;
return Success;