bo->free_time = time;
bo->name = NULL;
+ bo->kflags = 0;
list_addtail(&bo->head, &bucket->head);
} else {
int refcount;
const char *name;
+#ifndef EXEC_OBJECT_CAPTURE
+#define EXEC_OBJECT_CAPTURE (1<<7)
+#endif
+ uint64_t kflags;
+
/**
* Kenel-assigned global name for this object
*
struct brw_bo *new_bo;
new_bo = brw_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
+ if (can_do_exec_capture(brw->screen))
+ new_bo->kflags = EXEC_OBJECT_CAPTURE;
if (brw->has_llc)
brw_bo_map_unsynchronized(brw, new_bo);
calloc(cache->size, sizeof(struct brw_cache_item *));
cache->bo = brw_bo_alloc(brw->bufmgr, "program cache", 4096, 64);
+ if (can_do_exec_capture(brw->screen))
+ cache->bo->kflags = EXEC_OBJECT_CAPTURE;
if (brw->has_llc)
brw_bo_map_unsynchronized(brw, cache->bo);
}
}
validation_entry->alignment = bo->align;
validation_entry->offset = bo->offset64;
- validation_entry->flags = 0;
+ validation_entry->flags = bo->kflags;
validation_entry->rsvd1 = 0;
validation_entry->rsvd2 = 0;
screen->cmd_parser_version = 0;
}
+ /* Kernel 4.13 retuired for exec object capture */
+#ifndef I915_PARAM_HAS_EXEC_CAPTURE
+#define I915_PARAM_HAS_EXEC_CAPTURE 45
+#endif
+ if (intel_get_boolean(screen, I915_PARAM_HAS_EXEC_CAPTURE)) {
+ screen->kernel_features |= KERNEL_ALLOWS_EXEC_CAPTURE;
+ }
+
if (!intel_detect_pipelined_so(screen)) {
/* We can't do anything, so the effective version is 0. */
screen->cmd_parser_version = 0;
#define KERNEL_ALLOWS_MI_MATH_AND_LRR (1<<2)
#define KERNEL_ALLOWS_HSW_SCRATCH1_AND_ROW_CHICKEN3 (1<<3)
#define KERNEL_ALLOWS_COMPUTE_DISPATCH (1<<4)
+#define KERNEL_ALLOWS_EXEC_CAPTURE (1<<5)
struct brw_bufmgr *bufmgr;
return screen->kernel_features & KERNEL_ALLOWS_PREDICATE_WRITES;
}
+static inline bool
+can_do_exec_capture(const struct intel_screen *screen)
+{
+ return screen->kernel_features & KERNEL_ALLOWS_EXEC_CAPTURE;
+}
+
#ifdef __cplusplus
}
#endif