From 56e2dbc6198125bbc26ff7aef11a0c0e435400d4 Mon Sep 17 00:00:00 2001 From: xbzk Date: Mon, 13 Oct 2025 15:37:41 +0200 Subject: [PATCH 1/4] added barriers against zero valued overlayControlData.individualScale (#2721) Some recent change already in master caused some @android users to reach a state in which they were missing individualScale value to some input overlay controls. I was affected, and some fella in #tester-chat even shared a video. These 3 new barriers makes eden ignore individualScales if they're zeroed (feeding 1f instead), avoiding the crash, and allowing users to further adjust controls scales. Safe and functional. Co-authored-by: Allison Cunha Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2721 Reviewed-by: Lizzie Reviewed-by: Shinmegumi Co-authored-by: xbzk Co-committed-by: xbzk --- .../src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt index 9f050a5053..256e5968d1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt @@ -1039,7 +1039,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : scale /= 100f // Apply individual scale - scale *= overlayControlData.individualScale + scale *= overlayControlData.individualScale.let { if (it > 0f) it else 1f } // Initialize the InputOverlayDrawableButton. val defaultStateBitmap = getBitmap(context, defaultResId, scale) @@ -1114,7 +1114,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : // Apply individual scale if (dpadData != null) { - scale *= dpadData.individualScale + scale *= dpadData.individualScale.let { if (it > 0f) it else 1f } } // Initialize the InputOverlayDrawableDpad. @@ -1191,7 +1191,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : scale /= 100f // Apply individual scale - scale *= overlayControlData.individualScale + scale *= overlayControlData.individualScale.let { if (it > 0f) it else 1f } // Initialize the InputOverlayDrawableJoystick. val bitmapOuter = getBitmap(context, resOuter, scale) From cee78cc4cd2655e21c714dadaaba3ce4ec20958d Mon Sep 17 00:00:00 2001 From: Ribbit Date: Sun, 12 Oct 2025 21:20:12 -0700 Subject: [PATCH 2/4] maybe for the 100th time this will fix it --- src/video_core/vulkan_common/vulkan_device.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 0e0bec2ce3..06f774fa18 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -506,6 +506,13 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR "Qualcomm drivers have a slow VK_KHR_push_descriptor implementation"); //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + LOG_WARNING(Render_Vulkan, + "Disabling shader float controls and 64-bit integer features on Qualcomm proprietary drivers"); + RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME); + RemoveExtensionFeature(extensions.shader_atomic_int64, features.shader_atomic_int64, + VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME); + features.features.shaderInt64 = false; + #if defined(ANDROID) && defined(ARCHITECTURE_arm64) // Patch the driver to enable BCn textures. const auto major = (properties.properties.driverVersion >> 24) << 2; From 1450cafdad0c1c465ced6e653923717e9047e114 Mon Sep 17 00:00:00 2001 From: Ribbit Date: Mon, 13 Oct 2025 20:29:49 +0200 Subject: [PATCH 3/4] more changes to this --- src/video_core/renderer_vulkan/blit_image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index 68543bdd48..95ca93b339 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp @@ -1046,7 +1046,7 @@ void BlitImageHelper::ConvertDepthToColorPipeline(vk::Pipeline& pipeline, VkRend if (pipeline) { return; } - VkShaderModule frag_shader = *convert_float_to_depth_frag; + VkShaderModule frag_shader = *convert_depth_to_float_frag; const std::array stages = MakeStages(*full_screen_vert, frag_shader); const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device); pipeline = device.GetLogical().CreateGraphicsPipeline({ @@ -1076,7 +1076,7 @@ void BlitImageHelper::ConvertColorToDepthPipeline(vk::Pipeline& pipeline, VkRend if (pipeline) { return; } - VkShaderModule frag_shader = *convert_depth_to_float_frag; + VkShaderModule frag_shader = *convert_float_to_depth_frag; const std::array stages = MakeStages(*full_screen_vert, frag_shader); const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci = GetPipelineInputAssemblyStateCreateInfo(device); pipeline = device.GetLogical().CreateGraphicsPipeline({ From 74c11405ee70339afd096b9fa3b22f449a6e6048 Mon Sep 17 00:00:00 2001 From: Ribbit Date: Mon, 13 Oct 2025 21:04:12 +0200 Subject: [PATCH 4/4] even more changes --- src/video_core/renderer_vulkan/blit_image.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index 95ca93b339..fc6541fdfd 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp @@ -1061,8 +1061,8 @@ void BlitImageHelper::ConvertDepthToColorPipeline(vk::Pipeline& pipeline, VkRend .pViewportState = &PIPELINE_VIEWPORT_STATE_CREATE_INFO, .pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO, .pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, - .pDepthStencilState = &PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, - .pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_EMPTY_CREATE_INFO, + .pDepthStencilState = &nullptr, + .pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_GENERIC_CREATE_INFO, .pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO, .layout = *one_texture_pipeline_layout, .renderPass = renderpass, @@ -1092,7 +1092,7 @@ void BlitImageHelper::ConvertColorToDepthPipeline(vk::Pipeline& pipeline, VkRend .pRasterizationState = &PIPELINE_RASTERIZATION_STATE_CREATE_INFO, .pMultisampleState = &PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, .pDepthStencilState = &PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, - .pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_GENERIC_CREATE_INFO, + .pColorBlendState = &PIPELINE_COLOR_BLEND_STATE_EMPTY_CREATE_INFO, .pDynamicState = &PIPELINE_DYNAMIC_STATE_CREATE_INFO, .layout = *one_texture_pipeline_layout, .renderPass = renderpass,