intel: do not submit invalid command buffers

We do not know what are in an invalid command buffer and we should not submit
it to GPU.
diff --git a/icd/intel/queue.c b/icd/intel/queue.c
index 342004a..b79f562 100644
--- a/icd/intel/queue.c
+++ b/icd/intel/queue.c
@@ -268,6 +268,14 @@
         if (ret != XGL_SUCCESS)
             break;
 
+        if (cmd->result != XGL_SUCCESS) {
+            intel_dev_log(cmd->dev, XGL_DBG_MSG_ERROR,
+                    XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
+                    "invalid command buffer submitted");
+            ret = cmd->result;
+            break;
+        }
+
         bo = intel_cmd_get_batch(cmd, &used);
         ret = queue_submit_bo(queue, bo, used);
         queue->last_submitted_cmd = cmd;