diff options
| author | 2018-09-04 11:02:59 +0200 | |
|---|---|---|
| committer | 2018-09-04 11:04:26 +0200 | |
| commit | 10bc725944d41f09ae1425aa1eb8acffcae0a091 (patch) | |
| tree | 794211794cccdc2c23431a64ab76f7789623cf41 /src/video_core | |
| parent | Merge pull request #1231 from lioncash/global (diff) | |
| download | yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.tar.gz yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.tar.xz yuzu-10bc725944d41f09ae1425aa1eb8acffcae0a091.zip | |
Update microprofile scopes.
Blame the subsystems which deserve the blame :)
The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
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; | |||
| 33 | using SurfaceType = SurfaceParams::SurfaceType; | 33 | using SurfaceType = SurfaceParams::SurfaceType; |
| 34 | 34 | ||
| 35 | MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(128, 128, 192)); | 35 | MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(128, 128, 192)); |
| 36 | MICROPROFILE_DEFINE(OpenGL_VS, "OpenGL", "Vertex Shader Setup", MP_RGB(128, 128, 192)); | 36 | MICROPROFILE_DEFINE(OpenGL_Shader, "OpenGL", "Shader Setup", MP_RGB(128, 128, 192)); |
| 37 | MICROPROFILE_DEFINE(OpenGL_FS, "OpenGL", "Fragment Shader Setup", MP_RGB(128, 128, 192)); | 37 | MICROPROFILE_DEFINE(OpenGL_UBO, "OpenGL", "Const Buffer Setup", MP_RGB(128, 128, 192)); |
| 38 | MICROPROFILE_DEFINE(OpenGL_Index, "OpenGL", "Index Buffer Setup", MP_RGB(128, 128, 192)); | ||
| 39 | MICROPROFILE_DEFINE(OpenGL_Texture, "OpenGL", "Texture Setup", MP_RGB(128, 128, 192)); | ||
| 40 | MICROPROFILE_DEFINE(OpenGL_Framebuffer, "OpenGL", "Framebuffer Setup", MP_RGB(128, 128, 192)); | ||
| 38 | MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192)); | 41 | MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192)); |
| 39 | MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255)); | 42 | MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(128, 128, 192)); |
| 40 | MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100)); | 43 | MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100)); |
| 41 | 44 | ||
| 42 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo& info) | 45 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo& info) |
| @@ -179,6 +182,7 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, | |||
| 179 | } | 182 | } |
| 180 | 183 | ||
| 181 | std::pair<u8*, GLintptr> RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { | 184 | std::pair<u8*, GLintptr> RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { |
| 185 | MICROPROFILE_SCOPE(OpenGL_Shader); | ||
| 182 | auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); | 186 | auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); |
| 183 | 187 | ||
| 184 | // Next available bindpoints to use when uploading the const buffers and textures to the GLSL | 188 | // 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) { | |||
| 312 | std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, | 316 | std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, |
| 313 | bool using_depth_fb, | 317 | bool using_depth_fb, |
| 314 | bool preserve_contents) { | 318 | bool preserve_contents) { |
| 319 | MICROPROFILE_SCOPE(OpenGL_Framebuffer); | ||
| 315 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; | 320 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; |
| 316 | 321 | ||
| 317 | if (regs.rt[0].format == Tegra::RenderTargetFormat::NONE) { | 322 | if (regs.rt[0].format == Tegra::RenderTargetFormat::NONE) { |
| @@ -512,6 +517,7 @@ void RasterizerOpenGL::DrawArrays() { | |||
| 512 | // If indexed mode, copy the index buffer | 517 | // If indexed mode, copy the index buffer |
| 513 | GLintptr index_buffer_offset = 0; | 518 | GLintptr index_buffer_offset = 0; |
| 514 | if (is_indexed) { | 519 | if (is_indexed) { |
| 520 | MICROPROFILE_SCOPE(OpenGL_Index); | ||
| 515 | std::tie(buffer_ptr, buffer_offset, index_buffer_offset) = UploadMemory( | 521 | std::tie(buffer_ptr, buffer_offset, index_buffer_offset) = UploadMemory( |
| 516 | buffer_ptr, buffer_offset, regs.index_array.StartAddress(), index_buffer_size); | 522 | buffer_ptr, buffer_offset, regs.index_array.StartAddress(), index_buffer_size); |
| 517 | } | 523 | } |
| @@ -657,6 +663,7 @@ std::tuple<u8*, GLintptr, u32> RasterizerOpenGL::SetupConstBuffers(u8* buffer_pt | |||
| 657 | Maxwell::ShaderStage stage, | 663 | Maxwell::ShaderStage stage, |
| 658 | Shader& shader, | 664 | Shader& shader, |
| 659 | u32 current_bindpoint) { | 665 | u32 current_bindpoint) { |
| 666 | MICROPROFILE_SCOPE(OpenGL_UBO); | ||
| 660 | const auto& gpu = Core::System::GetInstance().GPU(); | 667 | const auto& gpu = Core::System::GetInstance().GPU(); |
| 661 | const auto& maxwell3d = gpu.Maxwell3D(); | 668 | const auto& maxwell3d = gpu.Maxwell3D(); |
| 662 | const auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; | 669 | 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 | |||
| 712 | } | 719 | } |
| 713 | 720 | ||
| 714 | u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, u32 current_unit) { | 721 | u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, Shader& shader, u32 current_unit) { |
| 722 | MICROPROFILE_SCOPE(OpenGL_Texture); | ||
| 715 | const auto& gpu = Core::System::GetInstance().GPU(); | 723 | const auto& gpu = Core::System::GetInstance().GPU(); |
| 716 | const auto& maxwell3d = gpu.Maxwell3D(); | 724 | const auto& maxwell3d = gpu.Maxwell3D(); |
| 717 | const auto& entries = shader->GetShaderEntries().texture_samplers; | 725 | const auto& entries = shader->GetShaderEntries().texture_samplers; |