Commit 3dc48141 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Add debug helper function for RegisterSet.

parent 24ab7090
...@@ -91,5 +91,6 @@ HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, co ...@@ -91,5 +91,6 @@ HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, co
/* debug helpers */ /* debug helpers */
const char *debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN; const char *debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN;
const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN; const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN;
const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) DECLSPEC_HIDDEN;
#endif /* __WINE_D3DX9_36_PRIVATE_H */ #endif /* __WINE_D3DX9_36_PRIVATE_H */
...@@ -674,8 +674,8 @@ static inline int is_vertex_shader(DWORD version) ...@@ -674,8 +674,8 @@ static inline int is_vertex_shader(DWORD version)
static DWORD calc_bytes(D3DXCONSTANT_DESC *desc) static DWORD calc_bytes(D3DXCONSTANT_DESC *desc)
{ {
if (desc->RegisterSet != D3DXRS_FLOAT4 && desc->RegisterSet != D3DXRS_SAMPLER) if (desc->RegisterSet != D3DXRS_FLOAT4 && desc->RegisterSet != D3DXRS_SAMPLER)
FIXME("Don't know how to calculate Bytes for constants of type %d\n", FIXME("Don't know how to calculate Bytes for constants of type %s\n",
desc->RegisterSet); debug_d3dxparameter_registerset(desc->RegisterSet));
return 4 * desc->Elements * desc->Rows * desc->Columns; return 4 * desc->Elements * desc->Rows * desc->Columns;
} }
...@@ -1064,7 +1064,7 @@ static HRESULT set_scalar_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev ...@@ -1064,7 +1064,7 @@ static HRESULT set_scalar_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
} }
break; break;
default: default:
FIXME("Handle other register sets\n"); FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc.RegisterSet));
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -1117,7 +1117,7 @@ static HRESULT set_vector_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev ...@@ -1117,7 +1117,7 @@ static HRESULT set_vector_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
} }
break; break;
default: default:
FIXME("Unhandled register set %#x\n", desc.RegisterSet); FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc.RegisterSet));
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -1235,7 +1235,7 @@ static HRESULT set_matrix_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev ...@@ -1235,7 +1235,7 @@ static HRESULT set_matrix_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
} }
break; break;
default: default:
FIXME("Unhandled register set %#x\n", desc.RegisterSet); FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc.RegisterSet));
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -1340,7 +1340,7 @@ static HRESULT set_matrix_pointer_array(ID3DXConstantTable *iface, IDirect3DDevi ...@@ -1340,7 +1340,7 @@ static HRESULT set_matrix_pointer_array(ID3DXConstantTable *iface, IDirect3DDevi
} }
break; break;
default: default:
FIXME("Unhandled register set %#x\n", desc.RegisterSet); FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc.RegisterSet));
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -1599,8 +1599,9 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru ...@@ -1599,8 +1599,9 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
constant->desc.RegisterSet = regset; constant->desc.RegisterSet = regset;
constant->desc.RegisterIndex = index; constant->desc.RegisterIndex = index;
TRACE("name %s, elements %u, index %u, defaultvalue %p\n", constant->desc.Name, TRACE("name %s, elements %u, index %u, defaultvalue %p, regset %s\n", constant->desc.Name,
constant->desc.Elements, index, constant->desc.DefaultValue); constant->desc.Elements, index, constant->desc.DefaultValue,
debug_d3dxparameter_registerset(regset));
TRACE("class %s, type %s, rows %d, columns %d, elements %d, struct_members %d\n", TRACE("class %s, type %s, rows %d, columns %d, elements %d, struct_members %d\n",
debug_d3dxparameter_class(type->Class), debug_d3dxparameter_type(type->Type), debug_d3dxparameter_class(type->Class), debug_d3dxparameter_type(type->Type),
type->Rows, type->Columns, type->Elements, type->StructMembers); type->Rows, type->Columns, type->Elements, type->StructMembers);
......
...@@ -250,7 +250,21 @@ const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) ...@@ -250,7 +250,21 @@ const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t)
WINE_D3DX_TO_STR(D3DXPT_VERTEXFRAGMENT); WINE_D3DX_TO_STR(D3DXPT_VERTEXFRAGMENT);
WINE_D3DX_TO_STR(D3DXPT_UNSUPPORTED); WINE_D3DX_TO_STR(D3DXPT_UNSUPPORTED);
default: default:
FIXME("Unrecognized D3DXPARAMETER_TYP %#x.\n", t); FIXME("Unrecognized D3DXPARAMETER_TYP %#x.\n", t);
return "unrecognized";
}
}
const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r)
{
switch (r)
{
WINE_D3DX_TO_STR(D3DXRS_BOOL);
WINE_D3DX_TO_STR(D3DXRS_INT4);
WINE_D3DX_TO_STR(D3DXRS_FLOAT4);
WINE_D3DX_TO_STR(D3DXRS_SAMPLER);
default:
FIXME("Unrecognized D3DXREGISTER_SET %#x.\n", r);
return "unrecognized"; return "unrecognized";
} }
} }
......
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