Commit 4b85165c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dx9: Merge the d3dx9_effect_GetDesc() helper.

parent 715b9327
...@@ -991,25 +991,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor) ...@@ -991,25 +991,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor)
return (0xfeff0000 | ((major) << 8) | (minor)); return (0xfeff0000 | ((major) << 8) | (minor));
} }
static HRESULT d3dx9_base_effect_get_desc(struct d3dx9_base_effect *base, D3DXEFFECT_DESC *desc)
{
if (!desc)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
FIXME("partial stub!\n");
/* TODO: add creator and function count. */
desc->Creator = NULL;
desc->Functions = 0;
desc->Parameters = base->parameter_count;
desc->Techniques = base->technique_count;
return D3D_OK;
}
static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base, static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base,
D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
{ {
...@@ -3419,9 +3400,21 @@ static HRESULT WINAPI d3dx_effect_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *d ...@@ -3419,9 +3400,21 @@ static HRESULT WINAPI d3dx_effect_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *d
{ {
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
TRACE("iface %p, desc %p.\n", iface, desc); FIXME("iface %p, desc %p partial stub.\n", iface, desc);
return d3dx9_base_effect_get_desc(&effect->base_effect, desc); if (!desc)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
/* TODO: add creator and function count. */
desc->Creator = NULL;
desc->Functions = 0;
desc->Parameters = effect->base_effect.parameter_count;
desc->Techniques = effect->base_effect.technique_count;
return D3D_OK;
} }
static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect *iface, D3DXHANDLE parameter, static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect *iface, D3DXHANDLE parameter,
......
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