summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-05-26 01:23:07 +0200
committerMarek Olšák <[email protected]>2010-05-26 01:23:11 +0200
commit2c072c8f72647a3b32e9855f7635b37ba399f5be (patch)
tree861a0b424ed1e4e17b6ca9f0f0503b8daa8ea161 /src/gallium/drivers/r300/r300_screen.c
parente1c117d87bd1c77c6093a7a77b7994a8313b084e (diff)
r300g: implement fake but compliant fences
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index ef0255066b7..4859db523a5 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -319,20 +319,33 @@ static void r300_fence_reference(struct pipe_screen *screen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence)
{
+ struct r300_fence **oldf = (struct r300_fence**)ptr;
+ struct r300_fence *newf = (struct r300_fence*)fence;
+
+ if (pipe_reference(&(*oldf)->reference, &newf->reference))
+ FREE(*oldf);
+
+ *ptr = fence;
}
static int r300_fence_signalled(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
unsigned flags)
{
- return 0;
+ struct r300_fence *rfence = (struct r300_fence*)fence;
+
+ return rfence->signalled ? 0 : 1; /* 0 == success */
}
static int r300_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
unsigned flags)
{
- return 0;
+ struct r300_fence *rfence = (struct r300_fence*)fence;
+
+ r300_finish(rfence->ctx);
+ rfence->signalled = TRUE;
+ return 0; /* 0 == success */
}
struct pipe_screen* r300_create_screen(struct r300_winsys_screen *rws)