remove newlines from OGL logging (they get added by logmanager)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2720 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-03-21 20:07:56 +00:00
parent e65eb58f00
commit 7572e0bf8d
10 changed files with 85 additions and 85 deletions

View File

@ -74,7 +74,7 @@ void BPWritten(int addr, int changes, int newval)
if (changes) { if (changes) {
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("genmode: texgen=%d, col=%d, ms_en=%d, tev=%d, culmode=%d, ind=%d, zfeeze=%d\n", PRIM_LOG("genmode: texgen=%d, col=%d, ms_en=%d, tev=%d, culmode=%d, ind=%d, zfeeze=%d",
bpmem.genMode.numtexgens, bpmem.genMode.numcolchans, bpmem.genMode.numtexgens, bpmem.genMode.numcolchans,
bpmem.genMode.ms_en, bpmem.genMode.numtevstages+1, bpmem.genMode.cullmode, bpmem.genMode.ms_en, bpmem.genMode.numtevstages+1, bpmem.genMode.cullmode,
bpmem.genMode.numindstages, bpmem.genMode.zfreeze); bpmem.genMode.numindstages, bpmem.genMode.zfreeze);
@ -117,7 +117,7 @@ void BPWritten(int addr, int changes, int newval)
if (changes) { if (changes) {
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("zmode: test=%d, func=%d, upd=%d\n", bpmem.zmode.testenable, bpmem.zmode.func, PRIM_LOG("zmode: test=%d, func=%d, upd=%d", bpmem.zmode.testenable, bpmem.zmode.func,
bpmem.zmode.updateenable); bpmem.zmode.updateenable);
if (bpmem.zmode.testenable) { if (bpmem.zmode.testenable) {
@ -140,7 +140,7 @@ void BPWritten(int addr, int changes, int newval)
if (changes) { if (changes) {
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("alphacmp: ref0=%d, ref1=%d, comp0=%d, comp1=%d, logic=%d\n", bpmem.alphaFunc.ref0, PRIM_LOG("alphacmp: ref0=%d, ref1=%d, comp0=%d, comp1=%d, logic=%d", bpmem.alphaFunc.ref0,
bpmem.alphaFunc.ref1, bpmem.alphaFunc.comp0, bpmem.alphaFunc.comp1, bpmem.alphaFunc.logic); bpmem.alphaFunc.ref1, bpmem.alphaFunc.comp0, bpmem.alphaFunc.comp1, bpmem.alphaFunc.logic);
PixelShaderManager::SetAlpha(bpmem.alphaFunc); PixelShaderManager::SetAlpha(bpmem.alphaFunc);
} }
@ -150,7 +150,7 @@ void BPWritten(int addr, int changes, int newval)
if (changes) { if (changes) {
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("constalpha: alp=%d, en=%d\n", bpmem.dstalpha.alpha, bpmem.dstalpha.enable); PRIM_LOG("constalpha: alp=%d, en=%d", bpmem.dstalpha.alpha, bpmem.dstalpha.enable);
SETSTAT(stats.dstAlphaEnable, bpmem.dstalpha.enable); SETSTAT(stats.dstAlphaEnable, bpmem.dstalpha.enable);
SETSTAT_UINT(stats.dstAlpha, bpmem.dstalpha.alpha); SETSTAT_UINT(stats.dstAlpha, bpmem.dstalpha.alpha);
PixelShaderManager::SetDestAlpha(bpmem.dstalpha); PixelShaderManager::SetDestAlpha(bpmem.dstalpha);
@ -179,7 +179,7 @@ void BPWritten(int addr, int changes, int newval)
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("blendmode: en=%d, open=%d, colupd=%d, alphaupd=%d, dst=%d, src=%d, sub=%d, mode=%d\n", PRIM_LOG("blendmode: en=%d, open=%d, colupd=%d, alphaupd=%d, dst=%d, src=%d, sub=%d, mode=%d",
bpmem.blendmode.blendenable, bpmem.blendmode.logicopenable, bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate, bpmem.blendmode.blendenable, bpmem.blendmode.logicopenable, bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate,
bpmem.blendmode.dstfactor, bpmem.blendmode.srcfactor, bpmem.blendmode.subtract, bpmem.blendmode.logicmode); bpmem.blendmode.dstfactor, bpmem.blendmode.srcfactor, bpmem.blendmode.subtract, bpmem.blendmode.logicmode);
@ -284,7 +284,7 @@ void BPWritten(int addr, int changes, int newval)
if (!Renderer::SetScissorRect()) if (!Renderer::SetScissorRect())
{ {
if (addr == BPMEM_SCISSORBR) { if (addr == BPMEM_SCISSORBR) {
ERROR_LOG(VIDEO, "bad scissor!\n"); ERROR_LOG(VIDEO, "bad scissor!");
} }
} }
} }
@ -293,7 +293,7 @@ void BPWritten(int addr, int changes, int newval)
if (changes) { if (changes) {
VertexManager::Flush(); VertexManager::Flush();
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
PRIM_LOG("ztex bias=0x%x\n", bpmem.ztex1.bias); PRIM_LOG("ztex bias=0x%x", bpmem.ztex1.bias);
PixelShaderManager::SetZTextureBias(bpmem.ztex1.bias); PixelShaderManager::SetZTextureBias(bpmem.ztex1.bias);
} }
break; break;
@ -307,7 +307,7 @@ void BPWritten(int addr, int changes, int newval)
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
const char* pzop[] = {"DISABLE", "ADD", "REPLACE", "?"}; const char* pzop[] = {"DISABLE", "ADD", "REPLACE", "?"};
const char* pztype[] = {"Z8", "Z16", "Z24", "?"}; const char* pztype[] = {"Z8", "Z16", "Z24", "?"};
PRIM_LOG("ztex op=%s, type=%s\n", pzop[bpmem.ztex2.op], pztype[bpmem.ztex2.type]); PRIM_LOG("ztex op=%s, type=%s", pzop[bpmem.ztex2.op], pztype[bpmem.ztex2.type]);
#endif #endif
} }
break; break;
@ -616,7 +616,7 @@ void BPWritten(int addr, int changes, int newval)
break; break;
case 0x9C://TEX UNKNOWN case 0x9C://TEX UNKNOWN
case 0xBC: case 0xBC:
//ERROR_LOG("texunknown%x = %x\n", addr, newval); //ERROR_LOG("texunknown%x = %x", addr, newval);
((u32*)&bpmem)[addr] = newval; ((u32*)&bpmem)[addr] = newval;
break; break;
case 0xE0: case 0xE0:
@ -706,7 +706,7 @@ void BPWritten(int addr, int changes, int newval)
default: default:
// 0x58 = 0xf // 0x58 = 0xf
// 0x69 = 0x49e // 0x69 = 0x49e
ERROR_LOG("bp%.2x = %x\n", addr, newval); ERROR_LOG("bp%.2x = %x", addr, newval);
}*/ }*/
} }
break; break;

