summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-03-05 21:23:54 +0100
committerMarek Olšák <[email protected]>2011-03-08 23:52:37 +0100
commitb39bccbd4ed71e9585da4cf5acf7b887b2e90899 (patch)
tree8aafddda49b4d4e4cdf19ec76350583b7c4d41b4 /src/gallium/drivers
parent5257a6dbc65d742e6d0fcf4278a4157b2f39fdf7 (diff)
gallium: add timeout parameter to fence_finish
This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_fence.c7
-rw-r--r--src/gallium/drivers/cell/ppu/cell_fence.h7
-rw-r--r--src/gallium/drivers/galahad/glhd_screen.c6
-rw-r--r--src/gallium/drivers/i915/i915_screen.c3
-rw-r--r--src/gallium/drivers/i965/brw_screen.c3
-rw-r--r--src/gallium/drivers/identity/id_screen.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c3
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c3
-rw-r--r--src/gallium/drivers/r300/r300_screen.c3
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c6
-rw-r--r--src/gallium/drivers/softpipe/sp_fence.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.c3
-rw-r--r--src/gallium/drivers/svga/svga_context.c3
-rw-r--r--src/gallium/drivers/svga/svga_screen.c3
-rw-r--r--src/gallium/drivers/trace/tr_screen.c6
16 files changed, 45 insertions, 22 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c
index e7c9fc46d9f..3014a8a7b84 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.c
+++ b/src/gallium/drivers/cell/ppu/cell_fence.c
@@ -47,7 +47,8 @@ cell_fence_init(struct cell_fence *fence)
boolean
cell_fence_signalled(const struct cell_context *cell,
- const struct cell_fence *fence)
+ const struct cell_fence *fence,
+ unsigned flags)
{
uint i;
for (i = 0; i < cell->num_spus; i++) {
@@ -61,7 +62,9 @@ cell_fence_signalled(const struct cell_context *cell,
void
cell_fence_finish(const struct cell_context *cell,
- const struct cell_fence *fence)
+ const struct cell_fence *fence,
+ unsigned flags,
+ uint64_t timeout)
{
while (!cell_fence_signalled(cell, fence)) {
usleep(10);
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.h b/src/gallium/drivers/cell/ppu/cell_fence.h
index 536b4ba411a..3ef6cf7bbca 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.h
+++ b/src/gallium/drivers/cell/ppu/cell_fence.h
@@ -36,12 +36,15 @@ cell_fence_init(struct cell_fence *fence);
extern boolean
cell_fence_signalled(const struct cell_context *cell,
- const struct cell_fence *fence);
+ const struct cell_fence *fence,
+ unsigned flags);
extern void
cell_fence_finish(const struct cell_context *cell,
- const struct cell_fence *fence);
+ const struct cell_fence *fence,
+ unsigned flags,
+ uint64_t timeout);
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index b4825bef66d..fbe19bf324b 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -292,14 +292,16 @@ galahad_screen_fence_signalled(struct pipe_screen *_screen,
static int
galahad_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct galahad_screen *glhd_screen = galahad_screen(_screen);
struct pipe_screen *screen = glhd_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ flags,
+ timeout);
}
struct pipe_screen *
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 64c4bbab399..39f65f8c8fd 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -331,7 +331,8 @@ i915_fence_signalled(struct pipe_screen *screen,
static int
i915_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct i915_screen *is = i915_screen(screen);
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index bf805fd080c..367581a6b41 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -376,7 +376,8 @@ brw_fence_signalled(struct pipe_screen *screen,
static int
brw_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
return 0;
}
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index 644481bb748..b289c1e5d17 100644
--- a/src/gallium/drivers/identity/id_screen.c
+++ b/src/gallium/drivers/identity/id_screen.c
@@ -258,14 +258,16 @@ identity_screen_fence_signalled(struct pipe_screen *_screen,
static int
identity_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct identity_screen *id_screen = identity_screen(_screen);
struct pipe_screen *screen = id_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ flags,
+ timeout);
}
struct pipe_screen *
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 849db06acdf..6118164b20b 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -92,7 +92,7 @@ llvmpipe_finish( struct pipe_context *pipe,
struct pipe_fence_handle *fence = NULL;
llvmpipe_flush(pipe, 0, &fence, reason);
if (fence) {
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_finish(pipe->screen, fence, 0, PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
}
}
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index edcfbfcfac1..c600144a2da 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -365,7 +365,8 @@ llvmpipe_fence_signalled(struct pipe_screen *screen,
static int
llvmpipe_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence_handle,
- unsigned flag)
+ unsigned flag,
+ uint64_t timeout)
{
struct lp_fence *f = (struct lp_fence *) fence_handle;
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index e6cd3064c9a..3111bef7a22 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -165,7 +165,8 @@ nouveau_screen_fence_signalled(struct pipe_screen *screen,
static int
nouveau_screen_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *pfence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
return !nouveau_fence_wait(nouveau_fence(pfence));
}
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 2c7bca86277..18ed0356cae 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -434,7 +434,8 @@ static int r300_fence_signalled(struct pipe_screen *screen,
static int r300_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct r300_winsys_screen *rws = r300_screen(screen)->rws;
struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence;
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index d635ce575c0..d8d23bcb9c5 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -256,14 +256,16 @@ rbug_screen_fence_signalled(struct pipe_screen *_screen,
static int
rbug_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ flags,
+ timeout);
}
boolean
diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c
index 66c52141132..40d0b5970ef 100644
--- a/src/gallium/drivers/softpipe/sp_fence.c
+++ b/src/gallium/drivers/softpipe/sp_fence.c
@@ -54,7 +54,8 @@ softpipe_fence_signalled(struct pipe_screen *screen,
static int
softpipe_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
assert(!fence);
return 0;
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c
index 6f7addd441a..00a2fafdfa2 100644
--- a/src/gallium/drivers/softpipe/sp_flush.c
+++ b/src/gallium/drivers/softpipe/sp_flush.c
@@ -162,7 +162,8 @@ softpipe_flush_resource(struct pipe_context *pipe,
* This is for illustrative purposes only, as softpipe does not
* have fences.
*/
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_finish(pipe->screen, fence, 0,
+ PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
}
} else {
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index f0f875b2b23..e64dc94b9d8 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -241,7 +241,8 @@ void svga_context_flush( struct svga_context *svga,
if (SVGA_DEBUG & DEBUG_SYNC) {
if (fence)
- svga->pipe.screen->fence_finish( svga->pipe.screen, fence, 0);
+ svga->pipe.screen->fence_finish( svga->pipe.screen, fence, 0,
+ PIPE_TIMEOUT_INFINITE);
}
if(pfence)
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index ef1d3098d51..f4029c7e363 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -425,7 +425,8 @@ svga_fence_signalled(struct pipe_screen *screen,
static int
svga_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flag)
+ unsigned flag,
+ uint64_t timeout)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index 7cfaab060f1..17f87cb906c 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -421,7 +421,8 @@ trace_screen_fence_signalled(struct pipe_screen *_screen,
static int
trace_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ unsigned flags,
+ uint64_t timeout)
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct pipe_screen *screen = tr_scr->screen;
@@ -432,8 +433,9 @@ trace_screen_fence_finish(struct pipe_screen *_screen,
trace_dump_arg(ptr, screen);
trace_dump_arg(ptr, fence);
trace_dump_arg(uint, flags);
+ trace_dump_arg(uint, timeout);
- result = screen->fence_finish(screen, fence, flags);
+ result = screen->fence_finish(screen, fence, flags, timeout);
trace_dump_ret(int, result);