// Vulkan 后端暂不提供的 Metal 统计 / 调度接口:一律「无数据」,宿主诊断按缺数据处理 // Metal statistics / scheduling interfaces the Vulkan backend does not provide yet: all "no data", host diagnostics treat them as missing #include "../../host/dm.h" #include "nvn_obj.h" #include "nvn_mtl.h" uint32_t mtl_present_qos(void) { return 0; } __attribute__((weak)) int dm_fps_setting(void) { return 60; } // 宿主 dm_custom.c 提供强定义(省电模式 eco_fps) | The host's dm_custom.c provides the strong definition (power-saving mode eco_fps) int mtl_fps_target(void) { // 与 nvn_mtl.m 同义:DM_FPS=30/60 钉住,否则跟自定义页的省电模式 | Same as nvn_mtl.m: DM_FPS=30/60 pins it, otherwise follows the Custom page's power-saving mode static int env = -2; if (env == -2) { const char *e = getenv("DM_FPS"); env = e ? atoi(e) : -1; if (env != 30 && env != 60) env = -1; } return env > 0 ? env : dm_fps_setting() == 30 ? 30 : 60; } void mtl_args_stats(uint64_t *enc, uint64_t *reuse) { *enc = *reuse = 0; } void mtl_use_stats(uint64_t *call, uint64_t *skip) { *call = *skip = 0; } uint64_t mtl_ds_omit(void) { return 0; } uint64_t mtl_drawable_ns_take(void) { return 0; } void mtl_bw(uint64_t *load, uint64_t *store, uint64_t *full_rw_passes) { *load = *store = *full_rw_passes = 0; } uint64_t mtl_udc_saved_bytes(void) { return 0; } uint64_t mtl_pkg_miss(void) { return 0; } uint64_t mtl_upload_ns_take(void) { return 0; } uint64_t mtl_upload_gpu_ns_take(void) { return 0; } void mtl_alloc_stats(uint64_t *waits, uint64_t *grown, int *n) { *waits = *grown = 0; *n = 0; } void mtl_mem_stat(unsigned long long frame, unsigned long long rss_mb, int heap_ok, unsigned long long heap_mb, unsigned long long heap_free_mb, unsigned long long heap_maxblk_kb) { (void)frame; (void)rss_mb; (void)heap_ok; (void)heap_mb; (void)heap_free_mb; (void)heap_maxblk_kb; } int dm_nvn_ruler_truth(void) { return 0; }