mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 15:53:35 +01:00
Minor cleanup
This commit is contained in:
1 parent
e4c39703a6
commit
95dc7bb185
4 files changed
+7
-6
No files matched your search
@@ -220,6 +220,7 @@ T hleDoLog(LogTypes::LOG_TYPE t, LogTypes::LOG_LEVELS level, T res, const char *
|
||||
#define hleLogError(t, res, ...) hleLogHelper(t, LERROR, res, 'x', ##__VA_ARGS__)
|
||||
#define hleLogWarning(t, res, ...) hleLogHelper(t, LWARNING, res, 'x', ##__VA_ARGS__)
|
||||
#define hleLogDebug(t, res, ...) hleLogHelper(t, HLE_LOG_LDEBUG, res, 'x', ##__VA_ARGS__)
|
||||
#define hleLogVerbose(t, res, ...) hleLogHelper(t, HLE_LOG_LVERBOSE, res, 'x', ##__VA_ARGS__)
|
||||
#define hleLogSuccessX(t, res, ...) hleLogHelper(t, HLE_LOG_LDEBUG, res, 'x', ##__VA_ARGS__)
|
||||
#define hleLogSuccessI(t, res, ...) hleLogHelper(t, HLE_LOG_LDEBUG, res, 'i', ##__VA_ARGS__)
|
||||
#define hleLogSuccessInfoX(t, res, ...) hleLogHelper(t, LINFO, res, 'x', ##__VA_ARGS__)
|
||||
|
||||
@@ -1344,7 +1344,7 @@ int __KernelGetThreadExitStatus(SceUID threadID) {
|
||||
if (t->nt.status == THREADSTATUS_DORMANT) {
|
||||
return hleLogSuccessI(SCEKERNEL, t->nt.exitStatus);
|
||||
}
|
||||
return hleLogDebug(SCEKERNEL, SCE_KERNEL_ERROR_NOT_DORMANT, "not dormant");
|
||||
return hleLogVerbose(SCEKERNEL, SCE_KERNEL_ERROR_NOT_DORMANT, "not dormant");
|
||||
}
|
||||
|
||||
int sceKernelGetThreadExitStatus(SceUID threadID) {
|
||||
|
||||
@@ -367,7 +367,7 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
|
||||
int bufw = GetTextureBufw(0, texaddr, format);
|
||||
u8 maxLevel = gstate.getTextureMaxLevel();
|
||||
|
||||
u32 texhash = MiniHash((const u32 *)Memory::GetPointerUnchecked(texaddr));
|
||||
u32 minihash = MiniHash((const u32 *)Memory::GetPointerUnchecked(texaddr));
|
||||
|
||||
TexCache::iterator entryIter = cache_.find(cachekey);
|
||||
TexCacheEntry *entry = nullptr;
|
||||
@@ -437,7 +437,7 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
|
||||
rehash = true;
|
||||
}
|
||||
|
||||
if (texhash != entry->hash) {
|
||||
if (minihash != entry->minihash) {
|
||||
match = false;
|
||||
reason = "minihash";
|
||||
} else if (entry->GetHashStatus() == TexCacheEntry::STATUS_RELIABLE) {
|
||||
@@ -548,7 +548,7 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
|
||||
|
||||
// We have to decode it, let's setup the cache entry first.
|
||||
entry->addr = texaddr;
|
||||
entry->hash = texhash;
|
||||
entry->minihash = minihash;
|
||||
entry->dim = dim;
|
||||
entry->format = format;
|
||||
entry->maxLevel = maxLevel;
|
||||
@@ -1822,7 +1822,7 @@ void TextureCacheCommon::Invalidate(u32 addr, int size, GPUInvalidationType type
|
||||
if (type == GPU_INVALIDATE_FORCE) {
|
||||
// Just random values to force the hash not to match.
|
||||
entry->fullhash = (entry->fullhash ^ 0x12345678) + 13;
|
||||
entry->hash = (entry->hash ^ 0x89ABCDEF) + 89;
|
||||
entry->minihash = (entry->minihash ^ 0x89ABCDEF) + 89;
|
||||
}
|
||||
if (type != GPU_INVALIDATE_ALL) {
|
||||
gpuStats.numTextureInvalidations++;
|
||||
|
||||
@@ -139,7 +139,7 @@ struct TexCacheEntry {
|
||||
int status;
|
||||
|
||||
u32 addr;
|
||||
u32 hash;
|
||||
u32 minihash;
|
||||
u32 sizeInRAM; // Could be computed
|
||||
u8 format; // GeTextureFormat
|
||||
u8 maxLevel;
|
||||
|
||||
Reference in new issue
Block a user