VERY experimental Nintendo Switch 2 emulator
C++
android: video_core: Disable some problematic things on GPU Normal.
bunneiac32fd08e9c0
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cppindex 2f986097f9..62d70e9f3c 100644--- a/src/video_core/engines/maxwell_3d.cpp+++ b/src/video_core/engines/maxwell_3d.cpp@@ -593,6 +593,12 @@ void Maxwell3D::ProcessQueryCondition() {}void Maxwell3D::ProcessCounterReset() {+#if ANDROID+ if (!Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ return;+ }+#endifswitch (regs.clear_report_value) {case Regs::ClearReport::ZPassPixelCount:rasterizer->ResetCounter(QueryType::SamplesPassed);@@ -614,6 +620,12 @@ std::optional<u64> Maxwell3D::GetQueryResult() {case Regs::ReportSemaphore::Report::Payload:return regs.report_semaphore.payload;case Regs::ReportSemaphore::Report::ZPassPixelCount64:+#if ANDROID+ if (!Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ return 120;+ }+#endif// Deferred.rasterizer->Query(regs.report_semaphore.Address(), QueryType::SamplesPassed,system.GPU().GetTicks());diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cppindex 8d3a9736b3..4f2346a50a 100644--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp@@ -188,7 +188,14 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) {FlushWork();gpu_memory->FlushCaching();+#if ANDROID+ if (Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ query_cache.UpdateCounters();+ }+#elsequery_cache.UpdateCounters();+#endifGraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()};if (!pipeline) {@@ -272,7 +279,14 @@ void RasterizerVulkan::DrawTexture() {SCOPE_EXIT({ gpu.TickWork(); });FlushWork();+#if ANDROID+ if (Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ query_cache.UpdateCounters();+ }+#elsequery_cache.UpdateCounters();+#endiftexture_cache.SynchronizeGraphicsDescriptors();texture_cache.UpdateRenderTargets(false);diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cppindex 80455ec080..17ef611478 100644--- a/src/video_core/renderer_vulkan/vk_scheduler.cpp+++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp@@ -239,7 +239,14 @@ u64 Scheduler::SubmitExecution(VkSemaphore signal_semaphore, VkSemaphore wait_sevoid Scheduler::AllocateNewContext() {// Enable counters once again. These are disabled when a command buffer is finished.if (query_cache) {+#if ANDROID+ if (Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ query_cache->UpdateCounters();+ }+#elsequery_cache->UpdateCounters();+#endif}}@@ -250,7 +257,14 @@ void Scheduler::InvalidateState() {}void Scheduler::EndPendingOperations() {+#if ANDROID+ if (Settings::IsGPULevelHigh()) {+ // This is problematic on Android, disable on GPU Normal.+ query_cache->DisableStreams();+ }+#elsequery_cache->DisableStreams();+#endifEndRenderPass();}