View File

@ -391,15 +391,15 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
if (vi == NULL) { if (vi == NULL) {
vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListSgl); vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListSgl);
GLWin.doubleBuffered = False; GLWin.doubleBuffered = False;
ERROR_LOG(VIDEO, "Only Singlebuffered Visual!\n"); ERROR_LOG(VIDEO, "Only Singlebuffered Visual!");
} }
else { else {
GLWin.doubleBuffered = True; GLWin.doubleBuffered = True;
NOTICE_LOG(VIDEO, "Got Doublebuffered Visual!\n"); NOTICE_LOG(VIDEO, "Got Doublebuffered Visual!");
} }
glXQueryVersion(GLWin.dpy, &glxMajorVersion, &glxMinorVersion); glXQueryVersion(GLWin.dpy, &glxMajorVersion, &glxMinorVersion);
NOTICE_LOG(VIDEO, "glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion); NOTICE_LOG(VIDEO, "glX-Version %d.%d", glxMajorVersion, glxMinorVersion);
/* create a GLX context */ /* create a GLX context */
GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE); GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE);
if(!GLWin.ctx) if(!GLWin.ctx)
@ -426,7 +426,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
// set best mode to current // set best mode to current
bestMode = 0; bestMode = 0;
NOTICE_LOG(VIDEO, "XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion); NOTICE_LOG(VIDEO, "XF86VidModeExtension-Version %d.%d", vidModeMajorVersion, vidModeMinorVersion);
XF86VidModeGetAllModeLines(GLWin.dpy, GLWin.screen, &modeNum, &modes); XF86VidModeGetAllModeLines(GLWin.dpy, GLWin.screen, &modeNum, &modes);
if (modeNum > 0 && modes != NULL) { if (modeNum > 0 && modes != NULL) {
@ -443,7 +443,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
XF86VidModeSetViewPort(GLWin.dpy, GLWin.screen, 0, 0); XF86VidModeSetViewPort(GLWin.dpy, GLWin.screen, 0, 0);
dpyWidth = modes[bestMode]->hdisplay; dpyWidth = modes[bestMode]->hdisplay;
dpyHeight = modes[bestMode]->vdisplay; dpyHeight = modes[bestMode]->vdisplay;
NOTICE_LOG(VIDEO, "Resolution %dx%d\n", dpyWidth, dpyHeight); NOTICE_LOG(VIDEO, "Resolution %dx%d", dpyWidth, dpyHeight);
XFree(modes); XFree(modes);
/* create a fullscreen window */ /* create a fullscreen window */
@ -460,7 +460,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
GrabModeAsync, GrabModeAsync, GLWin.win, None, CurrentTime); GrabModeAsync, GrabModeAsync, GLWin.win, None, CurrentTime);
} }
else { else {
ERROR_LOG(VIDEO, "Failed to start fullscreen. If you received the \n" ERROR_LOG(VIDEO, "Failed to start fullscreen. If you received the "
"\"XFree86-VidModeExtension\" extension is missing, add\n" "\"XFree86-VidModeExtension\" extension is missing, add\n"
"Load \"extmod\"\n" "Load \"extmod\"\n"
"to your X configuration file (under the Module Section)\n"); "to your X configuration file (under the Module Section)\n");
@ -725,7 +725,7 @@ void OpenGL_Shutdown()
{ {
if (!glXMakeCurrent(GLWin.dpy, None, NULL)) if (!glXMakeCurrent(GLWin.dpy, None, NULL))
{ {
ERROR_LOG(VIDEO, "Could not release drawing context.\n"); ERROR_LOG(VIDEO, "Could not release drawing context.");
} }
XUnmapWindow(GLWin.dpy, GLWin.win); XUnmapWindow(GLWin.dpy, GLWin.win);
glXDestroyContext(GLWin.dpy, GLWin.ctx); glXDestroyContext(GLWin.dpy, GLWin.ctx);
@ -753,7 +753,7 @@ void HandleGLError()
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc); glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
ERROR_LOG(VIDEO, "program error at %d: ", loc); ERROR_LOG(VIDEO, "program error at %d: ", loc);
ERROR_LOG(VIDEO, (char*)pstr); ERROR_LOG(VIDEO, (char*)pstr);
ERROR_LOG(VIDEO, "\n"); ERROR_LOG(VIDEO, "");
} }
// check the error status of this framebuffer */ // check the error status of this framebuffer */
@ -768,40 +768,40 @@ void HandleGLError()
case GL_FRAMEBUFFER_COMPLETE_EXT: case GL_FRAMEBUFFER_COMPLETE_EXT:
break; break;
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
ERROR_LOG(VIDEO, "Error! missing a required image/buffer attachment!\n"); ERROR_LOG(VIDEO, "Error! missing a required image/buffer attachment!");
break; break;
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
ERROR_LOG(VIDEO, "Error! has no images/buffers attached!\n"); ERROR_LOG(VIDEO, "Error! has no images/buffers attached!");
break; break;
// case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT: // case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT:
// ERROR_LOG(VIDEO, "Error! has an image/buffer attached in multiple locations!\n"); // ERROR_LOG(VIDEO, "Error! has an image/buffer attached in multiple locations!");
// break; // break;
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
ERROR_LOG(VIDEO, "Error! has mismatched image/buffer dimensions!\n"); ERROR_LOG(VIDEO, "Error! has mismatched image/buffer dimensions!");
break; break;
case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT:
ERROR_LOG(VIDEO, "Error! colorbuffer attachments have different types!\n"); ERROR_LOG(VIDEO, "Error! colorbuffer attachments have different types!");
break; break;
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
ERROR_LOG(VIDEO, "Error! trying to draw to non-attached color buffer!\n"); ERROR_LOG(VIDEO, "Error! trying to draw to non-attached color buffer!");
break; break;
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
ERROR_LOG(VIDEO, "Error! trying to read from a non-attached color buffer!\n"); ERROR_LOG(VIDEO, "Error! trying to read from a non-attached color buffer!");
break; break;
case GL_FRAMEBUFFER_UNSUPPORTED_EXT: case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
ERROR_LOG(VIDEO, "Error! format is not supported by current graphics card/driver!\n"); ERROR_LOG(VIDEO, "Error! format is not supported by current graphics card/driver!");
break; break;
default: default:
ERROR_LOG(VIDEO, "*UNKNOWN ERROR* reported from glCheckFramebufferStatusEXT()!\n"); ERROR_LOG(VIDEO, "*UNKNOWN ERROR* reported from glCheckFramebufferStatusEXT()!");
break; break;
} }
} }
void HandleCgError(CGcontext ctx, CGerror err, void* appdata) void HandleCgError(CGcontext ctx, CGerror err, void* appdata)
{ {
ERROR_LOG(VIDEO, "Cg error: %s\n", cgGetErrorString(err)); ERROR_LOG(VIDEO, "Cg error: %s", cgGetErrorString(err));
const char* listing = cgGetLastListing(g_cgcontext); const char* listing = cgGetLastListing(g_cgcontext);
if (listing != NULL) { if (listing != NULL) {
ERROR_LOG(VIDEO, " last listing: %s\n", listing); ERROR_LOG(VIDEO, " last listing: %s", listing);
} }
} }

View File

@ -67,10 +67,10 @@
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
#endif #endif
#define GL_REPORT_ERROR() { err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG(VIDEO, "%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); HandleGLError(); } } #define GL_REPORT_ERROR() { err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG(VIDEO, "%s:%d: gl error 0x%x", __FILE__, (int)__LINE__, err); HandleGLError(); } }
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
#define GL_REPORT_ERRORD() { GLenum err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG(VIDEO, "%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); HandleGLError(); } } #define GL_REPORT_ERRORD() { GLenum err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG(VIDEO, "%s:%d: gl error 0x%x", __FILE__, (int)__LINE__, err); HandleGLError(); } }
#else #else
#define GL_REPORT_ERRORD() #define GL_REPORT_ERRORD()
#endif #endif

View File

@ -76,13 +76,13 @@ ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &titl
// --------------- // ---------------
ConfigDialog::~ConfigDialog() ConfigDialog::~ConfigDialog()
{ {
INFO_LOG(CONSOLE, "ConfigDialog Closed\n"); INFO_LOG(CONSOLE, "ConfigDialog Closed");
} }
void ConfigDialog::OnClose(wxCloseEvent& event) void ConfigDialog::OnClose(wxCloseEvent& event)
{ {
g_Config.Save(); g_Config.Save();
INFO_LOG(CONSOLE, "OnClose\n"); INFO_LOG(CONSOLE, "OnClose");
// notice that we don't run wxEntryCleanup(); here so the dll will still be loaded // notice that we don't run wxEntryCleanup(); here so the dll will still be loaded
/* JP: Yes, it seems like Close() does not do that. It only runs EndModal() or something /* JP: Yes, it seems like Close() does not do that. It only runs EndModal() or something
@ -98,7 +98,7 @@ void ConfigDialog::OnClose(wxCloseEvent& event)
void ConfigDialog::CloseClick(wxCommandEvent& WXUNUSED (event)) void ConfigDialog::CloseClick(wxCommandEvent& WXUNUSED (event))
{ {
INFO_LOG(CONSOLE, "CloseClick\n"); INFO_LOG(CONSOLE, "CloseClick");
// If we run wxEntryCleanup() the class will be entirely deleted, and the destructor will be run // If we run wxEntryCleanup() the class will be entirely deleted, and the destructor will be run
//g_Config.Save(); //g_Config.Save();

View File

@ -63,7 +63,7 @@ void PixelShaderCache::Init()
int maxinst, maxattribs; int maxinst, maxattribs;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&maxinst); glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&maxinst);
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, (GLint *)&maxattribs); glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, (GLint *)&maxattribs);
INFO_LOG(VIDEO, "pixel max_alu=%d, max_inst=%d, max_attrib=%d\n", s_nMaxPixelInstructions, maxinst, maxattribs); INFO_LOG(VIDEO, "pixel max_alu=%d, max_inst=%d, max_attrib=%d", s_nMaxPixelInstructions, maxinst, maxattribs);
char pmatrixprog[1024]; char pmatrixprog[1024];
sprintf(pmatrixprog, "!!ARBfp1.0" sprintf(pmatrixprog, "!!ARBfp1.0"
@ -83,7 +83,7 @@ void PixelShaderCache::Init()
GLenum err = GL_NO_ERROR; GLenum err = GL_NO_ERROR;
GL_REPORT_ERROR(); GL_REPORT_ERROR();
if (err != GL_NO_ERROR) { if (err != GL_NO_ERROR) {
ERROR_LOG(VIDEO, "Failed to create color matrix fragment program\n"); ERROR_LOG(VIDEO, "Failed to create color matrix fragment program");
glDeleteProgramsARB(1, &s_ColorMatrixProgram); glDeleteProgramsARB(1, &s_ColorMatrixProgram);
s_ColorMatrixProgram = 0; s_ColorMatrixProgram = 0;
} }
@ -144,7 +144,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader(bool dstAlphaEnable)
// printf("Compiling pixel shader. size = %i\n", strlen(code)); // printf("Compiling pixel shader. size = %i\n", strlen(code));
if (!code || !CompilePixelShader(newentry.shader, code)) { if (!code || !CompilePixelShader(newentry.shader, code)) {
ERROR_LOG(VIDEO, "failed to create pixel shader\n"); ERROR_LOG(VIDEO, "failed to create pixel shader");
return NULL; return NULL;
} }
@ -188,7 +188,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
s_displayCompileAlert = false; s_displayCompileAlert = false;
} }
cgDestroyProgram(tempprog); cgDestroyProgram(tempprog);
ERROR_LOG(VIDEO, "Failed to create ps %s:\n", cgGetLastListing(g_cgcontext)); ERROR_LOG(VIDEO, "Failed to create ps %s:", cgGetLastListing(g_cgcontext));
ERROR_LOG(VIDEO, pstrprogram); ERROR_LOG(VIDEO, pstrprogram);
return false; return false;
} }

View File

@ -201,9 +201,9 @@ bool Renderer::Init()
PanicAlert("Failed to get OpenGL extension string.\nDo you have the latest video drivers installed?\nIs your video card OpenGL 2.x compatible?"); PanicAlert("Failed to get OpenGL extension string.\nDo you have the latest video drivers installed?\nIs your video card OpenGL 2.x compatible?");
return false; return false;
} }
INFO_LOG(VIDEO, "Supported OpenGL Extensions:\n"); INFO_LOG(VIDEO, "Supported OpenGL Extensions:");
INFO_LOG(VIDEO, ptoken); // write to the log file INFO_LOG(VIDEO, ptoken); // write to the log file
INFO_LOG(VIDEO, "\n"); INFO_LOG(VIDEO, "");
// Checks if it ONLY has the ATI_draw_buffers extension, some have both // Checks if it ONLY has the ATI_draw_buffers extension, some have both
if (GLEW_ATI_draw_buffers && !GLEW_ARB_draw_buffers) if (GLEW_ATI_draw_buffers && !GLEW_ARB_draw_buffers)
@ -213,21 +213,21 @@ bool Renderer::Init()
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs); glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs);
if (numvertexattribs < 11) { if (numvertexattribs < 11) {
ERROR_LOG(VIDEO, "*********\nGPU: OGL ERROR: Number of attributes %d not enough\nGPU: *********\nDoes your video card support OpenGL 2.x?", numvertexattribs); ERROR_LOG(VIDEO, "*********\nGPU: OGL ERROR: Number of attributes %d not enough\nGPU: *********Does your video card support OpenGL 2.x?", numvertexattribs);
bSuccess = false; bSuccess = false;
} }
// Init extension support. // Init extension support.
if (glewInit() != GLEW_OK) { if (glewInit() != GLEW_OK) {
ERROR_LOG(VIDEO, "glewInit() failed!\nDoes your video card support OpenGL 2.x?"); ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?");
return false; return false;
} }
if (!GLEW_EXT_framebuffer_object) { if (!GLEW_EXT_framebuffer_object) {
ERROR_LOG(VIDEO, "*********\nGPU: ERROR: Need GL_EXT_framebufer_object for multiple render targets\nGPU: *********\nDoes your video card support OpenGL 2.x?"); ERROR_LOG(VIDEO, "*********\nGPU: ERROR: Need GL_EXT_framebufer_object for multiple render targets\nGPU: *********Does your video card support OpenGL 2.x?");
bSuccess = false; bSuccess = false;
} }
if (!GLEW_EXT_secondary_color) { if (!GLEW_EXT_secondary_color) {
ERROR_LOG(VIDEO, "*********\nGPU: OGL ERROR: Need GL_EXT_secondary_color\nGPU: *********\nDoes your video card support OpenGL 2.x?"); ERROR_LOG(VIDEO, "*********\nGPU: OGL ERROR: Need GL_EXT_secondary_color\nGPU: *********Does your video card support OpenGL 2.x?");
bSuccess = false; bSuccess = false;
} }
s_bHaveFramebufferBlit = strstr(ptoken, "GL_EXT_framebuffer_blit") != NULL; s_bHaveFramebufferBlit = strstr(ptoken, "GL_EXT_framebuffer_blit") != NULL;
@ -250,12 +250,12 @@ bool Renderer::Init()
if (WGLEW_EXT_swap_control) if (WGLEW_EXT_swap_control)
wglSwapIntervalEXT(g_Config.bVSync ? 1 : 0); wglSwapIntervalEXT(g_Config.bVSync ? 1 : 0);
else else
ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)\nDoes your video card support OpenGL 2.x?"); ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)Does your video card support OpenGL 2.x?");
#elif defined(HAVE_X11) && HAVE_X11 #elif defined(HAVE_X11) && HAVE_X11
if (glXSwapIntervalSGI) if (glXSwapIntervalSGI)
glXSwapIntervalSGI(g_Config.bVSync ? 1 : 0); glXSwapIntervalSGI(g_Config.bVSync ? 1 : 0);
else else
ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)\n"); ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)");
#endif #endif
// check the max texture width and height // check the max texture width and height
@ -289,7 +289,7 @@ bool Renderer::Init()
glGenFramebuffersEXT(1, (GLuint *)&s_uFramebuffer); glGenFramebuffersEXT(1, (GLuint *)&s_uFramebuffer);
if (s_uFramebuffer == 0) { if (s_uFramebuffer == 0) {
ERROR_LOG(VIDEO, "failed to create the renderbuffer\nDoes your video card support OpenGL 2.x?"); ERROR_LOG(VIDEO, "failed to create the renderbufferDoes your video card support OpenGL 2.x?");
} }
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer);
@ -338,7 +338,7 @@ bool Renderer::Init()
} }
if (s_FakeZTarget == 0) if (s_FakeZTarget == 0)
ERROR_LOG(VIDEO, "Disabling ztarget MRT feature (max MRT = %d)\n", nMaxMRT); ERROR_LOG(VIDEO, "Disabling ztarget MRT feature (max MRT = %d)", nMaxMRT);
} }
else else
{ {
@ -420,12 +420,12 @@ bool Renderer::Init()
// load the effect, find the best profiles (if any) // load the effect, find the best profiles (if any)
if (cgGLIsProfileSupported(CG_PROFILE_ARBVP1) != CG_TRUE) { if (cgGLIsProfileSupported(CG_PROFILE_ARBVP1) != CG_TRUE) {
ERROR_LOG(VIDEO, "arbvp1 not supported\n"); ERROR_LOG(VIDEO, "arbvp1 not supported");
return false; return false;
} }
if (cgGLIsProfileSupported(CG_PROFILE_ARBFP1) != CG_TRUE) { if (cgGLIsProfileSupported(CG_PROFILE_ARBFP1) != CG_TRUE) {
ERROR_LOG(VIDEO, "arbfp1 not supported\n"); ERROR_LOG(VIDEO, "arbfp1 not supported");
return false; return false;
} }
@ -434,17 +434,17 @@ bool Renderer::Init()
cgGLSetOptimalOptions(g_cgvProf); cgGLSetOptimalOptions(g_cgvProf);
cgGLSetOptimalOptions(g_cgfProf); cgGLSetOptimalOptions(g_cgfProf);
INFO_LOG(VIDEO, "Max buffer sizes: %d %d\n", cgGetProgramBufferMaxSize(g_cgvProf), cgGetProgramBufferMaxSize(g_cgfProf)); INFO_LOG(VIDEO, "Max buffer sizes: %d %d", cgGetProgramBufferMaxSize(g_cgvProf), cgGetProgramBufferMaxSize(g_cgfProf));
int nenvvertparams, nenvfragparams, naddrregisters[2]; int nenvvertparams, nenvfragparams, naddrregisters[2];
glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, (GLint *)&nenvvertparams); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, (GLint *)&nenvvertparams);
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, (GLint *)&nenvfragparams); glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, (GLint *)&nenvfragparams);
glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, (GLint *)&naddrregisters[0]); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, (GLint *)&naddrregisters[0]);
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, (GLint *)&naddrregisters[1]); glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB, (GLint *)&naddrregisters[1]);
DEBUG_LOG(VIDEO, "Max program env parameters: vert=%d, frag=%d\n", nenvvertparams, nenvfragparams); DEBUG_LOG(VIDEO, "Max program env parameters: vert=%d, frag=%d", nenvvertparams, nenvfragparams);
DEBUG_LOG(VIDEO, "Max program address register parameters: vert=%d, frag=%d\n", naddrregisters[0], naddrregisters[1]); DEBUG_LOG(VIDEO, "Max program address register parameters: vert=%d, frag=%d", naddrregisters[0], naddrregisters[1]);
if (nenvvertparams < 238) if (nenvvertparams < 238)
ERROR_LOG(VIDEO, "Not enough vertex shader environment constants!!\n"); ERROR_LOG(VIDEO, "Not enough vertex shader environment constants!!");
#ifndef _DEBUG #ifndef _DEBUG
cgGLSetDebugMode(GL_FALSE); cgGLSetDebugMode(GL_FALSE);
@ -972,7 +972,7 @@ void ComputeBackbufferRectangle(TRectangle *rc)
// Adjust the X and Y offset // Adjust the X and Y offset
FloatXOffset = FloatXOffset - (IncreasedWidth / 2.0 / WidthRatio / Ratio); FloatXOffset = FloatXOffset - (IncreasedWidth / 2.0 / WidthRatio / Ratio);
FloatYOffset = FloatYOffset - (IncreasedHeight / 2.0 / HeightRatio / Ratio); FloatYOffset = FloatYOffset - (IncreasedHeight / 2.0 / HeightRatio / Ratio);
//DEBUG_LOG(CONSOLE, "Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f\n", Ratio, IncreasedHeight, FloatYOffset); //DEBUG_LOG(CONSOLE, "Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f", Ratio, IncreasedHeight, FloatYOffset);
} }
// round(float) = floor(float + 0.5) // round(float) = floor(float + 0.5)
@ -1370,7 +1370,7 @@ void UpdateViewport()
// [4] = yorig + height/2 + 342 // [4] = yorig + height/2 + 342
// [5] = 16777215 * farz // [5] = 16777215 * farz
/*INFO_LOG(VIDEO, "view: topleft=(%f,%f), wh=(%f,%f), z=(%f,%f)\n", /*INFO_LOG(VIDEO, "view: topleft=(%f,%f), wh=(%f,%f), z=(%f,%f)",
rawViewport[3]-rawViewport[0]-342, rawViewport[4]+rawViewport[1]-342, rawViewport[3]-rawViewport[0]-342, rawViewport[4]+rawViewport[1]-342,
2 * rawViewport[0], 2 * rawViewport[1], 2 * rawViewport[0], 2 * rawViewport[1],
(rawViewport[5] - rawViewport[2]) / 16777215.0f, rawViewport[5] / 16777215.0f);*/ (rawViewport[5] - rawViewport[2]) / 16777215.0f, rawViewport[5] / 16777215.0f);*/
@ -1412,15 +1412,15 @@ void UpdateViewport()
GetWindowRect(Child, &RcChild); GetWindowRect(Child, &RcChild);
//Console::ClearScreen(); //Console::ClearScreen();
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n"); DEBUG_LOG(CONSOLE, "----------------------------------------------------------------");
DEBUG_LOG(CONSOLE, "Top window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcTop.left, RcTop.top, RcTop.right - RcTop.left, RcTop.bottom - RcTop.top); DEBUG_LOG(CONSOLE, "Top window: X:%03i Y:%03i Width:%03i Height:%03i", RcTop.left, RcTop.top, RcTop.right - RcTop.left, RcTop.bottom - RcTop.top);
DEBUG_LOG(CONSOLE, "Parent window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcParent.left, RcParent.top, RcParent.right - RcParent.left, RcParent.bottom - RcParent.top); DEBUG_LOG(CONSOLE, "Parent window: X:%03i Y:%03i Width:%03i Height:%03i", RcParent.left, RcParent.top, RcParent.right - RcParent.left, RcParent.bottom - RcParent.top);
DEBUG_LOG(CONSOLE, "Child window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcChild.left, RcChild.top, RcChild.right - RcChild.left, RcChild.bottom - RcChild.top); DEBUG_LOG(CONSOLE, "Child window: X:%03i Y:%03i Width:%03i Height:%03i", RcChild.left, RcChild.top, RcChild.right - RcChild.left, RcChild.bottom - RcChild.top);
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n"); DEBUG_LOG(CONSOLE, "----------------------------------------------------------------");
DEBUG_LOG(CONSOLE, "Res. MValue: X:%f Y:%f XOffs:%f YOffs:%f\n", OpenGL_GetXmax(), OpenGL_GetYmax(), OpenGL_GetXoff(), OpenGL_GetYoff()); DEBUG_LOG(CONSOLE, "Res. MValue: X:%f Y:%f XOffs:%f YOffs:%f", OpenGL_GetXmax(), OpenGL_GetYmax(), OpenGL_GetXoff(), OpenGL_GetYoff());
DEBUG_LOG(CONSOLE, "GLViewPort: X:%03i Y:%03i Width:%03i Height:%03i\n", GLx, GLy, GLWidth, GLHeight); DEBUG_LOG(CONSOLE, "GLViewPort: X:%03i Y:%03i Width:%03i Height:%03i", GLx, GLy, GLWidth, GLHeight);
DEBUG_LOG(CONSOLE, "GLDepthRange: Near:%f Far:%f\n", GLNear, GLFar); DEBUG_LOG(CONSOLE, "GLDepthRange: Near:%f Far:%f", GLNear, GLFar);
DEBUG_LOG(CONSOLE, "GLScissor: X:%03i Y:%03i Width:%03i Height:%03i\n", GLScissorX, GLScissorY, GLScissorW, GLScissorH); DEBUG_LOG(CONSOLE, "GLScissor: X:%03i Y:%03i Width:%03i Height:%03i", GLScissorX, GLScissorY, GLScissorW, GLScissorH);
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n"); DEBUG_LOG(CONSOLE, "----------------------------------------------------------------");
*/ */
} }

View File

@ -68,7 +68,7 @@ void CreateRgbToYuyvProgram()
"}\n"; "}\n";
if (!PixelShaderCache::CompilePixelShader(s_rgbToYuyvProgram, FProgram)) { if (!PixelShaderCache::CompilePixelShader(s_rgbToYuyvProgram, FProgram)) {
ERROR_LOG(VIDEO, "Failed to create RGB to YUYV fragment program\n"); ERROR_LOG(VIDEO, "Failed to create RGB to YUYV fragment program");
} }
} }
@ -95,7 +95,7 @@ void CreateYuyvToRgbProgram()
"}\n"; "}\n";
if (!PixelShaderCache::CompilePixelShader(s_yuyvToRgbProgram, FProgram)) { if (!PixelShaderCache::CompilePixelShader(s_yuyvToRgbProgram, FProgram)) {
ERROR_LOG(VIDEO, "Failed to create YUYV to RGB fragment program\n"); ERROR_LOG(VIDEO, "Failed to create YUYV to RGB fragment program");
} }
} }
@ -125,7 +125,7 @@ FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
if (!PixelShaderCache::CompilePixelShader(s_encodingPrograms[format], shader)) { if (!PixelShaderCache::CompilePixelShader(s_encodingPrograms[format], shader)) {
const char* error = cgGetLastListing(g_cgcontext); const char* error = cgGetLastListing(g_cgcontext);
ERROR_LOG(VIDEO, "Failed to create encoding fragment program\n"); ERROR_LOG(VIDEO, "Failed to create encoding fragment program");
} }
} }

View File

@ -113,10 +113,10 @@ void TextureMngr::TCacheEntry::SetTextureParameters(TexMode0 &newmode)
(g_Config.bForceFiltering || newmode.min_filter >= 4) ? GL_LINEAR : GL_NEAREST); (g_Config.bForceFiltering || newmode.min_filter >= 4) ? GL_LINEAR : GL_NEAREST);
if (newmode.wrap_s == 2 || newmode.wrap_t == 2) if (newmode.wrap_s == 2 || newmode.wrap_t == 2)
DEBUG_LOG(VIDEO, "cannot support mirrorred repeat mode\n"); DEBUG_LOG(VIDEO, "cannot support mirrorred repeat mode");
if (newmode.wrap_s == 1 || newmode.wrap_t == 1) if (newmode.wrap_s == 1 || newmode.wrap_t == 1)
DEBUG_LOG(VIDEO, "cannot support repeat mode\n"); DEBUG_LOG(VIDEO, "cannot support repeat mode");
} }
else { else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
@ -450,7 +450,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
// Z16,GB8,RG8,Z16L,IA8,RA8 - IA8 // Z16,GB8,RG8,Z16L,IA8,RA8 - IA8
bool bIsInit = textures.find(address) != textures.end(); bool bIsInit = textures.find(address) != textures.end();
PRIM_LOG("copytarg: addr=0x%x, fromz=%d, intfmt=%d, copyfmt=%d\n", address, (int)bFromZBuffer, (int)bIsIntensityFmt,copyfmt); PRIM_LOG("copytarg: addr=0x%x, fromz=%d, intfmt=%d, copyfmt=%d", address, (int)bFromZBuffer, (int)bIsIntensityFmt,copyfmt);
TCacheEntry& entry = textures[address]; TCacheEntry& entry = textures[address];
entry.isNonPow2 = true; entry.isNonPow2 = true;
@ -549,7 +549,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
colmat[0] = colmat[4] = colmat[8] = colmat[13] = 1; colmat[0] = colmat[4] = colmat[8] = colmat[13] = 1;
break; break;
default: default:
ERROR_LOG(VIDEO, "Unknown copy zbuf format: 0x%x\n", copyfmt); ERROR_LOG(VIDEO, "Unknown copy zbuf format: 0x%x", copyfmt);
colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1; colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1;
break; break;
} }
@ -578,7 +578,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
break; break;
default: default:
ERROR_LOG(VIDEO, "Unknown copy intensity format: 0x%x\n", copyfmt); ERROR_LOG(VIDEO, "Unknown copy intensity format: 0x%x", copyfmt);
colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1; colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1;
break; break;
} }
@ -622,7 +622,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
break; break;
default: default:
ERROR_LOG(VIDEO, "Unknown copy color format: 0x%x\n", copyfmt); ERROR_LOG(VIDEO, "Unknown copy color format: 0x%x", copyfmt);
colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1; colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1;
break; break;
} }

View File

@ -125,7 +125,7 @@ void AddVertices(int primitive, int numvertices)
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
static const char *sprims[8] = {"quads", "nothing", "tris", "tstrip", "tfan", "lines", "lstrip", "points"}; static const char *sprims[8] = {"quads", "nothing", "tris", "tstrip", "tfan", "lines", "lstrip", "points"};
PRIM_LOG("prim: %s, c=%d\n", sprims[primitive], numvertices); PRIM_LOG("prim: %s, c=%d", sprims[primitive], numvertices);
#endif #endif
} }
@ -137,14 +137,14 @@ void Flush()
_assert_(s_pCurBufferPointer != s_pBaseBufferPointer); _assert_(s_pCurBufferPointer != s_pBaseBufferPointer);
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
PRIM_LOG("frame%d:\n texgen=%d, numchan=%d, dualtex=%d, ztex=%d, cole=%d, alpe=%d, ze=%d\n", g_Config.iSaveTargetId, xfregs.numTexGens, PRIM_LOG("frame%d:\n texgen=%d, numchan=%d, dualtex=%d, ztex=%d, cole=%d, alpe=%d, ze=%d", g_Config.iSaveTargetId, xfregs.numTexGens,
xfregs.nNumChans, (int)xfregs.bEnableDualTexTransform, bpmem.ztex2.op, xfregs.nNumChans, (int)xfregs.bEnableDualTexTransform, bpmem.ztex2.op,
bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate, bpmem.zmode.updateenable); bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate, bpmem.zmode.updateenable);
for (int i = 0; i < xfregs.nNumChans; ++i) { for (int i = 0; i < xfregs.nNumChans; ++i) {
LitChannel* ch = &xfregs.colChans[i].color; LitChannel* ch = &xfregs.colChans[i].color;
PRIM_LOG("colchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d\n", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc); PRIM_LOG("colchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc);
ch = &xfregs.colChans[i].alpha; ch = &xfregs.colChans[i].alpha;
PRIM_LOG("alpchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d\n", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc); PRIM_LOG("alpchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc);
} }
for (int i = 0; i < xfregs.numTexGens; ++i) { for (int i = 0; i < xfregs.numTexGens; ++i) {
@ -152,12 +152,12 @@ void Flush()
if (tinfo.texgentype != XF_TEXGEN_EMBOSS_MAP) tinfo.hex &= 0x7ff; if (tinfo.texgentype != XF_TEXGEN_EMBOSS_MAP) tinfo.hex &= 0x7ff;
if (tinfo.texgentype != XF_TEXGEN_REGULAR) tinfo.projection = 0; if (tinfo.texgentype != XF_TEXGEN_REGULAR) tinfo.projection = 0;
PRIM_LOG("txgen%d: proj=%d, input=%d, gentype=%d, srcrow=%d, embsrc=%d, emblght=%d, postmtx=%d, postnorm=%d\n", PRIM_LOG("txgen%d: proj=%d, input=%d, gentype=%d, srcrow=%d, embsrc=%d, emblght=%d, postmtx=%d, postnorm=%d",
i, tinfo.projection, tinfo.inputform, tinfo.texgentype, tinfo.sourcerow, tinfo.embosssourceshift, tinfo.embosslightshift, i, tinfo.projection, tinfo.inputform, tinfo.texgentype, tinfo.sourcerow, tinfo.embosssourceshift, tinfo.embosslightshift,
xfregs.texcoords[i].postmtxinfo.index, xfregs.texcoords[i].postmtxinfo.normalize); xfregs.texcoords[i].postmtxinfo.index, xfregs.texcoords[i].postmtxinfo.normalize);
} }
PRIM_LOG("pixel: tev=%d, ind=%d, texgen=%d, dstalpha=%d, alphafunc=0x%x\n", bpmem.genMode.numtevstages+1, bpmem.genMode.numindstages, PRIM_LOG("pixel: tev=%d, ind=%d, texgen=%d, dstalpha=%d, alphafunc=0x%x", bpmem.genMode.numtevstages+1, bpmem.genMode.numindstages,
bpmem.genMode.numtexgens, (u32)bpmem.dstalpha.enable, (bpmem.alphaFunc.hex>>16)&0xff); bpmem.genMode.numtexgens, (u32)bpmem.dstalpha.enable, (bpmem.alphaFunc.hex>>16)&0xff);
#endif #endif
@ -226,7 +226,7 @@ void Flush()
} }
} }
else { else {
ERROR_LOG(VIDEO, "error loading tex\n"); ERROR_LOG(VIDEO, "error loading tex");
TextureMngr::DisableStage(i); // disable since won't be used TextureMngr::DisableStage(i); // disable since won't be used
} }
} }
@ -270,7 +270,7 @@ void Flush()
if (ps) glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, ps->glprogid); // Lego Star Wars crashes here. if (ps) glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, ps->glprogid); // Lego Star Wars crashes here.
#if defined(_DEBUG) || defined(DEBUGFAST) #if defined(_DEBUG) || defined(DEBUGFAST)
PRIM_LOG("\n"); PRIM_LOG("");
#endif #endif
int groupStart = 0; int groupStart = 0;

View File

@ -99,7 +99,7 @@ VERTEXSHADER* VertexShaderCache::GetShader(u32 components)
#endif #endif
if (!code || !VertexShaderCache::CompileVertexShader(entry.shader, code)) { if (!code || !VertexShaderCache::CompileVertexShader(entry.shader, code)) {
ERROR_LOG(VIDEO, "failed to create vertex shader\n"); ERROR_LOG(VIDEO, "failed to create vertex shader");
return NULL; return NULL;
} }
@ -144,7 +144,7 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
s_displayCompileAlert = false; s_displayCompileAlert = false;
} }
cgDestroyProgram(tempprog); cgDestroyProgram(tempprog);
ERROR_LOG(VIDEO, "Failed to load vs %s:\n", cgGetLastListing(g_cgcontext)); ERROR_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
ERROR_LOG(VIDEO, pstrprogram); ERROR_LOG(VIDEO, pstrprogram);
return false; return false;
} }