uint8_t device_uuid[VK_UUID_SIZE];
uint8_t rt_uuid[VK_UUID_SIZE];
+ /* Maximum amount of scratch space used by all the GRL kernels */
+ uint32_t max_grl_scratch_size;
+
struct vk_sync_type sync_syncobj_type;
struct vk_sync_timeline_type sync_timeline_type;
const struct vk_sync_type * sync_types[4];
assert(pdevice->info.verx10 == GFX_VERx10);
#if GFX_VERx10 >= 125 && ANV_SUPPORT_RT
genX(grl_load_rt_uuid)(pdevice->rt_uuid);
+ pdevice->max_grl_scratch_size = genX(grl_max_scratch_size)();
#endif
}
void
genX(grl_load_rt_uuid)(uint8_t *out_uuid);
+uint32_t
+genX(grl_max_scratch_size)(void);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
genX(cmd_buffer_dispatch_kernel)(cmd_buffer, &ak, global_size,
arg_count, args);
}
+
+uint32_t
+genX(grl_max_scratch_size)(void)
+{
+ uint32_t scratch_size = 0;
+
+ for (uint32_t i = 0; i < GRL_CL_KERNEL_MAX; i++) {
+ struct brw_kernel kernel_data;
+ genX(grl_get_cl_kernel)(&kernel_data, i);
+
+ scratch_size = MAX2(kernel_data.prog_data.base.total_scratch,
+ scratch_size);
+ }
+
+ return scratch_size;
+}