diff options
author | Marek Olšák <[email protected]> | 2016-08-06 16:41:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-10 01:11:10 +0200 |
commit | 54272e18a682c8b82d4a86b2c07b51c303d8cead (patch) | |
tree | c9c0ac7ad2fb4144ebeb9c7851eaa19a8103973c /src/gallium/drivers/swr | |
parent | c6043e7d54fc48771856a50235f9141b711151f3 (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/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/swr_context.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_draw.cpp | 2 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_fence.cpp | 1 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_fence.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_query.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_screen.cpp | 6 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_state.cpp | 2 |
7 files changed, 11 insertions, 9 deletions
diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp index 1083c9de194..835c35393f0 100644 --- a/src/gallium/drivers/swr/swr_context.cpp +++ b/src/gallium/drivers/swr/swr_context.cpp @@ -128,7 +128,7 @@ swr_transfer_map(struct pipe_context *pipe, if (!swr_is_fence_pending(screen->flush_fence)) swr_fence_submit(swr_context(pipe), screen->flush_fence); - swr_fence_finish(pipe->screen, screen->flush_fence, 0); + swr_fence_finish(pipe->screen, NULL, screen->flush_fence, 0); swr_resource_unused(resource); } } @@ -205,7 +205,7 @@ swr_resource_copy(struct pipe_context *pipe, swr_store_dirty_resource(pipe, src, SWR_TILE_RESOLVED); swr_store_dirty_resource(pipe, dst, SWR_TILE_RESOLVED); - swr_fence_finish(pipe->screen, screen->flush_fence, 0); + swr_fence_finish(pipe->screen, NULL, screen->flush_fence, 0); swr_resource_unused(src); swr_resource_unused(dst); diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp index ab8d2750623..0f6a8c6d88c 100644 --- a/src/gallium/drivers/swr/swr_draw.cpp +++ b/src/gallium/drivers/swr/swr_draw.cpp @@ -239,7 +239,7 @@ swr_finish(struct pipe_context *pipe) struct pipe_fence_handle *fence = nullptr; swr_flush(pipe, &fence, 0); - swr_fence_finish(pipe->screen, fence, 0); + swr_fence_finish(pipe->screen, NULL, fence, 0); swr_fence_reference(pipe->screen, &fence, NULL); } diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp index 8a8e864397d..7fe24700bfa 100644 --- a/src/gallium/drivers/swr/swr_fence.cpp +++ b/src/gallium/drivers/swr/swr_fence.cpp @@ -111,6 +111,7 @@ swr_fence_reference(struct pipe_screen *screen, */ boolean swr_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, struct pipe_fence_handle *fence_handle, uint64_t timeout) { diff --git a/src/gallium/drivers/swr/swr_fence.h b/src/gallium/drivers/swr/swr_fence.h index 47f4d2e7c9f..80a4345af87 100644 --- a/src/gallium/drivers/swr/swr_fence.h +++ b/src/gallium/drivers/swr/swr_fence.h @@ -69,6 +69,7 @@ void swr_fence_reference(struct pipe_screen *screen, struct pipe_fence_handle *f); boolean swr_fence_finish(struct pipe_screen *screen, + struct pipe_context *ctx, struct pipe_fence_handle *fence_handle, uint64_t timeout); diff --git a/src/gallium/drivers/swr/swr_query.cpp b/src/gallium/drivers/swr/swr_query.cpp index 7867db3fc12..5b8f059cdae 100644 --- a/src/gallium/drivers/swr/swr_query.cpp +++ b/src/gallium/drivers/swr/swr_query.cpp @@ -63,7 +63,7 @@ swr_destroy_query(struct pipe_context *pipe, struct pipe_query *q) if (pq->fence) { if (swr_is_fence_pending(pq->fence)) - swr_fence_finish(pipe->screen, pq->fence, 0); + swr_fence_finish(pipe->screen, NULL, pq->fence, 0); swr_fence_reference(pipe->screen, &pq->fence, NULL); } @@ -128,7 +128,7 @@ swr_get_query_result(struct pipe_context *pipe, if (!wait && !swr_is_fence_done(pq->fence)) return FALSE; - swr_fence_finish(pipe->screen, pq->fence, 0); + swr_fence_finish(pipe->screen, NULL, pq->fence, 0); swr_fence_reference(pipe->screen, &pq->fence, NULL); } diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index e0e59fa674c..df44967feee 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -657,7 +657,7 @@ swr_resource_destroy(struct pipe_screen *p_screen, struct pipe_resource *pt) if (!swr_is_fence_pending(screen->flush_fence)) swr_fence_submit(swr_context(pipe), screen->flush_fence); - swr_fence_finish(p_screen, screen->flush_fence, 0); + swr_fence_finish(p_screen, NULL, screen->flush_fence, 0); swr_resource_unused(pt); } @@ -692,7 +692,7 @@ swr_flush_frontbuffer(struct pipe_screen *p_screen, struct pipe_context *pipe = screen->pipe; if (pipe) { - swr_fence_finish(p_screen, screen->flush_fence, 0); + swr_fence_finish(p_screen, NULL, screen->flush_fence, 0); swr_resource_unused(resource); SwrEndFrame(swr_context(pipe)->swrContext); } @@ -712,7 +712,7 @@ swr_destroy_screen(struct pipe_screen *p_screen) fprintf(stderr, "SWR destroy screen!\n"); - swr_fence_finish(p_screen, screen->flush_fence, 0); + swr_fence_finish(p_screen, NULL, screen->flush_fence, 0); swr_fence_reference(p_screen, &screen->flush_fence, NULL); JitDestroyContext(screen->hJitMgr); diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index dac95ce42e7..2df79855358 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1390,7 +1390,7 @@ swr_update_derived(struct pipe_context *pipe, /* Ensure that any in-progress attachment change StoreTiles finish */ if (swr_is_fence_pending(screen->flush_fence)) - swr_fence_finish(pipe->screen, screen->flush_fence, 0); + swr_fence_finish(pipe->screen, NULL, screen->flush_fence, 0); /* Finally, update the in-use status of all resources involved in draw */ swr_update_resource_status(pipe, p_draw_info); |