mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 07:34:19 +01:00
Add a hack to disable shader subgroup shuffles
These are about 100x as expensive on adreno than nvidia due to the lack of a dedicated instruction, since some games work fine without them add a hack to disable them.
This commit is contained in:
parent
568306195f
commit
bb3baa888d
@ -1 +1 @@
|
|||||||
Subproject commit ffcaed48cd067a4e720740c09578641d29043c0d
|
Subproject commit 8e1d729db9f47b139ded28f74c6c9967c8412152
|
@ -44,8 +44,9 @@ namespace skyline {
|
|||||||
executorFlushThreshold = ktSettings.GetInt<u32>("executorFlushThreshold");
|
executorFlushThreshold = ktSettings.GetInt<u32>("executorFlushThreshold");
|
||||||
useDirectMemoryImport = ktSettings.GetBool("useDirectMemoryImport");
|
useDirectMemoryImport = ktSettings.GetBool("useDirectMemoryImport");
|
||||||
forceMaxGpuClocks = ktSettings.GetBool("forceMaxGpuClocks");
|
forceMaxGpuClocks = ktSettings.GetBool("forceMaxGpuClocks");
|
||||||
enableFastGpuReadbackHack = ktSettings.GetBool("enableFastGpuReadbackHack");
|
|
||||||
disableShaderCache = ktSettings.GetBool("disableShaderCache");
|
disableShaderCache = ktSettings.GetBool("disableShaderCache");
|
||||||
|
enableFastGpuReadbackHack = ktSettings.GetBool("enableFastGpuReadbackHack");
|
||||||
|
disableSubgroupShuffle = ktSettings.GetBool("disableSubgroupShuffle");
|
||||||
isAudioOutputDisabled = ktSettings.GetBool("isAudioOutputDisabled");
|
isAudioOutputDisabled = ktSettings.GetBool("isAudioOutputDisabled");
|
||||||
validationLayer = ktSettings.GetBool("validationLayer");
|
validationLayer = ktSettings.GetBool("validationLayer");
|
||||||
};
|
};
|
||||||
|
@ -80,6 +80,7 @@ namespace skyline {
|
|||||||
|
|
||||||
// Hacks
|
// Hacks
|
||||||
Setting<bool> enableFastGpuReadbackHack; //!< If the CPU texture readback skipping hack should be used
|
Setting<bool> enableFastGpuReadbackHack; //!< If the CPU texture readback skipping hack should be used
|
||||||
|
Setting<bool> disableSubgroupShuffle; //!< If shader subgroup suffle operations should be ignored
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
Setting<bool> isAudioOutputDisabled; //!< Disables audio output
|
Setting<bool> isAudioOutputDisabled; //!< Disables audio output
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <range/v3/algorithm.hpp>
|
#include <range/v3/algorithm.hpp>
|
||||||
#include <boost/functional/hash.hpp>
|
#include <boost/functional/hash.hpp>
|
||||||
#include <gpu.h>
|
#include <gpu.h>
|
||||||
|
#include <common/settings.h>
|
||||||
#include <shader_compiler/common/settings.h>
|
#include <shader_compiler/common/settings.h>
|
||||||
#include <shader_compiler/common/log.h>
|
#include <shader_compiler/common/log.h>
|
||||||
#include <shader_compiler/frontend/maxwell/translate_program.h>
|
#include <shader_compiler/frontend/maxwell/translate_program.h>
|
||||||
@ -122,6 +123,7 @@ namespace skyline::gpu {
|
|||||||
.has_broken_spirv_subgroup_mask_vector_extract_dynamic = traits.quirks.brokenSubgroupMaskExtractDynamic,
|
.has_broken_spirv_subgroup_mask_vector_extract_dynamic = traits.quirks.brokenSubgroupMaskExtractDynamic,
|
||||||
.has_broken_spirv_subgroup_shuffle = traits.quirks.brokenSubgroupShuffle,
|
.has_broken_spirv_subgroup_shuffle = traits.quirks.brokenSubgroupShuffle,
|
||||||
.max_subgroup_size = traits.subgroupSize,
|
.max_subgroup_size = traits.subgroupSize,
|
||||||
|
.disable_subgroup_shuffle = *state.settings->disableSubgroupShuffle
|
||||||
};
|
};
|
||||||
|
|
||||||
Shader::Settings::values = {
|
Shader::Settings::values = {
|
||||||
|
@ -34,6 +34,7 @@ class NativeSettings(context : Context, pref : PreferenceSettings) {
|
|||||||
|
|
||||||
// Hacks
|
// Hacks
|
||||||
var enableFastGpuReadbackHack : Boolean = pref.enableFastGpuReadbackHack
|
var enableFastGpuReadbackHack : Boolean = pref.enableFastGpuReadbackHack
|
||||||
|
var disableSubgroupShuffle : Boolean = pref.disableSubgroupShuffle
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
var isAudioOutputDisabled : Boolean = pref.isAudioOutputDisabled
|
var isAudioOutputDisabled : Boolean = pref.isAudioOutputDisabled
|
||||||
|
@ -49,6 +49,7 @@ class PreferenceSettings @Inject constructor(@ApplicationContext private val con
|
|||||||
|
|
||||||
// Hacks
|
// Hacks
|
||||||
var enableFastGpuReadbackHack by sharedPreferences(context, false)
|
var enableFastGpuReadbackHack by sharedPreferences(context, false)
|
||||||
|
var disableSubgroupShuffle by sharedPreferences(context, false)
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
var isAudioOutputDisabled by sharedPreferences(context, false)
|
var isAudioOutputDisabled by sharedPreferences(context, false)
|
||||||
|
@ -96,6 +96,10 @@
|
|||||||
<string name="enable_fast_gpu_readback">Enable fast GPU readback</string>
|
<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_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_gpu_readback_disabled">Fast GPU readback is disabled (Ensures highest accuracy)</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>
|
||||||
|
|
||||||
<!-- Settings - Audio -->
|
<!-- Settings - Audio -->
|
||||||
<string name="audio">Audio</string>
|
<string name="audio">Audio</string>
|
||||||
<string name="disable_audio_output">Disable Audio Output</string>
|
<string name="disable_audio_output">Disable Audio Output</string>
|
||||||
|
@ -186,6 +186,12 @@
|
|||||||
android:summaryOn="@string/enable_fast_gpu_readback_enabled"
|
android:summaryOn="@string/enable_fast_gpu_readback_enabled"
|
||||||
app:key="enable_fast_gpu_readback_hack"
|
app:key="enable_fast_gpu_readback_hack"
|
||||||
app:title="@string/enable_fast_gpu_readback" />
|
app:title="@string/enable_fast_gpu_readback" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:summaryOff="@string/disable_subgroup_shuffle_disabled"
|
||||||
|
android:summaryOn="@string/disable_subgroup_shuffle_enabled"
|
||||||
|
app:key="disable_subgroup_shuffle"
|
||||||
|
app:title="@string/disable_subgroup_shuffle" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="category_audio"
|
android:key="category_audio"
|
||||||
|
Loading…
Reference in New Issue
Block a user