diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-12 22:47:35 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-12 22:47:35 +0200 |
commit | 9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce (patch) | |
tree | 416be8b56a87d07aec3e798d48544c2b4afe9809 | |
parent | Merge pull request #748 from Subv/tls_max (diff) | |
parent | GPU: Add more fine grained profiling for vertex shader and rasterization (diff) | |
download | yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar.gz yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar.bz2 yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar.lz yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar.xz yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.tar.zst yuzu-9d8e1f7a92f422ed646aaceb1f8361bc7e1383ce.zip |
-rw-r--r-- | src/video_core/rasterizer.cpp | 5 | ||||
-rw-r--r-- | src/video_core/vertex_shader.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 46a326bb4..02a08b20e 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -6,6 +6,7 @@ #include "common/common_types.h" #include "common/math_util.h" +#include "common/profiler.h" #include "core/hw/gpu.h" #include "debug_utils/debug_utils.h" @@ -186,6 +187,8 @@ static int SignedArea (const Math::Vec2<Fix12P4>& vtx1, return Math::Cross(vec1, vec2).z; }; +static Common::Profiling::TimingCategory rasterization_category("Rasterization"); + /** * Helper function for ProcessTriangle with the "reversed" flag to allow for implementing * culling via recursion. @@ -195,6 +198,8 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, const VertexShader::OutputVertex& v2, bool reversed = false) { + Common::Profiling::ScopeTimer timer(rasterization_category); + // vertex positions in rasterizer coordinates static auto FloatToFix = [](float24 flt) { // TODO: Rounding here is necessary to prevent garbage pixels at diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 885b7de59..4734e546a 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp @@ -12,6 +12,7 @@ #include <nihstro/shader_bytecode.h> +#include "common/profiler.h" #include "pica.h" #include "vertex_shader.h" @@ -574,7 +575,11 @@ static void ProcessShaderCode(VertexShaderState& state) { } } +static Common::Profiling::TimingCategory shader_category("Vertex Shader"); + OutputVertex RunShader(const InputVertex& input, int num_attributes) { + Common::Profiling::ScopeTimer timer(shader_category); + VertexShaderState state; const u32* main = &shader_memory[registers.vs_main_offset]; |