Merge pull request 'perf(pipeline): shared, disk-persisted VkPipelineCache (#69)' (#97) from claude/issue-69 into master

This commit is contained in:
catbot 2026-06-16 20:24:03 +02:00
commit bd8076769a
7 changed files with 332 additions and 5 deletions

View file

@ -616,6 +616,35 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
hitImpls.emplace_back("tests/InputFieldHitTest/main");
hc.GetInterfacesAndImplementations(ifaces, hitImpls);
cfg.tests.push_back(std::move(hitTest));
// Issue #69: the engine feeds one shared Device::pipelineCache to every
// vkCreate*Pipelines call and persists it across runs, discarding an
// on-disk blob whose header doesn't match the current GPU. That gate —
// Device::PipelineCacheDataCompatible — is pure logic over the standard
// VkPipelineCache header and Device::deviceProperties, so this test
// stamps synthetic device identities + headers and drives it directly,
// no GPU device needed at runtime.
Test cacheTest;
Configuration& cc = cacheTest.config;
cc.path = cfg.path;
cc.name = "PipelineCacheValidation";
cc.outputName = "PipelineCacheValidation";
cc.type = ConfigurationType::Executable;
cc.target = cfg.target;
cc.march = cfg.march;
cc.mtune = cfg.mtune;
cc.debug = cfg.debug;
cc.sysroot = cfg.sysroot;
cc.dependencies = cfg.dependencies;
cc.externalDependencies = cfg.externalDependencies;
cc.compileFlags = cfg.compileFlags;
cc.linkFlags = cfg.linkFlags;
cc.defines = cfg.defines;
cc.cFiles = cfg.cFiles;
std::vector<fs::path> cacheImpls(impls.begin(), impls.end());
cacheImpls.emplace_back("tests/PipelineCacheValidation/main");
cc.GetInterfacesAndImplementations(ifaces, cacheImpls);
cfg.tests.push_back(std::move(cacheTest));
}
return cfg;