vc4: Stash some debug code for looking at what BOs are at what hindex.
authorEric Anholt <eric@anholt.net>
Mon, 4 Aug 2014 23:38:07 +0000 (16:38 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 11 Aug 2014 21:45:32 +0000 (14:45 -0700)
When you're debugging validation, it's nice to know what the BOs are for.

src/gallium/drivers/vc4/vc4_bufmgr.c
src/gallium/drivers/vc4/vc4_simulator.c

index faec853ec8d01027d848fcd34f779f1a4268f4be..a87cdfa9fd42164311562b19aff2a90cff533692 100644 (file)
@@ -106,6 +106,7 @@ vc4_bo_open_name(struct vc4_screen *screen, uint32_t name,
         bo->screen = screen;
         bo->handle = o.handle;
         bo->size = o.size;
+        bo->name = "winsys";
 
 #ifdef USE_VC4_SIMULATOR
         vc4_bo_map(bo);
index 8038fee5109918d15df0594099999adcfb4b96b8..fc3d554a3ec81a84601b834c894685545c466561 100644 (file)
@@ -75,6 +75,10 @@ vc4_simulator_pin_bos(struct drm_device *dev, struct exec_info *exec)
                 struct vc4_bo *bo = bos[i];
                 struct drm_gem_cma_object *obj = vc4_wrap_bo_with_cma(dev, bo);
 
+#if 0
+                fprintf(stderr, "bo hindex %d: %s\n", i, bo->name);
+#endif
+
                 vc4_bo_map(bo);
                 memcpy(obj->vaddr, bo->map, bo->size);