These files can be decoded with intel_dump_decode from the intel-gpu-tools
available at:
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
#include "i915_drm.h"
#include "i915/i915_debug.h"
#include <xf86drm.h>
+#include <stdio.h>
#define BATCH_RESERVED 16
assert(ret == 0);
}
+ if (i915_drm_winsys(ibatch->iws)->dump_raw_file) {
+ FILE *file = fopen(i915_drm_winsys(ibatch->iws)->dump_raw_file, "a");
+ if (file) {
+ fwrite(batch->base.map, used, 1, file);
+ fclose(file);
+ }
+ }
+
#ifdef INTEL_RUN_SYNC
drm_intel_bo_wait_rendering(batch->bo);
#endif
drm_intel_bufmgr_gem_enable_fenced_relocs(idws->gem_manager);
idws->dump_cmd = debug_get_bool_option("I915_DUMP_CMD", FALSE);
+ idws->dump_raw_file = debug_get_option("I915_DUMP_RAW_FILE", NULL);
idws->send_cmd = !debug_get_bool_option("I915_NO_HW", FALSE);
return &idws->base;
struct i915_winsys base;
boolean dump_cmd;
+ char *dump_raw_file;
boolean send_cmd;
int fd; /**< Drm file discriptor */