wined3d: Add a debug function for surface locations.

This commit is contained in:
Stefan Dösinger 2009-02-16 23:30:36 +01:00 committed by Alexandre Julliard
parent c585b4de99
commit 68c251f327
3 changed files with 14 additions and 5 deletions

View File

@ -4197,8 +4197,7 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW
IWineD3DBaseTexture *texture;
IWineD3DSurfaceImpl *overlay;
TRACE("(%p)->(%s, %s)\n", iface,
flag == SFLAG_INSYSMEM ? "SFLAG_INSYSMEM" : flag == SFLAG_INDRAWABLE ? "SFLAG_INDRAWABLE" : "SFLAG_INTEXTURE",
TRACE("(%p)->(%s, %s)\n", iface, debug_surflocation(flag),
persistent ? "TRUE" : "FALSE");
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
@ -4481,9 +4480,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
}
}
TRACE("(%p)->(%s, %p)\n", iface,
flag == SFLAG_INSYSMEM ? "SFLAG_INSYSMEM" : flag == SFLAG_INDRAWABLE ? "SFLAG_INDRAWABLE" : "SFLAG_INTEXTURE",
rect);
TRACE("(%p)->(%s, %p)\n", iface, debug_surflocation(flag), rect);
if(rect) {
TRACE("Rectangle: (%d,%d)-(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
}

View File

@ -1220,6 +1220,17 @@ void dump_color_fixup_desc(struct color_fixup_desc fixup)
TRACE("\tW: %s%s\n", debug_fixup_channel_source(fixup.w_source), fixup.w_sign_fixup ? ", SIGN_FIXUP" : "");
}
const char *debug_surflocation(DWORD flag) {
char buf[128];
buf[0] = 0;
if(flag & SFLAG_INSYSMEM) strcat(buf, " | SFLAG_INSYSMEM");
if(flag & SFLAG_INDRAWABLE) strcat(buf, " | SFLAG_INDRAWABLE");
if(flag & SFLAG_INTEXTURE) strcat(buf, " | SFLAG_INTEXTURE");
if(flag & SFLAG_INSRGBTEX) strcat(buf, " | SFLAG_INSRGBTEX");
return wine_dbg_sprintf("%s", buf[0] ? buf + 3 : "0");
}
/*****************************************************************************
* Useful functions mapping GL <-> D3D values
*/

View File

@ -2037,6 +2037,7 @@ const char* debug_d3dtop(WINED3DTEXTUREOP d3dtop);
const char *debug_fixup_channel_source(enum fixup_channel_source source);
const char *debug_yuv_fixup(enum yuv_fixup yuv_fixup);
void dump_color_fixup_desc(struct color_fixup_desc fixup);
const char *debug_surflocation(DWORD flag);
/* Routines for GL <-> D3D values */
GLenum StencilOp(DWORD op);