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

wined3d: Add a function for dumping FBO status codes.

parent 2669af73
......@@ -5193,7 +5193,7 @@ static void check_fbo_status(IWineD3DDevice *iface) {
status = GL_EXTCALL(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT));
switch(status) {
case GL_FRAMEBUFFER_COMPLETE_EXT: TRACE("FBO complete.\n"); break;
default: FIXME("FBO status %#x.\n", status); break;
default: FIXME("FBO status %s (%#x)\n", debug_fbostatus(status), status); break;
}
}
......
......@@ -696,6 +696,25 @@ const char* debug_d3dpool(WINED3DPOOL Pool) {
}
}
const char *debug_fbostatus(GLenum status) {
switch(status) {
#define FBOSTATUS_TO_STR(u) case u: return #u
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_COMPLETE_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT);
FBOSTATUS_TO_STR(GL_FRAMEBUFFER_UNSUPPORTED_EXT);
#undef FBOSTATUS_TO_STR
default:
FIXME("Unrecognied FBO status 0x%08x\n", status);
return "unrecognized";
}
}
/*****************************************************************************
* Useful functions mapping GL <-> D3D values
*/
......
......@@ -1402,6 +1402,7 @@ const char* debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type);
const char* debug_d3dtexturestate(DWORD state);
const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype);
const char* debug_d3dpool(WINED3DPOOL pool);
const char *debug_fbostatus(GLenum status);
/* 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