Permalink
Browse files

Profiler: Separately track texture hashing.

Since it's slow and was lumped into updatestate.
  • Loading branch information...
unknownbrackets committed Dec 30, 2017
1 parent eb35e88 commit 267b9a65986587e1ca9b4af94a0ab682731d3b2d
Showing with 7 additions and 1 deletion.
  1. +7 −1 GPU/Common/TextureCacheCommon.cpp
@@ -16,6 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <algorithm>
#include "profiler/profiler.h"
#include "Common/ColorConv.h"
#include "Common/MemoryUtil.h"
#include "Core/Config.h"
@@ -1472,6 +1473,7 @@ void TextureCacheCommon::ApplyTexture() {
}
if (nextNeedsRehash_) {
PROFILE_THIS_SCOPE("texhash");
// Update the hash on the texture.
int w = gstate.getTextureWidth(0);
int h = gstate.getTextureHeight(0);
@@ -1547,7 +1549,11 @@ void TextureCacheCommon::DeleteTexture(TexCache::iterator it) {
bool TextureCacheCommon::CheckFullHash(TexCacheEntry *entry, bool &doDelete) {
int w = gstate.getTextureWidth(0);
int h = gstate.getTextureHeight(0);
u32 fullhash = QuickTexHash(replacer_, entry->addr, entry->bufw, w, h, GETextureFormat(entry->format), entry);
u32 fullhash;
{
PROFILE_THIS_SCOPE("texhash");
fullhash = QuickTexHash(replacer_, entry->addr, entry->bufw, w, h, GETextureFormat(entry->format), entry);
}
if (fullhash == entry->fullhash) {
if (g_Config.bTextureBackoffCache) {

0 comments on commit 267b9a6

Please sign in to comment.