mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-22 22:11:49 +01:00
Add an option to allow CPU writes when fast readback is used
This commit is contained in:
parent
2d56ed053d
commit
a47f010653
@ -46,6 +46,7 @@ namespace skyline {
|
||||
forceMaxGpuClocks = ktSettings.GetBool("forceMaxGpuClocks");
|
||||
disableShaderCache = ktSettings.GetBool("disableShaderCache");
|
||||
enableFastGpuReadbackHack = ktSettings.GetBool("enableFastGpuReadbackHack");
|
||||
enableFastReadbackWrites = ktSettings.GetBool("enableFastReadbackWrites");
|
||||
disableSubgroupShuffle = ktSettings.GetBool("disableSubgroupShuffle");
|
||||
isAudioOutputDisabled = ktSettings.GetBool("isAudioOutputDisabled");
|
||||
validationLayer = ktSettings.GetBool("validationLayer");
|
||||
|
@ -80,6 +80,7 @@ namespace skyline {
|
||||
|
||||
// Hacks
|
||||
Setting<bool> enableFastGpuReadbackHack; //!< If the CPU texture readback skipping hack should be used
|
||||
Setting<bool> enableFastReadbackWrites; //!< If buffers should be treated as CPU dirty when written with the readback hack
|
||||
Setting<bool> disableSubgroupShuffle; //!< If shader subgroup suffle operations should be ignored
|
||||
|
||||
// Audio
|
||||
|
@ -98,7 +98,7 @@ namespace skyline::gpu {
|
||||
// As opposed to skipping readback as we do for textures, with buffers we can still perform the readback but just without syncinc the GPU
|
||||
// While the read data may be invalid it's still better than nothing and works in most cases
|
||||
memcpy(buffer->mirror.data(), buffer->backing->data(), buffer->mirror.size());
|
||||
buffer->dirtyState = DirtyState::Clean;
|
||||
buffer->dirtyState = *buffer->gpu.state.settings->enableFastReadbackWrites ? DirtyState::CpuDirty : DirtyState::Clean;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ class NativeSettings(context : Context, pref : PreferenceSettings) {
|
||||
|
||||
// Hacks
|
||||
var enableFastGpuReadbackHack : Boolean = pref.enableFastGpuReadbackHack
|
||||
var enableFastReadbackWrites : Boolean = pref.enableFastReadbackWrites
|
||||
var disableSubgroupShuffle : Boolean = pref.disableSubgroupShuffle
|
||||
|
||||
// Audio
|
||||
|
@ -49,6 +49,7 @@ class PreferenceSettings @Inject constructor(@ApplicationContext private val con
|
||||
|
||||
// Hacks
|
||||
var enableFastGpuReadbackHack by sharedPreferences(context, false)
|
||||
var enableFastReadbackWrites by sharedPreferences(context, false)
|
||||
var disableSubgroupShuffle by sharedPreferences(context, false)
|
||||
|
||||
// Audio
|
||||
|
@ -96,6 +96,9 @@
|
||||
<string name="enable_fast_gpu_readback">Enable fast GPU readback</string>
|
||||
<string name="enable_fast_gpu_readback_enabled">Fast GPU readback is enabled (Will break some games but others will have higher performance)</string>
|
||||
<string name="enable_fast_gpu_readback_disabled">Fast GPU readback is disabled (Ensures highest accuracy)</string>
|
||||
<string name="enable_fast_readback_writes">Enable fast readback writes</string>
|
||||
<string name="enable_fast_readback_writes_enabled">Fast readback writes are enabled</string>
|
||||
<string name="enable_fast_readback_writes_disabled">Fast readback writes are disabled</string>
|
||||
<string name="disable_subgroup_shuffle">Disable GPU subgroup shuffle</string>
|
||||
<string name="disable_subgroup_shuffle_enabled">Shader subgroup shuffle operations are disabled, may cause severe graphical issues</string>
|
||||
<string name="disable_subgroup_shuffle_disabled">Shader subgroup shuffle operations are enabled, ensures maximum accuracy</string>
|
||||
|
@ -186,6 +186,13 @@
|
||||
android:summaryOn="@string/enable_fast_gpu_readback_enabled"
|
||||
app:key="enable_fast_gpu_readback_hack"
|
||||
app:title="@string/enable_fast_gpu_readback" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="enable_fast_gpu_readback_hack"
|
||||
android:summaryOff="@string/enable_fast_readback_writes_disabled"
|
||||
android:summaryOn="@string/enable_fast_readback_writes_enabled"
|
||||
app:key="enable_fast_readback_writes"
|
||||
app:title="@string/enable_fast_readback_writes" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:summaryOff="@string/disable_subgroup_shuffle_disabled"
|
||||
|
Loading…
Reference in New Issue
Block a user