diff options
author | Ben Skeggs <[email protected]> | 2011-03-01 09:25:48 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2011-03-01 14:44:42 +1000 |
commit | 5a0915870c7e994d20334042b7647db749e79224 (patch) | |
tree | de89b9f4d14f1890620f03c4461a5ab02a992d2c /src/gallium/drivers/nouveau/nouveau_screen.c | |
parent | 48e191f90cbb7735cadf30c444e1fb599311c55a (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.c | 7 |
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)); } |