wined3d: Add a function for dumping FBO status codes.

This commit is contained in:
H. Verbeet 2007-04-16 21:19:12 +02:00 committed by Alexandre Julliard
parent 2669af73df
commit c4cc10a595
3 changed files with 21 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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
*/

View File

@ -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);