mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 09:09:49 +00:00
Merge pull request #3677 from unknownbrackets/logging
Move some things to G3D, enable G3D by default on Windows
This commit is contained in:
commit
9fa83981ce
@ -149,7 +149,7 @@ public:
|
||||
p.Do(size);
|
||||
if (size != N)
|
||||
{
|
||||
ERROR_LOG(HLE, "Savestate failure: Incompatible queue size.");
|
||||
ERROR_LOG(COMMON, "Savestate failure: Incompatible queue size.");
|
||||
return;
|
||||
}
|
||||
p.DoArray<T>(storage_, N);
|
||||
|
@ -68,7 +68,7 @@ static const LogNameTableEntry logTable[] = {
|
||||
{LogTypes::SCEKERNEL ,"KERNEL", "sceKernel*"},
|
||||
{LogTypes::SCEMODULE ,"MODULE", "sceKernelModule"},
|
||||
{LogTypes::SCENET ,"NET", "sceNet*"},
|
||||
{LogTypes::SCERTC ,"SCERTC", "sceRtco"},
|
||||
{LogTypes::SCERTC ,"SCERTC", "sceRtc"},
|
||||
{LogTypes::SCESAS ,"SCESAS", "sceSas"},
|
||||
{LogTypes::SCEUTILITY ,"UTIL", "sceUtility"},
|
||||
|
||||
|
@ -23,14 +23,15 @@
|
||||
#include "Core/MIPS/MIPSInt.h"
|
||||
|
||||
#include "Common/LogManager.h"
|
||||
#include "../FileSystems/FileSystem.h"
|
||||
#include "../FileSystems/MetaFileSystem.h"
|
||||
#include "../PSPLoaders.h"
|
||||
#include "../../Core/CoreTiming.h"
|
||||
#include "../../Core/SaveState.h"
|
||||
#include "../../Core/System.h"
|
||||
#include "../../GPU/GPUInterface.h"
|
||||
#include "../../GPU/GPUState.h"
|
||||
#include "Core/FileSystems/FileSystem.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/PSPLoaders.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
#include "util/random/rng.h"
|
||||
|
||||
@ -422,8 +423,7 @@ SceUID KernelObjectPool::Create(KernelObject *obj, int rangeBottom, int rangeTop
|
||||
}
|
||||
}
|
||||
|
||||
// WTF?
|
||||
_dbg_assert_(HLE, 0);
|
||||
ERROR_LOG_REPORT(SCEKERNEL, "Unable to allocate kernel object, too many objects slots in use.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ void Core_UpdateState(CoreState newState) {
|
||||
}
|
||||
|
||||
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
|
||||
INFO_LOG(HLE, "PPSSPP %s", PPSSPP_GIT_VERSION);
|
||||
INFO_LOG(BOOT, "PPSSPP %s", PPSSPP_GIT_VERSION);
|
||||
|
||||
coreParameter = coreParam;
|
||||
coreParameter.errorString = "";
|
||||
|
@ -1163,7 +1163,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
|
||||
case GE_CMD_ALPHATEST:
|
||||
#ifndef USING_GLES2
|
||||
if (((data >> 16) & 0xFF) != 0xFF && (data & 7) > 1)
|
||||
WARN_LOG_REPORT_ONCE(alphatestmask, HLE, "Unsupported alphatest mask: %02x", (data >> 16) & 0xFF);
|
||||
WARN_LOG_REPORT_ONCE(alphatestmask, G3D, "Unsupported alphatest mask: %02x", (data >> 16) & 0xFF);
|
||||
// Intentional fallthrough.
|
||||
#endif
|
||||
|
||||
|
@ -90,6 +90,7 @@ LinkedShader::LinkedShader(Shader *vs, Shader *fs, bool useHWTransform)
|
||||
ERROR_LOG(G3D, "Could not link program:\n %s", buf);
|
||||
ERROR_LOG(G3D, "VS:\n%s", vs->source().c_str());
|
||||
ERROR_LOG(G3D, "FS:\n%s", fs->source().c_str());
|
||||
Reporting::ReportMessage("Error in shader program link: info: %s / fs: %s / vs: %s", buf, fs->source().c_str(), vs->source().c_str());
|
||||
#ifdef SHADERLOG
|
||||
OutputDebugStringUTF8(buf);
|
||||
OutputDebugStringUTF8(vs->source().c_str());
|
||||
|
@ -194,10 +194,10 @@ inline void AttachFramebufferInvalid(T &entry, VirtualFramebuffer *framebuffer)
|
||||
inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, VirtualFramebuffer *framebuffer, bool exactMatch) {
|
||||
// If they match exactly, it's non-CLUT and from the top left.
|
||||
if (exactMatch) {
|
||||
DEBUG_LOG(HLE, "Render to texture detected at %08x!", address);
|
||||
DEBUG_LOG(G3D, "Render to texture detected at %08x!", address);
|
||||
if (!entry->framebuffer || entry->invalidHint == -1) {
|
||||
if (entry->format != framebuffer->format) {
|
||||
WARN_LOG_REPORT_ONCE(diffFormat1, HLE, "Render to texture with different formats %d != %d", entry->format, framebuffer->format);
|
||||
WARN_LOG_REPORT_ONCE(diffFormat1, G3D, "Render to texture with different formats %d != %d", entry->format, framebuffer->format);
|
||||
// If it already has one, let's hope that one is correct.
|
||||
// Affected game list : Kurohyou 2, Evangelion Jo
|
||||
AttachFramebufferInvalid(entry, framebuffer);
|
||||
@ -215,12 +215,12 @@ inline void TextureCache::AttachFramebuffer(TexCacheEntry *entry, u32 address, V
|
||||
// Is it at least the right stride?
|
||||
if (framebuffer->fb_stride == entry->bufw && compatFormat) {
|
||||
if (framebuffer->format != entry->format) {
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, HLE, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address);
|
||||
WARN_LOG_REPORT_ONCE(diffFormat2, G3D, "Render to texture with different formats %d != %d at %08x", entry->format, framebuffer->format, address);
|
||||
// TODO: Use an FBO to translate the palette?
|
||||
// Affected game List : DBZ VS Tag , 3rd birthday
|
||||
AttachFramebufferValid(entry, framebuffer);
|
||||
} else if ((entry->addr - address) / entry->bufw < framebuffer->height) {
|
||||
WARN_LOG_REPORT_ONCE(subarea, HLE, "Render to area containing texture at %08x", address);
|
||||
WARN_LOG_REPORT_ONCE(subarea, G3D, "Render to area containing texture at %08x", address);
|
||||
// TODO: Keep track of the y offset.
|
||||
// Affected game List : God of War Ghost of Sparta , God of War Chains of Olympus
|
||||
AttachFramebufferInvalid(entry, framebuffer);
|
||||
@ -511,7 +511,7 @@ void *TextureCache::readIndexedTex(int level, u32 texaddr, int bytesPerIndex, GL
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(G3D, "Unhandled clut texture mode %d!!!", (gstate.clutformat & 3));
|
||||
ERROR_LOG_REPORT(G3D, "Unhandled clut texture mode %d!!!", (gstate.clutformat & 3));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -960,7 +960,7 @@ bool SetDebugTexture() {
|
||||
bool changed = false;
|
||||
if (((gpuStats.numFlips / highlightFrames) % mostTextures) == numTextures) {
|
||||
if (gpuStats.numFlips % highlightFrames == 0) {
|
||||
NOTICE_LOG(HLE, "Highlighting texture # %d / %d", numTextures, mostTextures);
|
||||
NOTICE_LOG(G3D, "Highlighting texture # %d / %d", numTextures, mostTextures);
|
||||
}
|
||||
static const u32 solidTextureData[] = {0x99AA99FF};
|
||||
|
||||
@ -1153,12 +1153,12 @@ void TextureCache::SetTexture() {
|
||||
gstate_c.textureFullAlpha = (entry->status & TexCacheEntry::STATUS_ALPHA_MASK) == TexCacheEntry::STATUS_ALPHA_FULL;
|
||||
}
|
||||
UpdateSamplingParams(*entry, false);
|
||||
DEBUG_LOG(G3D, "Texture at %08x Found in Cache, applying", texaddr);
|
||||
VERBOSE_LOG(G3D, "Texture at %08x Found in Cache, applying", texaddr);
|
||||
return; //Done!
|
||||
} else {
|
||||
entry->numInvalidated++;
|
||||
gpuStats.numTextureInvalidations++;
|
||||
INFO_LOG(G3D, "Texture different or overwritten, reloading at %08x", texaddr);
|
||||
DEBUG_LOG(G3D, "Texture different or overwritten, reloading at %08x", texaddr);
|
||||
if (doDelete) {
|
||||
if (entry->maxLevel == maxLevel && entry->dim == (gstate.texsize[0] & 0xF0F) && entry->format == format && g_Config.iTexScalingLevel <= 1) {
|
||||
// Actually, if size and number of levels match, let's try to avoid deleting and recreating.
|
||||
@ -1176,7 +1176,7 @@ void TextureCache::SetTexture() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
INFO_LOG(G3D, "No texture in cache, decoding...");
|
||||
VERBOSE_LOG(G3D, "No texture in cache, decoding...");
|
||||
TexCacheEntry entryNew = {0};
|
||||
cache[cachekey] = entryNew;
|
||||
|
||||
@ -1185,7 +1185,7 @@ void TextureCache::SetTexture() {
|
||||
}
|
||||
|
||||
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetUserMemoryBase()) {
|
||||
ERROR_LOG_REPORT(HLE, "Texture with unexpected bufw (full=%d)", gstate.texbufwidth[0] & 0xffff);
|
||||
ERROR_LOG_REPORT(G3D, "Texture with unexpected bufw (full=%d)", gstate.texbufwidth[0] & 0xffff);
|
||||
}
|
||||
|
||||
// We have to decode it, let's setup the cache entry first.
|
||||
@ -1363,7 +1363,7 @@ void *TextureCache::DecodeTextureLevel(GETextureFormat format, GEPaletteFormat c
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(G3D, "Unknown CLUT4 texture mode %d", gstate.getClutPaletteFormat());
|
||||
ERROR_LOG_REPORT(G3D, "Unknown CLUT4 texture mode %d", gstate.getClutPaletteFormat());
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -947,7 +947,7 @@ void TransformDrawEngine::DecodeVerts() {
|
||||
|
||||
// Sanity check
|
||||
if (indexGen.Prim() < 0) {
|
||||
ERROR_LOG(HLE, "DecodeVerts: Failed to deduce prim: %i", indexGen.Prim());
|
||||
ERROR_LOG_REPORT(G3D, "DecodeVerts: Failed to deduce prim: %i", indexGen.Prim());
|
||||
// Force to points (0)
|
||||
indexGen.AddPrim(GE_PRIM_POINTS, 0);
|
||||
}
|
||||
@ -1024,7 +1024,7 @@ void TransformDrawEngine::DecimateTrackedVertexArrays() {
|
||||
char *ptr = buffer;
|
||||
ptr += dec->second->ToString(ptr);
|
||||
// *ptr++ = '\n';
|
||||
NOTICE_LOG(HLE, buffer);
|
||||
NOTICE_LOG(G3D, buffer);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ void GPUCommon::SlowRunLoop(DisplayList &list)
|
||||
char temp[256];
|
||||
u32 prev = Memory::ReadUnchecked_U32(list.pc - 4);
|
||||
GeDisassembleOp(list.pc, op, prev, temp);
|
||||
NOTICE_LOG(HLE, "%s", temp);
|
||||
NOTICE_LOG(G3D, "%s", temp);
|
||||
}
|
||||
gstate.cmdmem[cmd] = op;
|
||||
|
||||
@ -606,7 +606,7 @@ void GPUCommon::ProcessDLQueueInternal() {
|
||||
|
||||
// Seems to be correct behaviour to process the list anyway?
|
||||
if (startingTicks < busyTicks) {
|
||||
DEBUG_LOG(HLE, "Can't execute a list yet, still busy for %lld ticks", busyTicks - startingTicks);
|
||||
DEBUG_LOG(G3D, "Can't execute a list yet, still busy for %lld ticks", busyTicks - startingTicks);
|
||||
//return;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void DebugCallbackARB(GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
FILE *outFile = (FILE*)userParam;
|
||||
char finalMessage[256];
|
||||
FormatDebugOutputARB(finalMessage, 256, source, type, id, severity, message);
|
||||
ERROR_LOG(HLE, "GL: %s", finalMessage);
|
||||
ERROR_LOG(G3D, "GL: %s", finalMessage);
|
||||
}
|
||||
|
||||
bool GL_Init(HWND window, std::string *error_message) {
|
||||
|
@ -95,7 +95,7 @@ static const unsigned int xinput_ctrl_map_size = sizeof(xinput_ctrl_map) / sizeo
|
||||
|
||||
XinputDevice::XinputDevice() {
|
||||
if (LoadXInputDLL() != 0) {
|
||||
ERROR_LOG(HLE, "Failed to load XInput! DLL missing");
|
||||
ERROR_LOG(SCECTRL, "Failed to load XInput! DLL missing");
|
||||
}
|
||||
ZeroMemory( &this->prevState, sizeof(this->prevState) );
|
||||
this->check_delay = 0;
|
||||
|
@ -132,7 +132,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
LogManager::Init();
|
||||
LogManager::GetInstance()->GetConsoleListener()->Open(hideLog, 150, 120, "PPSSPP Debug Console");
|
||||
LogManager::GetInstance()->SetLogLevel(LogTypes::G3D, LogTypes::LERROR);
|
||||
|
||||
|
||||
//Windows, API init stuff
|
||||
|
Loading…
Reference in New Issue
Block a user