anv: Add a ralloc context to anv_pipeline
[mesa.git] / src / intel / tools / error2aub.c
index 33d24164b76f87bd8beabf2fff3624faca028977..32e41b80365ea3fac0cbe13dde3619787b199e5c 100644 (file)
@@ -208,19 +208,27 @@ engine_from_name(const char *engine_name,
    const struct {
       const char *match;
       enum drm_i915_gem_engine_class engine_class;
+      bool parse_instance;
    } rings[] = {
-      { "rcs", I915_ENGINE_CLASS_RENDER },
-      { "vcs", I915_ENGINE_CLASS_VIDEO },
-      { "vecs", I915_ENGINE_CLASS_VIDEO_ENHANCE },
-      { "bcs", I915_ENGINE_CLASS_COPY },
-      { "global", I915_ENGINE_CLASS_INVALID },
+      { "rcs", I915_ENGINE_CLASS_RENDER, true },
+      { "vcs", I915_ENGINE_CLASS_VIDEO, true },
+      { "vecs", I915_ENGINE_CLASS_VIDEO_ENHANCE, true },
+      { "bcs", I915_ENGINE_CLASS_COPY, true },
+      { "global", I915_ENGINE_CLASS_INVALID, false },
+      { "render command stream", I915_ENGINE_CLASS_RENDER, false },
+      { "blt command stream", I915_ENGINE_CLASS_COPY, false },
+      { "bsd command stream", I915_ENGINE_CLASS_VIDEO, false },
+      { "vebox command stream", I915_ENGINE_CLASS_VIDEO_ENHANCE, false },
       { NULL, I915_ENGINE_CLASS_INVALID },
    }, *r;
 
    for (r = rings; r->match; r++) {
       if (strncasecmp(engine_name, r->match, strlen(r->match)) == 0) {
          *engine_class = r->engine_class;
-         *engine_instance = strtol(engine_name + strlen(r->match), NULL, 10);
+         if (r->parse_instance)
+            *engine_instance = strtol(engine_name + strlen(r->match), NULL, 10);
+         else
+            *engine_instance = 0;
          return;
       }
    }
@@ -490,7 +498,7 @@ main(int argc, char *argv[])
             fprintf(stdout, "context dump:\n");
             for (int i = 0; i < 60; i++) {
                if (i % 4 == 0)
-                  fprintf(stdout, "\n 0x%08lx: ", bo_entry->addr + 8192 + i * 4);
+                  fprintf(stdout, "\n 0x%08" PRIx64 ": ", bo_entry->addr + 8192 + i * 4);
                fprintf(stdout, "0x%08x ", context[i]);
             }
             fprintf(stdout, "\n");