break;
}
+ case GEN_DEBUG_BLOCK_TYPE_FRAME: {
+ struct gen_debug_block_frame frame_desc = {
+ .base = {
+ .type = GEN_DEBUG_BLOCK_TYPE_FRAME,
+ .length = sizeof(frame_desc),
+ },
+ };
+ memcpy(output, &frame_desc, sizeof(frame_desc));
+ output += sizeof(frame_desc);
+ break;
+ }
+
default:
unreachable("Missing identifier write");
}
/* Driver identifier (struct gen_debug_block_driver) */
GEN_DEBUG_BLOCK_TYPE_DRIVER,
+ /* Frame identifier (struct gen_debug_block_frame) */
+ GEN_DEBUG_BLOCK_TYPE_FRAME,
+
/* Internal, never to be written out */
GEN_DEBUG_BLOCK_TYPE_MAX,
};
uint8_t description[];
};
+struct gen_debug_block_frame {
+ struct gen_debug_block_base base;
+ uint64_t frame_id;
+};
+
extern void *intel_debug_identifier(void);
extern uint32_t intel_debug_identifier_size(void);
"Anv") + 8, 8),
};
- if (!device->info.has_llc) {
- gen_clflush_range(device->workaround_bo->map,
- device->workaround_address.offset);
- }
+ device->debug_frame_desc =
+ intel_debug_get_identifier_block(device->workaround_bo->map,
+ device->workaround_bo->size,
+ GEN_DEBUG_BLOCK_TYPE_FRAME);
result = anv_device_init_trivial_batch(device);
if (result != VK_SUCCESS)
uint64_t perf_metric; /* 0 if unset */
struct gen_aux_map_context *aux_map_ctx;
+
+ struct gen_debug_block_frame *debug_frame_desc;
};
static inline struct anv_instance *
const VkPresentInfoKHR* pPresentInfo)
{
ANV_FROM_HANDLE(anv_queue, queue, _queue);
+ struct anv_device *device = queue->device;
+
+ if (device->debug_frame_desc) {
+ device->debug_frame_desc->frame_id++;
+ if (!device->info.has_llc) {
+ gen_clflush_range(device->debug_frame_desc,
+ sizeof(*device->debug_frame_desc));
+ }
+ }
return wsi_common_queue_present(&queue->device->physical->wsi_device,
anv_device_to_handle(queue->device),