[WINESYNC] d3dx9: Merge the d3dx_effect_GetTechniqueDesc() helper.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 10aa0819138f4aaf0f872de74eaf953326afe997 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
winesync 2020-09-21 22:40:26 +02:00 committed by Jérôme Gardou
parent 43d0a88291
commit 97475aa65c
2 changed files with 13 additions and 20 deletions

View file

@ -1018,24 +1018,6 @@ static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *ba
return D3D_OK;
}
static HRESULT d3dx9_base_effect_get_technique_desc(struct d3dx9_base_effect *base,
D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc)
{
struct d3dx_technique *tech = technique ? get_valid_technique(base, technique) : &base->techniques[0];
if (!desc || !tech)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
desc->Name = tech->name;
desc->Passes = tech->pass_count;
desc->Annotations = tech->annotation_count;
return D3D_OK;
}
static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_state *state,
void **param_value, struct d3dx_parameter **out_param,
BOOL update_all, BOOL *param_dirty)
@ -3212,10 +3194,21 @@ static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDL
D3DXTECHNIQUE_DESC *desc)
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
struct d3dx_technique *tech = technique ? get_valid_technique(&effect->base_effect, technique) : &effect->base_effect.techniques[0];
TRACE("iface %p, technique %p, desc %p.\n", iface, technique, desc);
return d3dx9_base_effect_get_technique_desc(&effect->base_effect, technique, desc);
if (!desc || !tech)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
desc->Name = tech->name;
desc->Passes = tech->pass_count;
desc->Annotations = tech->annotation_count;
return D3D_OK;
}
static HRESULT WINAPI d3dx_effect_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc)

View file

@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
tags: {wine: 730e44ebe224c1b70e9f6eaf6a9aaeb8bc38a20b}
tags: {wine: 10aa0819138f4aaf0f872de74eaf953326afe997}