mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-24 11:50:44 +02:00
WEML toggle
This commit is contained in:
parent
095f27fd34
commit
471778c850
7 changed files with 22 additions and 4 deletions
|
|
@ -37,6 +37,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||
RENDERER_PATCH_OLD_QCOM_DRIVERS("patch_old_qcom_drivers"),
|
||||
RENDERER_VERTEX_INPUT_DYNAMIC_STATE("vertex_input_dynamic_state"),
|
||||
RENDERER_DYNAMIC_RENDERING("dynamic_rendering"),
|
||||
RENDERER_WORKGROUP_MEMORY_EXPLICIT_LAYOUT("workgroup_memory_explicit_layout"),
|
||||
RENDERER_SAMPLE_SHADING("sample_shading"),
|
||||
GPU_UNSWIZZLE_ENABLED("gpu_unswizzle_enabled"),
|
||||
PICTURE_IN_PICTURE("picture_in_picture"),
|
||||
|
|
|
|||
|
|
@ -162,6 +162,13 @@ abstract class SettingsItem(
|
|||
descriptionId = R.string.dynamic_rendering_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_WORKGROUP_MEMORY_EXPLICIT_LAYOUT,
|
||||
titleId = R.string.workgroup_memory_explicit_layout,
|
||||
descriptionId = R.string.workgroup_memory_explicit_layout_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SliderSetting(
|
||||
IntSetting.RENDERER_SAMPLE_SHADING,
|
||||
|
|
|
|||
|
|
@ -314,6 +314,7 @@ class SettingsFragmentPresenter(
|
|||
add(IntSetting.RENDERER_DYNA_STATE.key)
|
||||
add(BooleanSetting.RENDERER_VERTEX_INPUT_DYNAMIC_STATE.key)
|
||||
add(BooleanSetting.RENDERER_DYNAMIC_RENDERING.key)
|
||||
add(BooleanSetting.RENDERER_WORKGROUP_MEMORY_EXPLICIT_LAYOUT.key)
|
||||
add(IntSetting.RENDERER_SAMPLE_SHADING.key)
|
||||
|
||||
add(HeaderSetting(R.string.display))
|
||||
|
|
|
|||
|
|
@ -546,6 +546,8 @@
|
|||
<string name="vertex_input_dynamic_state_description">Enabling this feature allows for more flexible vertex input handling, potentially reducing pipeline compilation time in vertex/buffer.</string>
|
||||
<string name="dynamic_rendering">Dynamic Rendering</string>
|
||||
<string name="dynamic_rendering_description">Render without render pass and framebuffer objects. Results vary by driver: some gain performance, others lose it.</string>
|
||||
<string name="workgroup_memory_explicit_layout">Workgroup Memory Explicit Layout</string>
|
||||
<string name="workgroup_memory_explicit_layout_description">Let shaders declare explicit layouts for workgroup memory. Disabled by default: some Qualcomm drivers are unstable with it.</string>
|
||||
<string name="sample_shading_fraction">Sample Shading</string>
|
||||
<string name="sample_shading_fraction_description">Allows the fragment shader to execute per sample in a multi-sampled fragment instead once per fragment. Improves graphics quality at the cost of some performance.</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -638,6 +638,9 @@ struct Values {
|
|||
SwitchableSetting<bool> dynamic_rendering{linkage, true, "dynamic_rendering",
|
||||
Category::RendererExtensions};
|
||||
|
||||
SwitchableSetting<bool> workgroup_memory_explicit_layout{
|
||||
linkage, false, "workgroup_memory_explicit_layout", Category::RendererExtensions};
|
||||
|
||||
SwitchableSetting<s32, true> pipeline_worker_count{
|
||||
linkage, 2, 2, 8, "pipeline_worker_count", Category::RendererAdvanced,
|
||||
Specialization::Scalar};
|
||||
|
|
|
|||
|
|
@ -294,6 +294,8 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
|||
tr("Renders without render pass and framebuffer objects.\n"
|
||||
"Results vary by driver: some gain performance, others lose it."));
|
||||
|
||||
INSERT(Settings, workgroup_memory_explicit_layout, QString(), QString());
|
||||
|
||||
INSERT(
|
||||
Settings, sample_shading, tr("Sample Shading"),
|
||||
tr("Allows the fragment shader to execute per sample in a multi-sampled fragment "
|
||||
|
|
|
|||
|
|
@ -539,10 +539,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
|||
features.shader_atomic_int64.shaderBufferInt64Atomics = false;
|
||||
features.shader_atomic_int64.shaderSharedInt64Atomics = false;
|
||||
features.features.shaderInt64 = false;
|
||||
LOG_WARNING(Render_Vulkan, "Qualcomm drivers have broken workgroup memory explicit layout.");
|
||||
RemoveExtensionFeature(extensions.workgroup_memory_explicit_layout,
|
||||
features.workgroup_memory_explicit_layout,
|
||||
VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME);
|
||||
|
||||
#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)
|
||||
// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.
|
||||
|
|
@ -1514,6 +1510,12 @@ void Device::RemoveUnsuitableExtensions() {
|
|||
}
|
||||
|
||||
// VK_KHR_workgroup_memory_explicit_layout
|
||||
#ifdef __ANDROID__
|
||||
if (!Settings::values.workgroup_memory_explicit_layout.GetValue()) {
|
||||
LOG_INFO(Render_Vulkan, "Workgroup memory explicit layout disabled by user setting");
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout = false;
|
||||
}
|
||||
#endif
|
||||
extensions.workgroup_memory_explicit_layout =
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout &&
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue