diff options
Diffstat (limited to '')
| -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 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "common/math_util.h" | 8 | #include "common/math_util.h" |
| 9 | #include "common/profiler.h" | ||
| 9 | 10 | ||
| 10 | #include "core/hw/gpu.h" | 11 | #include "core/hw/gpu.h" |
| 11 | #include "debug_utils/debug_utils.h" | 12 | #include "debug_utils/debug_utils.h" |
| @@ -186,6 +187,8 @@ static int SignedArea (const Math::Vec2<Fix12P4>& vtx1, | |||
| 186 | return Math::Cross(vec1, vec2).z; | 187 | return Math::Cross(vec1, vec2).z; |
| 187 | }; | 188 | }; |
| 188 | 189 | ||
| 190 | static Common::Profiling::TimingCategory rasterization_category("Rasterization"); | ||
| 191 | |||
| 189 | /** | 192 | /** |
| 190 | * Helper function for ProcessTriangle with the "reversed" flag to allow for implementing | 193 | * Helper function for ProcessTriangle with the "reversed" flag to allow for implementing |
| 191 | * culling via recursion. | 194 | * culling via recursion. |
| @@ -195,6 +198,8 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, | |||
| 195 | const VertexShader::OutputVertex& v2, | 198 | const VertexShader::OutputVertex& v2, |
| 196 | bool reversed = false) | 199 | bool reversed = false) |
| 197 | { | 200 | { |
| 201 | Common::Profiling::ScopeTimer timer(rasterization_category); | ||
| 202 | |||
| 198 | // vertex positions in rasterizer coordinates | 203 | // vertex positions in rasterizer coordinates |
| 199 | static auto FloatToFix = [](float24 flt) { | 204 | static auto FloatToFix = [](float24 flt) { |
| 200 | // TODO: Rounding here is necessary to prevent garbage pixels at | 205 | // 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 @@ | |||
| 12 | 12 | ||
| 13 | #include <nihstro/shader_bytecode.h> | 13 | #include <nihstro/shader_bytecode.h> |
| 14 | 14 | ||
| 15 | #include "common/profiler.h" | ||
| 15 | 16 | ||
| 16 | #include "pica.h" | 17 | #include "pica.h" |
| 17 | #include "vertex_shader.h" | 18 | #include "vertex_shader.h" |
| @@ -574,7 +575,11 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 574 | } | 575 | } |
| 575 | } | 576 | } |
| 576 | 577 | ||
| 578 | static Common::Profiling::TimingCategory shader_category("Vertex Shader"); | ||
| 579 | |||
| 577 | OutputVertex RunShader(const InputVertex& input, int num_attributes) { | 580 | OutputVertex RunShader(const InputVertex& input, int num_attributes) { |
| 581 | Common::Profiling::ScopeTimer timer(shader_category); | ||
| 582 | |||
| 578 | VertexShaderState state; | 583 | VertexShaderState state; |
| 579 | 584 | ||
| 580 | const u32* main = &shader_memory[registers.vs_main_offset]; | 585 | const u32* main = &shader_memory[registers.vs_main_offset]; |