aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs2009-11-04 01:31:18 -0600
committerBen Skeggs2009-11-04 01:31:18 -0600
commitb7ed162d2912d53d03d94f9ceaebf7d96d570c04 (patch)
tree0ccb86c647db9504093204491f3a3cbbdf0f7fab /libdrm/nouveau/nouveau_pushbuf.c
parentf4c50630269df4201b89a538cbf8e11646f17d82 (diff)
downloadexternal-libdrm-b7ed162d2912d53d03d94f9ceaebf7d96d570c04.tar.gz
external-libdrm-b7ed162d2912d53d03d94f9ceaebf7d96d570c04.tar.xz
external-libdrm-b7ed162d2912d53d03d94f9ceaebf7d96d570c04.zip
nouveau: turn another assertion into an error
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
Diffstat (limited to 'libdrm/nouveau/nouveau_pushbuf.c')
-rw-r--r--libdrm/nouveau/nouveau_pushbuf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdrm/nouveau/nouveau_pushbuf.c b/libdrm/nouveau/nouveau_pushbuf.c
index df43effc..90250c02 100644
--- a/libdrm/nouveau/nouveau_pushbuf.c
+++ b/libdrm/nouveau/nouveau_pushbuf.c
@@ -87,8 +87,12 @@ nouveau_pushbuf_emit_reloc(struct nouveau_channel *chan, void *ptr,
87 domains |= NOUVEAU_GEM_DOMAIN_VRAM; 87 domains |= NOUVEAU_GEM_DOMAIN_VRAM;
88 if (flags & NOUVEAU_BO_GART) 88 if (flags & NOUVEAU_BO_GART)
89 domains |= NOUVEAU_GEM_DOMAIN_GART; 89 domains |= NOUVEAU_GEM_DOMAIN_GART;
90
91 if (!(pbbo->valid_domains & domains)) {
92 fprintf(stderr, "no valid domains remain!\n");
93 return -EINVAL;
94 }
90 pbbo->valid_domains &= domains; 95 pbbo->valid_domains &= domains;
91 assert(pbbo->valid_domains);
92 96
93 assert(flags & NOUVEAU_BO_RDWR); 97 assert(flags & NOUVEAU_BO_RDWR);
94 if (flags & NOUVEAU_BO_RD) { 98 if (flags & NOUVEAU_BO_RD) {