summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_screen.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2011-03-01 09:25:48 +1000
committerBen Skeggs <[email protected]>2011-03-01 14:44:42 +1000
commit5a0915870c7e994d20334042b7647db749e79224 (patch)
treede89b9f4d14f1890620f03c4461a5ab02a992d2c /src/gallium/drivers/nouveau/nouveau_screen.c
parent48e191f90cbb7735cadf30c444e1fb599311c55a (diff)
nouveau: move nv50/nvc0 fencing to common location, and modify slightly
Modified from original to remove chipset-specific code, and to be decoupled from the mm present in said drivers. Signed-off-by: Ben Skeggs <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_screen.c')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index a9426df686f..e14f2346a3e 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -14,6 +14,7 @@
#include "nouveau/nouveau_bo.h"
#include "nouveau_winsys.h"
#include "nouveau_screen.h"
+#include "nouveau_fence.h"
/* XXX this should go away */
#include "state_tracker/drm_driver.h"
@@ -150,7 +151,7 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *pfence)
{
- *ptr = pfence;
+ nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr);
}
static int
@@ -158,7 +159,7 @@ nouveau_screen_fence_signalled(struct pipe_screen *screen,
struct pipe_fence_handle *pfence,
unsigned flags)
{
- return 0;
+ return !nouveau_fence_signalled(nouveau_fence(pfence));
}
static int
@@ -166,7 +167,7 @@ nouveau_screen_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *pfence,
unsigned flags)
{
- return 0;
+ return !nouveau_fence_wait(nouveau_fence(pfence));
}