summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_screen.h
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-02-15 19:12:41 +0100
committerChristoph Bumiller <[email protected]>2011-02-16 15:45:30 +0100
commita3c62afa7c7f3435b3c28bee417e652c9bb018e6 (patch)
tree6d80acc6b97000f10088d54e2e809efd5f77a12b /src/gallium/drivers/nvc0/nvc0_screen.h
parentfc5ab1b19780ef97c5e7f6257a2d91121503bd53 (diff)
nvc0: fix user vertex buffer updates
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.h')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.h b/src/gallium/drivers/nvc0/nvc0_screen.h
index 1fac142e2be..3b676fd21a1 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nvc0/nvc0_screen.h
@@ -128,9 +128,11 @@ 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);
+ if (likely(res->bo)) {
+ nouveau_bo_validate(screen->base.channel, res->bo, flags);
- nvc0_resource_fence(res, flags);
+ nvc0_resource_fence(res, flags);
+ }
}