mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 18:22:47 +01:00
GPU: Add more fine grained profiling for vertex shader and rasterization
This commit is contained in:
parent
cb2b2071a8
commit
def5913d19
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue