@@ -258,7 +258,7 @@ uint32_t select_first(const std::vector<Runtime::DeviceMapping>& devices) {
258
258
// Global runtime initialization
259
259
//
260
260
261
- std::unique_ptr<Runtime> init_global_vulkan_runtime () {
261
+ std::unique_ptr<Runtime> init_global_vulkan_runtime (const std::string& cache_data_path ) {
262
262
// Load Vulkan drivers
263
263
#if defined(USE_VULKAN_VOLK)
264
264
if (VK_SUCCESS != volkInitialize ()) {
@@ -278,7 +278,6 @@ std::unique_ptr<Runtime> init_global_vulkan_runtime() {
278
278
#endif /* VULKAN_DEBUG */
279
279
const bool init_default_device = true ;
280
280
const uint32_t num_requested_queues = 1 ; // TODO: raise this value
281
- const std::string cache_data_path = " " ; // TODO: expose to client
282
281
283
282
const RuntimeConfig default_config{
284
283
enable_validation_messages,
@@ -377,13 +376,13 @@ uint32_t Runtime::create_adapter(const Selector& selector) {
377
376
return adapter_i;
378
377
}
379
378
380
- Runtime* runtime () {
379
+ Runtime* runtime (const std::string& cache_data_path ) {
381
380
// The global vulkan runtime is declared as a static local variable within a
382
381
// non-static function to ensure it has external linkage. If it were a global
383
382
// static variable there would be one copy per translation unit that includes
384
383
// Runtime.h as it would have internal linkage.
385
384
static const std::unique_ptr<Runtime> p_runtime =
386
- init_global_vulkan_runtime ();
385
+ init_global_vulkan_runtime (cache_data_path );
387
386
388
387
VK_CHECK_COND (
389
388
p_runtime,
0 commit comments