mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-26 00:06:02 +00:00
feat: add an A740 UBWC compatibility override
This commit is contained in:
1 parent
a4447039b9
commit
fc768a3c45
13 files changed
+168
-11
No files matched your search
@@ -3,6 +3,7 @@ package com.droiddeck.launcher.gpu
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
class TpUbwcHintTest {
|
||||
@Test fun a740OnABlobV6xxTurnsTheHintOff() {
|
||||
@@ -18,6 +19,24 @@ class TpUbwcHintTest {
|
||||
assertEquals("enable_tp_ubwc_flag_hint=1", TpUbwcHint.features(740, null, samsung = true))
|
||||
}
|
||||
|
||||
@Test fun onOverridesThePocoRuleEvenWhenTheVersionIsUnreadable() {
|
||||
for (version in listOf("512.676.1", "512.676.53", "garbage", null)) {
|
||||
assertEquals("enable_tp_ubwc_flag_hint=1", TpUbwcHint.features(740, version, mode = SessionPrefs.TP_UBWC_ON))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun offOverridesSamsungAndNewerBlobs() {
|
||||
assertEquals("enable_tp_ubwc_flag_hint=0", TpUbwcHint.features(740, "512.762.10", mode = SessionPrefs.TP_UBWC_OFF))
|
||||
assertEquals("enable_tp_ubwc_flag_hint=0", TpUbwcHint.features(740, null, samsung = true, mode = SessionPrefs.TP_UBWC_OFF))
|
||||
}
|
||||
|
||||
@Test fun overridesDoNotApplyToOtherGpus() {
|
||||
for (mode in listOf(SessionPrefs.TP_UBWC_ON, SessionPrefs.TP_UBWC_OFF)) {
|
||||
assertNull(TpUbwcHint.features(750, "512.762.10", mode = mode))
|
||||
assertNull(TpUbwcHint.features(0, null, mode = mode))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun otherGpusKeepTheirDriverDefault() {
|
||||
assertNull(TpUbwcHint.features(750, "512.762.10"))
|
||||
assertNull(TpUbwcHint.features(830, "512.676.53"))
|
||||
|
||||
Reference in new issue
Block a user