Quest Fixed Vulkan pipeline cache management and storage mechanisms

This commit is contained in:
iChris4 committed 2026-09-18 23:38:55 +02:00
1 parent bf3b53555b
commit d4a3f0b350
10 files changed
+176 -19

No files matched your search

+4 -1
View File
@@ -539,7 +539,10 @@ function Invoke-QuestGameBuild {
}
$allObjects = @($sources.Keys | ForEach-Object { $objectsOf[$_] } | ForEach-Object { & $escape $_.Substring($build.Length + 1) })
$rspInputs = ($linkInputs | ForEach-Object { ConvertTo-QuotedArgument $_ }) -join ' '
[void]$ninjaText.AppendLine("build libmain.so: link $($allObjects -join ' ')`n flags = $(& $escape "$build/link.rsp")`n inputs = $($rspInputs.Replace('$', '$$'))")
# The kit's objects and archives keep their names from one kit export to the next, so they are
# implicit inputs of the link: a game built against an earlier kit is relinked, not reused.
$kitInputs = @($linkInputs | Where-Object { $_.StartsWith($kit) } | ForEach-Object { & $escape $_ })
[void]$ninjaText.AppendLine("build libmain.so: link $($allObjects -join ' ') | $($kitInputs -join ' ')`n flags = $(& $escape "$build/link.rsp")`n inputs = $($rspInputs.Replace('$', '$$'))")
[IO.File]::WriteAllText("$build/build.ninja", $ninjaText.ToString(), (New-Object Text.UTF8Encoding $false))
# Ninja's progress goes to the console, not into this function's return value; its [n/N]
@@ -97,13 +97,17 @@ class QuestActivity : SDLActivity() {
/**
* Copies runtime_resources/ from the APK assets into private storage the
* first time this build runs. A stamp file keyed on the version code keeps
* every later launch to one existence check.
* first time this build runs. A stamp file keyed on the version and the
* install time keeps every later launch to one existence check.
*/
private fun unpackRuntimeResources(): File {
val target = File(filesDir, "runtime_resources")
val stamp = File(target, ".version")
val expected = "${BuildConfig.VERSION_CODE}:${BuildConfig.VERSION_NAME}"
// The version fields stay the same across sideloaded builds, so the install time is what
// keeps a rebuilt APK from reusing the previous build's bundled pipeline cache.
@Suppress("DEPRECATION")
val installedAt = packageManager.getPackageInfo(packageName, 0).lastUpdateTime
val expected = "${BuildConfig.VERSION_CODE}:${BuildConfig.VERSION_NAME}:$installedAt"
if (stamp.isFile && stamp.readText() == expected) {
return target
}