wined3d: Add a function to print out D3DDECLUSAGE9 values.

This commit is contained in:
Ivan Gyurdiev 2006-07-03 00:11:15 -06:00 committed by Alexandre Julliard
parent 0111e15e1f
commit 7e9fd0b4c1
2 changed files with 25 additions and 0 deletions

View File

@ -249,6 +249,30 @@ const char* debug_d3dusage(DWORD usage) {
}
}
const char* debug_d3ddeclusage(BYTE usage) {
switch (usage) {
#define WINED3DDECLUSAGE_TO_STR(u) case u: return #u
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_POSITION);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_BLENDWEIGHT);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_BLENDINDICES);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_NORMAL);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_PSIZE);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_TEXCOORD);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_TANGENT);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_BINORMAL);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_TESSFACTOR);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_POSITIONT);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_COLOR);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_FOG);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_DEPTH);
WINED3DDECLUSAGE_TO_STR(D3DDECLUSAGE_SAMPLE);
#undef WINED3DDECLUSAGE_TO_STR
default:
FIXME("Unrecognized %u declaration usage!\n", usage);
return "unrecognized";
}
}
const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) {
switch (res) {
#define RES_TO_STR(res) case res: return #res;

View File

@ -1184,6 +1184,7 @@ const char* debug_d3dformat(WINED3DFORMAT fmt);
const char* debug_d3ddevicetype(D3DDEVTYPE devtype);
const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res);
const char* debug_d3dusage(DWORD usage);
const char* debug_d3ddeclusage(BYTE usage);
const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType);
const char* debug_d3drenderstate(DWORD state);
const char* debug_d3dsamplerstate(DWORD state);