intel: Give an explanation why we are exiting for debugging.
authorEugeni Dodonov <eugeni.dodonov@intel.com>
Fri, 2 Sep 2011 13:29:31 +0000 (10:29 -0300)
committerEugeni Dodonov <eugeni.dodonov@intel.com>
Fri, 2 Sep 2011 19:23:32 +0000 (16:23 -0300)
This could happen in 3 different cases, and ERRNO can explain what
happened. First case would be EIO (gpu hang), second EINVAL (something is
wrong inside the batch), and we also discovered that sometimes it happens
with ENOSPACE. All of those cases are different it it could be worth to at
least know what happened.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
src/mesa/drivers/dri/intel/intel_batchbuffer.c

index 21dd27ce1326c3ec17f79394ccccc251746812f2..c4bb836f6e193ccdd2b29a854bc8a1f633d4be8b 100644 (file)
@@ -138,6 +138,7 @@ do_flush_locked(struct intel_context *intel)
    }
 
    if (ret != 0) {
+      fprintf(stderr, "intel_do_flush_locked failed: %s\n", strerr(ret));
       exit(1);
    }
    intel->vtbl.new_batch(intel);