mirror of
https://github.com/reactos/wine.git
synced 2025-01-24 04:45:18 +00:00
wined3d: Output pretty GL errors in checkGLcall and vcheckGLcall.
This commit is contained in:
parent
7370a93b52
commit
b643ab3620
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user