mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
SoftGPU: Remove the frame profiler scopes
A sampling profiler shows its costs better. Some were per pixel, and two in one scope kept USE_PROFILER builds from compiling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4f3d7db37
commit
dacea56aaa
6 files changed
-26
No files matched your search
@@ -21,7 +21,6 @@
|
||||
#include <thread>
|
||||
|
||||
#include "Common/BitSet.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/Thread/ParallelLoop.h"
|
||||
#include "Common/Thread/ThreadManager.h"
|
||||
#include "Common/Data/Text/StringWriter.h"
|
||||
@@ -244,7 +243,6 @@ void BinManager::DeswizzleMirrorTextures(RasterizerState &state) {
|
||||
}
|
||||
|
||||
void BinManager::UpdateState() {
|
||||
PROFILE_THIS_SCOPE("bin_state");
|
||||
if (HasDirty(SoftDirty::PIXEL_ALL | SoftDirty::SAMPLER_ALL | SoftDirty::RAST_ALL)) {
|
||||
PushState();
|
||||
ClearDirty(SoftDirty::PIXEL_ALL | SoftDirty::SAMPLER_ALL | SoftDirty::RAST_ALL);
|
||||
@@ -487,7 +485,6 @@ inline void BinDirtyRange::Expand(uint32_t newBase, uint32_t bpp, uint32_t strid
|
||||
}
|
||||
|
||||
void BinManager::UpdateClut(const void *src) {
|
||||
PROFILE_THIS_SCOPE("bin_clut");
|
||||
if (cluts_.Full())
|
||||
Flush("cluts");
|
||||
BinClut &clut = cluts_.PeekPush();
|
||||
@@ -617,8 +614,6 @@ void BinManager::AddPoint(const VertexData &v0) {
|
||||
}
|
||||
|
||||
void BinManager::Drain() {
|
||||
PROFILE_THIS_SCOPE("bin_drain");
|
||||
|
||||
// Also when switching to one thread: what's left goes to the tiles, which hold the earlier items.
|
||||
if (maxTasks_ > 1 || activeCount_ != 0) {
|
||||
DistributeItems();
|
||||
@@ -634,7 +629,6 @@ void BinManager::Drain() {
|
||||
OptimizePendingStates(pendingStateIndex_, stateIndex_);
|
||||
pendingStateIndex_ = stateIndex_;
|
||||
|
||||
PROFILE_THIS_SCOPE("bin_drain_single");
|
||||
// Anything (transfers, the CPU) may have written memory since the last drain.
|
||||
selfTexValid_ = false;
|
||||
while (!queue_.Empty()) {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "GPU/Software/RasterizerRectangle.h"
|
||||
#include "GPU/Software/TransformUnit.h"
|
||||
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
|
||||
namespace Clipper {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/Data/Convert/ColorConv.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
@@ -726,7 +725,6 @@ static inline void ApplyTexturing(const RasterizerState &state, int *colors, int
|
||||
perPixel = false;
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("sampler");
|
||||
if (state.linearQuad) {
|
||||
// All four at once, when they're all bilinear.
|
||||
int levels[4], fracs[4], active = 0;
|
||||
@@ -1928,7 +1926,6 @@ void DrawTriangleSlice(
|
||||
fog[i] = std::clamp((int)fogWalk.At(i), 0, 255);
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("draw_tri_px");
|
||||
#if !defined(SOFTGPU_MEMORY_TAGGING_DETAILED)
|
||||
if (state.drawSpan) {
|
||||
alignas(16) int lanes[16];
|
||||
@@ -1976,8 +1973,6 @@ void DrawTriangleSlice(
|
||||
|
||||
// Draws triangle, vertices specified in counter-clockwise direction
|
||||
void DrawTriangle(const VertexData &v0, const VertexData &v1, const VertexData &v2, const BinCoords &range, const RasterizerState &state) {
|
||||
PROFILE_THIS_SCOPE("draw_tri");
|
||||
|
||||
auto drawSlice = cpu_info.bSSE4_1 ?
|
||||
(state.pixelID.clearMode ? &DrawTriangleSlice<true, true> : &DrawTriangleSlice<false, true>) :
|
||||
(state.pixelID.clearMode ? &DrawTriangleSlice<true, false> : &DrawTriangleSlice<false, false>);
|
||||
@@ -2187,7 +2182,6 @@ void DrawRectangle(const VertexData &v0, const VertexData &v1, const BinCoords &
|
||||
(Vec4S32::Load(prim_color + c * 4) + Vec4S32::Splat(sec_color[c])).Store(prim_color + c * 4);
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("draw_rect_px");
|
||||
#if !defined(SOFTGPU_MEMORY_TAGGING_DETAILED)
|
||||
if (state.drawSpan) {
|
||||
Vec4<int> fogs = fog, zs = z;
|
||||
@@ -2277,7 +2271,6 @@ void DrawPoint(const VertexData &v0, const BinCoords &range, const RasterizerSta
|
||||
int texLevelFrac;
|
||||
bool bilinear;
|
||||
CalculateSamplingParams(0.0f, 0.0f, 1.0f / v0.clipw, state, texLevel, texLevelFrac, bilinear);
|
||||
PROFILE_THIS_SCOPE("sampler");
|
||||
prim_color = ApplyTexturingSingle(s, t, ToVec4IntArg(prim_color), texLevel, texLevelFrac, bilinear, state);
|
||||
}
|
||||
|
||||
@@ -2291,7 +2284,6 @@ void DrawPoint(const VertexData &v0, const BinCoords &range, const RasterizerSta
|
||||
fog = ClampFogDepth(v0.fogdepth);
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("draw_px");
|
||||
state.drawPixel(p.x, p.y, z, fog, ToVec4IntArg(prim_color), pixelID);
|
||||
|
||||
#if defined(SOFTGPU_MEMORY_TAGGING_DETAILED) || defined(SOFTGPU_MEMORY_TAGGING_BASIC)
|
||||
@@ -2823,14 +2815,12 @@ void DrawLine(const VertexData &v0, const VertexData &v1, const BinCoords &range
|
||||
texBilinear = true;
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("sampler");
|
||||
prim_color = ApplyTexturingSingle(s, t, ToVec4IntArg(prim_color), texLevel, texLevelFrac, texBilinear, state);
|
||||
}
|
||||
|
||||
if (!pixelID.clearMode)
|
||||
prim_color += Vec4<int>(sec_color, 0);
|
||||
|
||||
PROFILE_THIS_SCOPE("draw_px");
|
||||
state.drawPixel(p.x, p.y, z, fog, ToVec4IntArg(prim_color), pixelID);
|
||||
|
||||
#if defined(SOFTGPU_MEMORY_TAGGING_DETAILED) || defined(SOFTGPU_MEMORY_TAGGING_BASIC)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Data/Convert/ColorConv.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
|
||||
#include "Core/Debugger/MemBlockInfo.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/Util/PPGeDraw.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/GPU/thin3d.h"
|
||||
|
||||
#include "GPU/GPUCommon.h"
|
||||
@@ -823,7 +822,6 @@ void SoftGPU::CheckConfigChanged(const DisplayLayoutConfig &config) {
|
||||
}
|
||||
|
||||
void SoftGPU::FastRunLoop(DisplayList &list) {
|
||||
PROFILE_THIS_SCOPE("soft_runloop");
|
||||
const auto *cmdInfo = softgpuCmdInfo;
|
||||
int dc = downcount;
|
||||
SoftDirty dirty = dirtyFlags_;
|
||||
@@ -1428,8 +1426,6 @@ void SoftGPU::Execute_ImmVertexAlphaPrim(u32 op, u32 diff) {
|
||||
}
|
||||
|
||||
void SoftGPU::Execute_Call(u32 op, u32 diff) {
|
||||
PROFILE_THIS_SCOPE("gpu_call");
|
||||
|
||||
const u32 target = gstate_c.getRelativeAddress(op & 0x00FFFFFC);
|
||||
if (!Memory::IsValidAddress(target)) {
|
||||
ERROR_LOG(Log::G3D, "CALL to illegal address %08x - ignoring! data=%06x", target, op & 0x00FFFFFF);
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "Common/Data/Convert/ColorConv.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/Thread/ThreadManager.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "GPU/GPUState.h"
|
||||
@@ -681,8 +680,6 @@ static bool PreparePositions4(const Vec4F32 pos[4], const TransformState &state,
|
||||
// Writes straight into the destination: building the vertex in a temporary and copying it reloads its
|
||||
// fields with wider loads than they were stored with, which stalls.
|
||||
void TransformUnit::ReadVertex(const VertexReader &vreader, const TransformState &state, VertexCarry &carry, ClipVertexData &vertex, const PreparedPosition *prepared) {
|
||||
PROFILE_THIS_SCOPE("read_vert");
|
||||
|
||||
// (x, y, z, 1), the left operands of the transform's rows.
|
||||
Vec4F32 pos = vreader.ReadPosOne();
|
||||
|
||||
@@ -821,7 +818,6 @@ void TransformUnit::ReadVertex(const VertexReader &vreader, const TransformState
|
||||
Lighting::GenerateLightST(vertex.v, pos, worldnormal, normalRsqrt, state.lightingState.viewDir);
|
||||
}
|
||||
|
||||
PROFILE_THIS_SCOPE("light");
|
||||
if (state.enableLighting)
|
||||
Lighting::Process(vertex.v, pos, worldnormal, normalRsqrt, state.lightingState);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user