| 89 | } |
| 90 | |
| 91 | CGPU_API void cgpu_free_instance(CGPUInstanceId instance) |
| 92 | { |
| 93 | SkrCZoneN(zz, "CGPUFreeInstance", 1); |
| 94 | |
| 95 | cgpu_assert(instance != CGPU_NULLPTR && "fatal: can't destroy NULL instance!"); |
| 96 | cgpu_assert(instance->proc_table->free_instance && "free_instance Proc Missing!"); |
| 97 | |
| 98 | struct CGPURuntimeTable* runtime_table = instance->runtime_table; |
| 99 | cgpu_early_free_runtime_table(runtime_table); |
| 100 | instance->proc_table->free_instance(instance); |
| 101 | cgpu_free_runtime_table(runtime_table); |
| 102 | |
| 103 | SkrCZoneEnd(zz); |
| 104 | } |
| 105 | |
| 106 | void cgpu_enum_adapters(CGPUInstanceId instance, CGPUAdapterId* const adapters, uint32_t* adapters_num) |
| 107 | { |