From 1073722cdf9c7d2db17163794009dd0d8871a72d Mon Sep 17 00:00:00 2001 From: iwubcode Date: Wed, 3 Jan 2024 18:43:44 -0600 Subject: [PATCH] Revert "VideoCommon: revert max pixel shader samplers back to 8 for Android devices." This reverts commit 79648e1c24eac81f54365bbcb6dbc49ad6b16b1c. --- Source/Core/VideoBackends/Vulkan/ObjectCache.cpp | 7 ------- Source/Core/VideoCommon/Constants.h | 7 ------- .../Runtime/GraphicsModActionFactory.cpp | 12 ------------ 3 files changed, 26 deletions(-) diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp index a27d4457e2..c32365f3fc 100644 --- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp @@ -121,12 +121,6 @@ bool ObjectCache::CreateDescriptorSetLayouts() VK_SHADER_STAGE_GEOMETRY_BIT}, }}; -#ifdef ANDROID - static const std::array standard_sampler_bindings{{ - {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, - static_cast(VideoCommon::MAX_PIXEL_SHADER_SAMPLERS), VK_SHADER_STAGE_FRAGMENT_BIT}, - }}; -#else constexpr u32 MAX_PIXEL_SAMPLER_ARRAY_SIZE = 8; constexpr u32 TOTAL_PIXEL_SAMPLER_BINDINGS = 1 + (VideoCommon::MAX_PIXEL_SHADER_SAMPLERS - MAX_PIXEL_SAMPLER_ARRAY_SIZE); @@ -145,7 +139,6 @@ bool ObjectCache::CreateDescriptorSetLayouts() {14, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT}, {15, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT}, }}; -#endif // The dynamic veretex loader's vertex buffer must be last here, for similar reasons static const std::array standard_ssbo_bindings{{ diff --git a/Source/Core/VideoCommon/Constants.h b/Source/Core/VideoCommon/Constants.h index 4f846bdd1b..2d411acead 100644 --- a/Source/Core/VideoCommon/Constants.h +++ b/Source/Core/VideoCommon/Constants.h @@ -7,13 +7,6 @@ namespace VideoCommon { -#ifdef ANDROID -// Some devices seem to have graphical errors when providing 16 pixel samplers -// given the logic is for a performance heavy feature (custom shaders), will just disable for now -// TODO: handle this more elegantly -constexpr u32 MAX_PIXEL_SHADER_SAMPLERS = 8; -#else constexpr u32 MAX_PIXEL_SHADER_SAMPLERS = 16; -#endif constexpr u32 MAX_COMPUTE_SHADER_SAMPLERS = 8; } // namespace VideoCommon diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp index 57f7e2f313..6ff64aa038 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp @@ -3,9 +3,6 @@ #include "VideoCommon/GraphicsModSystem/Runtime/GraphicsModActionFactory.h" -#include "Common/Logging/Log.h" - -#include "VideoCommon/Constants.h" #include "VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.h" #include "VideoCommon/GraphicsModSystem/Runtime/Actions/MoveAction.h" #include "VideoCommon/GraphicsModSystem/Runtime/Actions/PrintAction.h" @@ -35,16 +32,7 @@ std::unique_ptr Create(std::string_view name, const picojson: } else if (name == "custom_pipeline") { -#ifdef ANDROID - // Custom shaders currently need more than 8 pixel samplers - // to be used with textures, rather than make things complicated - // just disable the feature for Android which has issues - ERROR_LOG_FMT(VIDEO, "Android needs more than 8 pixel samplers to function, {} provided", - VideoCommon::MAX_PIXEL_SHADER_SAMPLERS); - return nullptr; -#else return CustomPipelineAction::Create(json_data, std::move(library)); -#endif } return nullptr;