summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2023-05-05 18:00:00 -0700
committerGravatar bunnei2023-06-03 00:06:00 -0700
commitbefd4772799b5e0d2939a91e79f6b123c320e77d (patch)
tree4961858a38f8b68cc2d1633336e9267b02c2b62f /src
parentandroid: settings: Use mailbox vsync by default. (diff)
downloadyuzu-befd4772799b5e0d2939a91e79f6b123c320e77d.tar.gz
yuzu-befd4772799b5e0d2939a91e79f6b123c320e77d.tar.xz
yuzu-befd4772799b5e0d2939a91e79f6b123c320e77d.zip
android: video_core: Disable some problematic things on GPU Normal.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp12
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp14
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.cpp14
3 files changed, 40 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 2f986097f..62d70e9f3 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -593,6 +593,12 @@ void Maxwell3D::ProcessQueryCondition() {
593} 593}
594 594
595void Maxwell3D::ProcessCounterReset() { 595void Maxwell3D::ProcessCounterReset() {
596#if ANDROID
597 if (!Settings::IsGPULevelHigh()) {
598 // This is problematic on Android, disable on GPU Normal.
599 return;
600 }
601#endif
596 switch (regs.clear_report_value) { 602 switch (regs.clear_report_value) {
597 case Regs::ClearReport::ZPassPixelCount: 603 case Regs::ClearReport::ZPassPixelCount:
598 rasterizer->ResetCounter(QueryType::SamplesPassed); 604 rasterizer->ResetCounter(QueryType::SamplesPassed);
@@ -614,6 +620,12 @@ std::optional<u64> Maxwell3D::GetQueryResult() {
614 case Regs::ReportSemaphore::Report::Payload: 620 case Regs::ReportSemaphore::Report::Payload:
615 return regs.report_semaphore.payload; 621 return regs.report_semaphore.payload;
616 case Regs::ReportSemaphore::Report::ZPassPixelCount64: 622 case Regs::ReportSemaphore::Report::ZPassPixelCount64:
623#if ANDROID
624 if (!Settings::IsGPULevelHigh()) {
625 // This is problematic on Android, disable on GPU Normal.
626 return 120;
627 }
628#endif
617 // Deferred. 629 // Deferred.
618 rasterizer->Query(regs.report_semaphore.Address(), QueryType::SamplesPassed, 630 rasterizer->Query(regs.report_semaphore.Address(), QueryType::SamplesPassed,
619 system.GPU().GetTicks()); 631 system.GPU().GetTicks());
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 8d3a9736b..4f2346a50 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) {
188 FlushWork(); 188 FlushWork();
189 gpu_memory->FlushCaching(); 189 gpu_memory->FlushCaching();
190 190
191#if ANDROID
192 if (Settings::IsGPULevelHigh()) {
193 // This is problematic on Android, disable on GPU Normal.
194 query_cache.UpdateCounters();
195 }
196#else
191 query_cache.UpdateCounters(); 197 query_cache.UpdateCounters();
198#endif
192 199
193 GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()}; 200 GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()};
194 if (!pipeline) { 201 if (!pipeline) {
@@ -272,7 +279,14 @@ void RasterizerVulkan::DrawTexture() {
272 SCOPE_EXIT({ gpu.TickWork(); }); 279 SCOPE_EXIT({ gpu.TickWork(); });
273 FlushWork(); 280 FlushWork();
274 281
282#if ANDROID
283 if (Settings::IsGPULevelHigh()) {
284 // This is problematic on Android, disable on GPU Normal.
285 query_cache.UpdateCounters();
286 }
287#else
275 query_cache.UpdateCounters(); 288 query_cache.UpdateCounters();
289#endif
276 290
277 texture_cache.SynchronizeGraphicsDescriptors(); 291 texture_cache.SynchronizeGraphicsDescriptors();
278 texture_cache.UpdateRenderTargets(false); 292 texture_cache.UpdateRenderTargets(false);
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp
index 80455ec08..17ef61147 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_se
239void Scheduler::AllocateNewContext() { 239void Scheduler::AllocateNewContext() {
240 // Enable counters once again. These are disabled when a command buffer is finished. 240 // Enable counters once again. These are disabled when a command buffer is finished.
241 if (query_cache) { 241 if (query_cache) {
242#if ANDROID
243 if (Settings::IsGPULevelHigh()) {
244 // This is problematic on Android, disable on GPU Normal.
245 query_cache->UpdateCounters();
246 }
247#else
242 query_cache->UpdateCounters(); 248 query_cache->UpdateCounters();
249#endif
243 } 250 }
244} 251}
245 252
@@ -250,7 +257,14 @@ void Scheduler::InvalidateState() {
250} 257}
251 258
252void Scheduler::EndPendingOperations() { 259void Scheduler::EndPendingOperations() {
260#if ANDROID
261 if (Settings::IsGPULevelHigh()) {
262 // This is problematic on Android, disable on GPU Normal.
263 query_cache->DisableStreams();
264 }
265#else
253 query_cache->DisableStreams(); 266 query_cache->DisableStreams();
267#endif
254 EndRenderPass(); 268 EndRenderPass();
255} 269}
256 270