mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-03 22:37:10 +02:00
[meta] remove MicroProfile (#185)
Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
dbbe5b3328
commit
f1e74f6855
76 changed files with 5547 additions and 11468 deletions
|
|
@ -16,7 +16,6 @@
|
|||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/math_util.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/settings.h"
|
||||
#include "video_core/control/channel_state.h"
|
||||
|
|
@ -43,11 +42,6 @@ using VideoCore::Surface::PixelFormat;
|
|||
using VideoCore::Surface::SurfaceTarget;
|
||||
using VideoCore::Surface::SurfaceType;
|
||||
|
||||
MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192));
|
||||
MICROPROFILE_DEFINE(OpenGL_Clears, "OpenGL", "Clears", MP_RGB(128, 128, 192));
|
||||
MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(128, 128, 192));
|
||||
MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Management", MP_RGB(100, 255, 100));
|
||||
|
||||
namespace {
|
||||
constexpr size_t NUM_SUPPORTED_VERTEX_ATTRIBUTES = 16;
|
||||
|
||||
|
|
@ -159,8 +153,6 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::Clear(u32 layer_count) {
|
||||
MICROPROFILE_SCOPE(OpenGL_Clears);
|
||||
|
||||
gpu_memory->FlushCaching();
|
||||
const auto& regs = maxwell3d->regs;
|
||||
bool use_color{};
|
||||
|
|
@ -231,8 +223,6 @@ void RasterizerOpenGL::Clear(u32 layer_count) {
|
|||
|
||||
template <typename Func>
|
||||
void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) {
|
||||
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
||||
|
||||
SCOPE_EXIT {
|
||||
gpu.TickWork();
|
||||
};
|
||||
|
|
@ -359,8 +349,6 @@ void RasterizerOpenGL::DrawIndirect() {
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::DrawTexture() {
|
||||
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
||||
|
||||
SCOPE_EXIT {
|
||||
gpu.TickWork();
|
||||
};
|
||||
|
|
@ -489,7 +477,6 @@ void RasterizerOpenGL::DisableGraphicsUniformBuffer(size_t stage, u32 index) {
|
|||
void RasterizerOpenGL::FlushAll() {}
|
||||
|
||||
void RasterizerOpenGL::FlushRegion(DAddr addr, u64 size, VideoCommon::CacheType which) {
|
||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||
if (addr == 0 || size == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -547,7 +534,6 @@ VideoCore::RasterizerDownloadArea RasterizerOpenGL::GetFlushArea(DAddr addr, u64
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::InvalidateRegion(DAddr addr, u64 size, VideoCommon::CacheType which) {
|
||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||
if (addr == 0 || size == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -568,7 +554,6 @@ void RasterizerOpenGL::InvalidateRegion(DAddr addr, u64 size, VideoCommon::Cache
|
|||
}
|
||||
|
||||
bool RasterizerOpenGL::OnCPUWrite(DAddr addr, u64 size) {
|
||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||
DEBUG_ASSERT(addr != 0 || size != 0);
|
||||
{
|
||||
std::scoped_lock lock{buffer_cache.mutex};
|
||||
|
|
@ -585,8 +570,6 @@ bool RasterizerOpenGL::OnCPUWrite(DAddr addr, u64 size) {
|
|||
}
|
||||
|
||||
void RasterizerOpenGL::OnCacheInvalidation(DAddr addr, u64 size) {
|
||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||
|
||||
if (addr == 0 || size == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -716,7 +699,6 @@ bool RasterizerOpenGL::AccelerateConditionalRendering() {
|
|||
bool RasterizerOpenGL::AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Surface& src,
|
||||
const Tegra::Engines::Fermi2D::Surface& dst,
|
||||
const Tegra::Engines::Fermi2D::Config& copy_config) {
|
||||
MICROPROFILE_SCOPE(OpenGL_Blits);
|
||||
std::scoped_lock lock{texture_cache.mutex};
|
||||
return texture_cache.BlitImage(dst, src, copy_config);
|
||||
}
|
||||
|
|
@ -752,7 +734,6 @@ std::optional<FramebufferTextureInfo> RasterizerOpenGL::AccelerateDisplay(
|
|||
if (framebuffer_addr == 0) {
|
||||
return {};
|
||||
}
|
||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||
|
||||
std::scoped_lock lock{texture_cache.mutex};
|
||||
const auto [image_view, scaled] =
|
||||
|
|
|
|||
|
|
@ -1,23 +1,21 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <string_view>
|
||||
#include <glad/glad.h>
|
||||
#include "common/assert.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
||||
#include "video_core/renderer_opengl/gl_shader_util.h"
|
||||
|
||||
MICROPROFILE_DEFINE(OpenGL_ResourceCreation, "OpenGL", "Resource Creation", MP_RGB(128, 128, 192));
|
||||
MICROPROFILE_DEFINE(OpenGL_ResourceDeletion, "OpenGL", "Resource Deletion", MP_RGB(128, 128, 192));
|
||||
|
||||
namespace OpenGL {
|
||||
|
||||
void OGLRenderbuffer::Create() {
|
||||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateRenderbuffers(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -25,7 +23,6 @@ void OGLRenderbuffer::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteRenderbuffers(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -34,7 +31,6 @@ void OGLTexture::Create(GLenum target) {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateTextures(target, 1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +38,6 @@ void OGLTexture::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteTextures(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -51,7 +46,6 @@ void OGLTextureView::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glGenTextures(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +53,6 @@ void OGLTextureView::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteTextures(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -68,7 +61,6 @@ void OGLSampler::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateSamplers(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +68,6 @@ void OGLSampler::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteSamplers(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -85,7 +76,6 @@ void OGLShader::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteShader(handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -94,7 +84,6 @@ void OGLProgram::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteProgram(handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -103,7 +92,6 @@ void OGLAssemblyProgram::Release() {
|
|||
if (handle == 0) {
|
||||
return;
|
||||
}
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteProgramsARB(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -112,7 +100,6 @@ void OGLPipeline::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glGenProgramPipelines(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +107,6 @@ void OGLPipeline::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteProgramPipelines(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -129,7 +115,6 @@ void OGLBuffer::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateBuffers(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +122,6 @@ void OGLBuffer::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteBuffers(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -172,7 +156,6 @@ void OGLFramebuffer::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
// Bind to READ_FRAMEBUFFER to stop Nvidia's driver from creating an EXT_framebuffer instead of
|
||||
// a core framebuffer. EXT framebuffer attachments have to match in size and can be shared
|
||||
// across contexts. yuzu doesn't share framebuffers across contexts and we need attachments with
|
||||
|
|
@ -185,7 +168,6 @@ void OGLFramebuffer::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteFramebuffers(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -194,7 +176,6 @@ void OGLQuery::Create(GLenum target) {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateQueries(target, 1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +183,6 @@ void OGLQuery::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteQueries(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
@ -211,7 +191,6 @@ void OGLTransformFeedback::Create() {
|
|||
if (handle != 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
|
||||
glCreateTransformFeedbacks(1, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +198,6 @@ void OGLTransformFeedback::Release() {
|
|||
if (handle == 0)
|
||||
return;
|
||||
|
||||
MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
|
||||
glDeleteTransformFeedbacks(1, &handle);
|
||||
handle = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -10,10 +13,8 @@
|
|||
#include "common/alignment.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_util.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "video_core/renderer_opengl/gl_staging_buffer_pool.h"
|
||||
|
||||
MICROPROFILE_DEFINE(OpenGL_BufferRequest, "OpenGL", "BufferRequest", MP_RGB(128, 128, 192));
|
||||
|
||||
namespace OpenGL {
|
||||
|
||||
|
|
@ -30,7 +31,6 @@ StagingBuffers::~StagingBuffers() = default;
|
|||
|
||||
StagingBufferMap StagingBuffers::RequestMap(size_t requested_size, bool insert_fence,
|
||||
bool deferred) {
|
||||
MICROPROFILE_SCOPE(OpenGL_BufferRequest);
|
||||
|
||||
const size_t index = RequestBuffer(requested_size);
|
||||
OGLSync* const sync = insert_fence ? &allocs[index].sync : nullptr;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -10,7 +13,6 @@
|
|||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/frontend/emu_window.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue