mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
Mali old DXVK: a failed detection keeps the last automatic choice, one Proton failing does not stop the others, the bridge file's driver_api counts unless promotion=on
When nothing could be read (no apps-vulkan file and VulkanInfo failing), every automatic choice was undone: a 1.1 phone went back to a DXVK that cannot start, and the next session flipped it again. Now an automatic choice is undone only when the Vulkan is known and wants none. Each Proton's swap or undo is on its own: a failure (a missing saved copy, an I/O error) is said in the result and the remaining Protons still get theirs. When the Proton is the same but its saved copy is gone, the choice stays and is said, instead of being forgotten with DXVK 1.10.3 still installed. apps-vulkan: the version counts only with promotion=on; otherwise, and in files from servers before the field (which wrote a promoted version even where it was not trusted), driver_api does. A file whose driver_api is not the driver's own version (a driver update, a server rolled back) is left out.
This commit is contained in:
1 parent
9040f828e9
commit
678e16af4d
3 files changed
+58
-11
No files matched your search
@@ -59,13 +59,24 @@ class BridgeDxvkTest {
|
||||
}
|
||||
|
||||
@Test fun theBridgesFileWinsForItsOwnGpuOnly() {
|
||||
val text = "device=Mali-G710 MC10\napi=1.2.177\ndriver_api=1.1.177\nshader_int64=0\nmax_push_constants=128\n"
|
||||
assertEquals(promoted, AppVulkan.fromBridgeFile(text, "Mali-G710 MC10"))
|
||||
assertEquals(promoted, AppVulkan.fromBridgeFile(text, null))
|
||||
val text = "device=Mali-G710 MC10\napi=1.2.177\ndriver_api=1.1.177\npromotion=on\nshader_int64=0\nmax_push_constants=128\n"
|
||||
val on = promoted.copy(source = "bridge, promoted")
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, "Mali-G710 MC10"))
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, null))
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, "Mali-G710 MC10", "1.1.177"))
|
||||
assertNull(AppVulkan.fromBridgeFile(text, "Mali-G720 Immortalis MC12"))
|
||||
assertNull(AppVulkan.fromBridgeFile("device=x\n", null))
|
||||
}
|
||||
|
||||
@Test fun withoutPromotionOnTheDriversVersionCounts() {
|
||||
val g710File = g710.copy(source = "bridge")
|
||||
val off = "device=Mali-G710 MC10\napi=1.1.177\ndriver_api=1.1.177\npromotion=off\nshader_int64=0\nmax_push_constants=128\n"
|
||||
assertEquals(g710File, AppVulkan.fromBridgeFile(off, "Mali-G710 MC10", "1.1.177"))
|
||||
val old = "device=Mali-G710 MC10\napi=1.3.177\ndriver_api=1.1.177\nshader_int64=0\nmax_push_constants=128\n"
|
||||
assertEquals(g710File, AppVulkan.fromBridgeFile(old, "Mali-G710 MC10"))
|
||||
assertNull(AppVulkan.fromBridgeFile(off, "Mali-G710 MC10", "1.3.212"))
|
||||
}
|
||||
|
||||
@Test fun anAdrenoSessionIsNotTouched() {
|
||||
proton("proton-exp")
|
||||
assertNull(run(g710, bridge = false))
|
||||
@@ -120,6 +131,30 @@ class BridgeDxvkTest {
|
||||
assertNull(state().getJSONObject("active").optJSONObject("proton-exp")?.optJSONObject("dxvk"))
|
||||
}
|
||||
|
||||
@Test fun aFailedDetectionKeepsTheLastAutomaticChoice() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
assertNull(run(null))
|
||||
assertEquals(old, state().getJSONObject("active").getJSONObject("proton-exp").getJSONObject("dxvk").getString("file"))
|
||||
}
|
||||
|
||||
@Test fun oneProtonFailingDoesNotStopTheOthers() {
|
||||
proton("ge")
|
||||
proton("proton-exp")
|
||||
val applied = mutableListOf<String>()
|
||||
val result = run(g710, applyAuto = { id, file -> if (id == "ge") error("disk full"); applied += "$id $file"; "swapped $id" })
|
||||
assertEquals(listOf("proton-exp $old"), applied)
|
||||
assertTrue(result!!, result.contains("disk full") && result.contains("swapped proton-exp"))
|
||||
}
|
||||
|
||||
@Test fun aChoiceWhoseSavedCopyIsGoneIsKept() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("label", "DXVK 1.10.3").put("protonVersion", "experimental-11").put("auto", true))
|
||||
val result = run(full, undoAuto = { id, comp -> ComponentsManager.undoAutoChoice(context, id, comp) })
|
||||
assertTrue(result!!, result.contains("its own copy is gone"))
|
||||
assertEquals(old, state().getJSONObject("active").getJSONObject("proton-exp").getJSONObject("dxvk").getString("file"))
|
||||
}
|
||||
|
||||
@Test fun aProtonUpdateWithNoRuleLeftJustForgetsTheChoice() {
|
||||
proton("proton-exp", "experimental-12")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
|
||||
Reference in new issue
Block a user