diff options
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.h')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_screen.h | 6 |
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); + } } |