mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Move xfb tracking and IR scaling out of RenderBase
This commit is contained in:
@ -114,8 +114,8 @@ void PerfQuery::FlushOne()
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
// TODO: Dropping the lower 2 bits from this count should be closer to actual
|
||||
// hardware behavior when drawing triangles.
|
||||
const u64 native_res_result = result * EFB_WIDTH / g_renderer->GetTargetWidth() * EFB_HEIGHT /
|
||||
g_renderer->GetTargetHeight();
|
||||
const u64 native_res_result = result * EFB_WIDTH / g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT /
|
||||
g_framebuffer_manager->GetEFBHeight();
|
||||
m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result),
|
||||
std::memory_order_relaxed);
|
||||
|
||||
@ -143,8 +143,8 @@ void PerfQuery::WeakFlush()
|
||||
if (hr == S_OK)
|
||||
{
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
const u64 native_res_result = result * EFB_WIDTH / g_renderer->GetTargetWidth() * EFB_HEIGHT /
|
||||
g_renderer->GetTargetHeight();
|
||||
const u64 native_res_result = result * EFB_WIDTH / g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT /
|
||||
g_framebuffer_manager->GetEFBHeight();
|
||||
m_results[entry.query_group].store(static_cast<u32>(native_res_result),
|
||||
std::memory_order_relaxed);
|
||||
|
||||
|
@ -245,8 +245,8 @@ void PerfQuery::AccumulateQueriesFromBuffer(u32 query_count)
|
||||
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
const u64 native_res_result = static_cast<u64>(result) * EFB_WIDTH /
|
||||
g_renderer->GetTargetWidth() * EFB_HEIGHT /
|
||||
g_renderer->GetTargetHeight();
|
||||
g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT /
|
||||
g_framebuffer_manager->GetEFBHeight();
|
||||
m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result),
|
||||
std::memory_order_relaxed);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void Metal::PerfQuery::ReturnResults(const u64* data, const PerfQueryGroup* grou
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
u64 native_res_result = data[i] * (EFB_WIDTH * EFB_HEIGHT) /
|
||||
(g_renderer->GetTargetWidth() * g_renderer->GetTargetHeight());
|
||||
(g_framebuffer_manager->GetEFBWidth() * g_framebuffer_manager->GetEFBHeight());
|
||||
|
||||
native_res_result /= g_ActiveConfig.iMultisamples;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||
|
||||
#include "VideoBackends/OGL/OGLGfx.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/FramebufferManager.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
@ -165,7 +165,7 @@ void PerfQueryGL::FlushOne()
|
||||
// TODO: Dropping the lower 2 bits from this count should be closer to actual
|
||||
// hardware behavior when drawing triangles.
|
||||
result = static_cast<u64>(result) * EFB_WIDTH * EFB_HEIGHT /
|
||||
(g_renderer->GetTargetWidth() * g_renderer->GetTargetHeight());
|
||||
(g_framebuffer_manager->GetEFBWidth() * g_framebuffer_manager->GetEFBHeight());
|
||||
|
||||
// Adjust for multisampling
|
||||
if (g_ActiveConfig.iMultisamples > 1)
|
||||
@ -265,7 +265,7 @@ void PerfQueryGLESNV::FlushOne()
|
||||
// TODO: Dropping the lower 2 bits from this count should be closer to actual
|
||||
// hardware behavior when drawing triangles.
|
||||
const u64 native_res_result = static_cast<u64>(result) * EFB_WIDTH * EFB_HEIGHT /
|
||||
(g_renderer->GetTargetWidth() * g_renderer->GetTargetHeight());
|
||||
(g_framebuffer_manager->GetEFBWidth() * g_framebuffer_manager->GetEFBHeight());
|
||||
m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result),
|
||||
std::memory_order_relaxed);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "VideoBackends/Vulkan/StateTracker.h"
|
||||
#include "VideoBackends/Vulkan/VKGfx.h"
|
||||
#include "VideoBackends/Vulkan/VulkanContext.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/FramebufferManager.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
namespace Vulkan
|
||||
@ -219,8 +219,8 @@ void PerfQuery::ReadbackQueries(u32 query_count)
|
||||
|
||||
// NOTE: Reported pixel metrics should be referenced to native resolution
|
||||
const u64 native_res_result = static_cast<u64>(m_query_result_buffer[i]) * EFB_WIDTH /
|
||||
g_renderer->GetTargetWidth() * EFB_HEIGHT /
|
||||
g_renderer->GetTargetHeight();
|
||||
g_framebuffer_manager->GetEFBWidth() * EFB_HEIGHT /
|
||||
g_framebuffer_manager->GetEFBHeight();
|
||||
m_results[entry.query_group].fetch_add(static_cast<u32>(native_res_result),
|
||||
std::memory_order_relaxed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user