summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_screen.h
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-12-27 13:57:46 +0100
committerChristoph Bumiller <[email protected]>2010-12-27 13:57:46 +0100
commite4349027f6842563555992a39add4d0b2283fbbb (patch)
treea7c15aa051fc57807cbc32f825e2ea1cd0e16bee /src/gallium/drivers/nvc0/nvc0_screen.h
parentabd08f4c014f24231505de2d3cb466a0901107e2 (diff)
nvc0: implement VRAM buffer transfers with bounce buffers
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.h')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.h b/src/gallium/drivers/nvc0/nvc0_screen.h
index 5b1b623356d..efa5ff63f16 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nvc0/nvc0_screen.h
@@ -101,18 +101,26 @@ int nvc0_screen_tic_alloc(struct nvc0_screen *, void *);
int nvc0_screen_tsc_alloc(struct nvc0_screen *, void *);
static INLINE void
-nvc0_resource_validate(struct nvc0_resource *res, uint32_t flags)
+nvc0_resource_fence(struct nvc0_resource *res, uint32_t flags)
{
struct nvc0_screen *screen = nvc0_screen(res->base.screen);
- assert(res->mm);
+ if (res->mm) {
+ nvc0_fence_reference(&res->fence, screen->fence.current);
- nvc0_fence_reference(&res->fence, screen->fence.current);
+ if (flags & NOUVEAU_BO_WR)
+ nvc0_fence_reference(&res->fence_wr, screen->fence.current);
+ }
+}
- if (flags & NOUVEAU_BO_WR)
- nvc0_fence_reference(&res->fence_wr, screen->fence.current);
+static INLINE void
+nvc0_resource_validate(struct nvc0_resource *res, uint32_t flags)
+{
+ struct nvc0_screen *screen = nvc0_screen(res->base.screen);
nouveau_bo_validate(screen->base.channel, res->bo, flags);
+
+ nvc0_resource_fence(res, flags);
}