diff options
-rw-r--r-- | src/audio_core/stream.cpp | 4 | ||||
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 4 | ||||
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/ssl/ssl.cpp | 62 | ||||
-rw-r--r-- | src/core/hle/service/ssl/ssl.h | 14 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
6 files changed, 60 insertions, 42 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index ad9e2915c..dbae75d8c 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp @@ -10,6 +10,7 @@ #include "audio_core/stream.h" #include "common/assert.h" #include "common/logging/log.h" +#include "common/microprofile.h" #include "core/core_timing.h" #include "core/core_timing_util.h" #include "core/settings.h" @@ -94,7 +95,10 @@ void Stream::PlayNextBuffer() { CoreTiming::ScheduleEventThreadsafe(GetBufferReleaseCycles(*active_buffer), release_event, {}); } +MICROPROFILE_DEFINE(AudioOutput, "Audio", "ReleaseActiveBuffer", MP_RGB(100, 100, 255)); + void Stream::ReleaseActiveBuffer() { + MICROPROFILE_SCOPE(AudioOutput); ASSERT(active_buffer); released_buffers.push(std::move(active_buffer)); release_callback(); diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index de44ccebd..b47f04988 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -7,6 +7,7 @@ #include <dynarmic/A64/a64.h> #include <dynarmic/A64/config.h> #include "common/logging/log.h" +#include "common/microprofile.h" #include "core/arm/dynarmic/arm_dynarmic.h" #include "core/core.h" #include "core/core_cpu.h" @@ -143,7 +144,10 @@ std::unique_ptr<Dynarmic::A64::Jit> ARM_Dynarmic::MakeJit() const { return std::make_unique<Dynarmic::A64::Jit>(config); } +MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64)); + void ARM_Dynarmic::Run() { + MICROPROFILE_SCOPE(ARM_Jit_Dynarmic); ASSERT(Memory::GetCurrentPageTable() == current_page_table); jit->Run(); diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index 307f12198..4c4de2623 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -193,10 +193,10 @@ void ARM_Unicorn::Step() { ExecuteInstructions(1); } -MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); +MICROPROFILE_DEFINE(ARM_Jit_Unicorn, "ARM JIT", "Unicorn", MP_RGB(255, 64, 64)); void ARM_Unicorn::ExecuteInstructions(int num_instructions) { - MICROPROFILE_SCOPE(ARM_Jit); + MICROPROFILE_SCOPE(ARM_Jit_Unicorn); CHECKED(uc_emu_start(uc, GetPC(), 1ULL << 63, 0, num_instructions)); CoreTiming::AddTicks(num_instructions); if (GDBStub::IsServerEnabled()) { diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index 40aea6090..63b86e099 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -3,6 +3,9 @@ // Refer to the license.txt file included. #include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/hle_ipc.h" +#include "core/hle/service/service.h" +#include "core/hle/service/sm/sm.h" #include "core/hle/service/ssl/ssl.h" namespace Service::SSL { @@ -81,36 +84,43 @@ private: } }; -void SSL::CreateContext(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_SSL, "(STUBBED) called"); +class SSL final : public ServiceFramework<SSL> { +public: + explicit SSL() : ServiceFramework{"ssl"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, &SSL::CreateContext, "CreateContext"}, + {1, nullptr, "GetContextCount"}, + {2, nullptr, "GetCertificates"}, + {3, nullptr, "GetCertificateBufSize"}, + {4, nullptr, "DebugIoctl"}, + {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"}, + {6, nullptr, "FlushSessionCache"}, + }; + // clang-format on - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface<ISslContext>(); -} + RegisterHandlers(functions); + } -SSL::SSL() : ServiceFramework("ssl") { - static const FunctionInfo functions[] = { - {0, &SSL::CreateContext, "CreateContext"}, - {1, nullptr, "GetContextCount"}, - {2, nullptr, "GetCertificates"}, - {3, nullptr, "GetCertificateBufSize"}, - {4, nullptr, "DebugIoctl"}, - {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"}, - {6, nullptr, "FlushSessionCache"}, - }; - RegisterHandlers(functions); -} +private: + void CreateContext(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); -void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_SSL, "(STUBBED) called"); - IPC::RequestParser rp{ctx}; - u32 unk1 = rp.Pop<u32>(); // Probably minor/major? - u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface<ISslContext>(); + } - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); -} + void SetInterfaceVersion(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + u32 unk1 = rp.Pop<u32>(); // Probably minor/major? + u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } +}; void InstallInterfaces(SM::ServiceManager& service_manager) { std::make_shared<SSL>()->InstallAsService(service_manager); diff --git a/src/core/hle/service/ssl/ssl.h b/src/core/hle/service/ssl/ssl.h index 8fef13022..5cb04c3b9 100644 --- a/src/core/hle/service/ssl/ssl.h +++ b/src/core/hle/service/ssl/ssl.h @@ -4,20 +4,12 @@ #pragma once -#include "core/hle/service/service.h" +namespace Service::SM { +class ServiceManager; +} namespace Service::SSL { -class SSL final : public ServiceFramework<SSL> { -public: - explicit SSL(); - ~SSL() = default; - -private: - void CreateContext(Kernel::HLERequestContext& ctx); - void SetInterfaceVersion(Kernel::HLERequestContext& ctx); -}; - /// Registers all SSL services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 7ce969f73..e260c9140 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -33,10 +33,13 @@ using PixelFormat = SurfaceParams::PixelFormat; using SurfaceType = SurfaceParams::SurfaceType; MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(128, 128, 192)); -MICROPROFILE_DEFINE(OpenGL_VS, "OpenGL", "Vertex Shader Setup", MP_RGB(128, 128, 192)); -MICROPROFILE_DEFINE(OpenGL_FS, "OpenGL", "Fragment Shader Setup", MP_RGB(128, 128, 192)); +MICROPROFILE_DEFINE(OpenGL_Shader, "OpenGL", "Shader Setup", MP_RGB(128, 128, 192)); +MICROPROFILE_DEFINE(OpenGL_UBO, "OpenGL", "Const Buffer Setup", MP_RGB(128, 128, 192)); +MICROPROFILE_DEFINE(OpenGL_Index, "OpenGL", "Index Buffer Setup", MP_RGB(128, 128, 192)); +MICROPROFILE_DEFINE(OpenGL_Texture, "OpenGL", "Texture Setup", MP_RGB(128, 128, 192)); +MICROPROFILE_DEFINE(OpenGL_Framebuffer, "OpenGL", "Framebuffer Setup", MP_RGB(128, 128, 192)); MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192)); -MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255)); +MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(128, 128, 192)); MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100)); RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo& info) @@ -179,6 +182,7 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, } std::pair<u8*, GLintptr> RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { + MICROPROFILE_SCOPE(OpenGL_Shader); auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); // Next available bindpoints to use when uploading the const buffers and textures to the GLSL @@ -312,6 +316,7 @@ void RasterizerOpenGL::UpdatePagesCachedCount(VAddr addr, u64 size, int delta) { std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, bool using_depth_fb, bool preserve_contents) { + MICROPROFILE_SCOPE(OpenGL_Framebuffer); const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; if (regs.rt[0].format == Tegra::RenderTargetFormat::NONE) { @@ -512,6 +517,7 @@ void RasterizerOpenGL::DrawArrays() { // If indexed mode, copy the index buffer GLintptr index_buffer_offset = 0; if (is_indexed) { + MICROPROFILE_SCOPE(OpenGL_Index); std::tie(buffer_ptr, buffer_offset, index_buffer_offset) = UploadMemory( buffer_ptr, buffer_offset, regs.index_array.StartAddress(), index_buffer_size); } @@ -657,6 +663,7 @@ std::tuple<u8*, GLintptr, u32> RasterizerOpenGL::SetupConstBuffers(u8* buffer_pt Maxwell::ShaderStage stage, Shader& shader, u32 current_bindpoint) { + MICROPROFILE_SCOPE(OpenGL_UBO); const auto& gpu = Core::System::GetInstance().GPU(); const auto& maxwell3d = gpu.Maxwell3D(); const auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; @@ -712,6 +719,7 @@ std::tuple<u8*, GLintptr, u32> RasterizerOpenGL::SetupConstBuffers(u8* buffer_pt } u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, u32 current_unit) { + MICROPROFILE_SCOPE(OpenGL_Texture); const auto& gpu = Core::System::GetInstance().GPU(); const auto& maxwell3d = gpu.Maxwell3D(); const auto& entries = shader->GetShaderEntries().texture_samplers; |