mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-22 23:13:36 +00:00
android: video_core: Disable some problematic things on GPU Normal.
This commit is contained in:
parent
6b093224c1
commit
befd477279
3 changed files with 40 additions and 0 deletions
|
@ -593,6 +593,12 @@ void Maxwell3D::ProcessQueryCondition() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Maxwell3D::ProcessCounterReset() {
|
void Maxwell3D::ProcessCounterReset() {
|
||||||
|
#if ANDROID
|
||||||
|
if (!Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
switch (regs.clear_report_value) {
|
switch (regs.clear_report_value) {
|
||||||
case Regs::ClearReport::ZPassPixelCount:
|
case Regs::ClearReport::ZPassPixelCount:
|
||||||
rasterizer->ResetCounter(QueryType::SamplesPassed);
|
rasterizer->ResetCounter(QueryType::SamplesPassed);
|
||||||
|
@ -614,6 +620,12 @@ std::optional<u64> Maxwell3D::GetQueryResult() {
|
||||||
case Regs::ReportSemaphore::Report::Payload:
|
case Regs::ReportSemaphore::Report::Payload:
|
||||||
return regs.report_semaphore.payload;
|
return regs.report_semaphore.payload;
|
||||||
case Regs::ReportSemaphore::Report::ZPassPixelCount64:
|
case Regs::ReportSemaphore::Report::ZPassPixelCount64:
|
||||||
|
#if ANDROID
|
||||||
|
if (!Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
return 120;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// Deferred.
|
// Deferred.
|
||||||
rasterizer->Query(regs.report_semaphore.Address(), QueryType::SamplesPassed,
|
rasterizer->Query(regs.report_semaphore.Address(), QueryType::SamplesPassed,
|
||||||
system.GPU().GetTicks());
|
system.GPU().GetTicks());
|
||||||
|
|
|
@ -188,7 +188,14 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) {
|
||||||
FlushWork();
|
FlushWork();
|
||||||
gpu_memory->FlushCaching();
|
gpu_memory->FlushCaching();
|
||||||
|
|
||||||
|
#if ANDROID
|
||||||
|
if (Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
query_cache.UpdateCounters();
|
||||||
|
}
|
||||||
|
#else
|
||||||
query_cache.UpdateCounters();
|
query_cache.UpdateCounters();
|
||||||
|
#endif
|
||||||
|
|
||||||
GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()};
|
GraphicsPipeline* const pipeline{pipeline_cache.CurrentGraphicsPipeline()};
|
||||||
if (!pipeline) {
|
if (!pipeline) {
|
||||||
|
@ -272,7 +279,14 @@ void RasterizerVulkan::DrawTexture() {
|
||||||
SCOPE_EXIT({ gpu.TickWork(); });
|
SCOPE_EXIT({ gpu.TickWork(); });
|
||||||
FlushWork();
|
FlushWork();
|
||||||
|
|
||||||
|
#if ANDROID
|
||||||
|
if (Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
query_cache.UpdateCounters();
|
||||||
|
}
|
||||||
|
#else
|
||||||
query_cache.UpdateCounters();
|
query_cache.UpdateCounters();
|
||||||
|
#endif
|
||||||
|
|
||||||
texture_cache.SynchronizeGraphicsDescriptors();
|
texture_cache.SynchronizeGraphicsDescriptors();
|
||||||
texture_cache.UpdateRenderTargets(false);
|
texture_cache.UpdateRenderTargets(false);
|
||||||
|
|
|
@ -239,7 +239,14 @@ u64 Scheduler::SubmitExecution(VkSemaphore signal_semaphore, VkSemaphore wait_se
|
||||||
void Scheduler::AllocateNewContext() {
|
void Scheduler::AllocateNewContext() {
|
||||||
// Enable counters once again. These are disabled when a command buffer is finished.
|
// Enable counters once again. These are disabled when a command buffer is finished.
|
||||||
if (query_cache) {
|
if (query_cache) {
|
||||||
|
#if ANDROID
|
||||||
|
if (Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
query_cache->UpdateCounters();
|
||||||
|
}
|
||||||
|
#else
|
||||||
query_cache->UpdateCounters();
|
query_cache->UpdateCounters();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +257,14 @@ void Scheduler::InvalidateState() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scheduler::EndPendingOperations() {
|
void Scheduler::EndPendingOperations() {
|
||||||
|
#if ANDROID
|
||||||
|
if (Settings::IsGPULevelHigh()) {
|
||||||
|
// This is problematic on Android, disable on GPU Normal.
|
||||||
|
query_cache->DisableStreams();
|
||||||
|
}
|
||||||
|
#else
|
||||||
query_cache->DisableStreams();
|
query_cache->DisableStreams();
|
||||||
|
#endif
|
||||||
EndRenderPass();
|
EndRenderPass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue