Commit b643ab36 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Output pretty GL errors in checkGLcall and vcheckGLcall.

parent 7370a93b
......@@ -714,6 +714,24 @@ const char *debug_fbostatus(GLenum status) {
}
}
const char *debug_glerror(GLenum error) {
switch(error) {
#define GLERROR_TO_STR(u) case u: return #u
GLERROR_TO_STR(GL_NO_ERROR);
GLERROR_TO_STR(GL_INVALID_ENUM);
GLERROR_TO_STR(GL_INVALID_VALUE);
GLERROR_TO_STR(GL_INVALID_OPERATION);
GLERROR_TO_STR(GL_STACK_OVERFLOW);
GLERROR_TO_STR(GL_STACK_UNDERFLOW);
GLERROR_TO_STR(GL_OUT_OF_MEMORY);
GLERROR_TO_STR(GL_INVALID_FRAMEBUFFER_OPERATION_EXT);
#undef GLERROR_TO_STR
default:
FIXME("Unrecognied GL error 0x%08x\n", error);
return "unrecognized";
}
}
/*****************************************************************************
* Useful functions mapping GL <-> D3D values
*/
......
......@@ -272,8 +272,8 @@ extern int num_lock;
TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
\
} else do { \
FIXME(">>>>>>>>>>>>>>>>> %#x from %s @ %s / %d\n", \
err, A, __FILE__, __LINE__); \
FIXME(">>>>>>>>>>>>>>>>> %s (%#x) from %s @ %s / %d\n", \
debug_glerror(err), err, A, __FILE__, __LINE__); \
err = glGetError(); \
} while (err != GL_NO_ERROR); \
}
......@@ -357,8 +357,8 @@ extern const float identity[16];
VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \
\
} else do { \
FIXME(">>>>>>>>>>>>>>>>> %#x from %s @ %s / %d\n", \
err, A, __FILE__, __LINE__); \
FIXME(">>>>>>>>>>>>>>>>> %s (%#x) from %s @ %s / %d\n", \
debug_glerror(err), err, A, __FILE__, __LINE__); \
err = glGetError(); \
} while (err != GL_NO_ERROR); \
}
......@@ -1403,6 +1403,7 @@ const char* debug_d3dtexturestate(DWORD state);
const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype);
const char* debug_d3dpool(WINED3DPOOL pool);
const char *debug_fbostatus(GLenum status);
const char *debug_glerror(GLenum error);
/* Routines for GL <-> D3D values */
GLenum StencilOp(DWORD op);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment