Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 11 +++++------ dlls/d3d10/tests/effect.c | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 3198ad5a575..daca3379fde 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -9037,21 +9037,20 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_rasterizer_variable_GetBackingStor
TRACE("iface %p, index %u, desc %p.\n", iface, index, desc);
- if (v->type->element_count) - v = impl_from_ID3D10EffectVariable(iface->lpVtbl->GetElement(iface, index)); - - if (v->type->basetype != D3D10_SVT_RASTERIZER) + if (!iface->lpVtbl->IsValid(iface)) { - WARN("Variable is not a rasterizer state.\n"); + WARN("Invalid variable.\n"); return E_FAIL; }
+ if (!(v = d3d10_get_state_variable(v, index, &v->effect->rs_states))) + return E_FAIL; + *desc = v->u.state.desc.rasterizer;
return S_OK; }
- static const struct ID3D10EffectRasterizerVariableVtbl d3d10_effect_rasterizer_variable_vtbl = { /* ID3D10EffectVariable methods */ diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 93ad4d8a475..84a2abcb4d9 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -4567,6 +4567,8 @@ static void test_effect_state_groups(void) ok(rast_desc.MultisampleEnable, "Got unexpected MultisampleEnable %#x.\n", rast_desc.MultisampleEnable); ok(rast_desc.AntialiasedLineEnable, "Got unexpected AntialiasedLineEnable %#x.\n", rast_desc.AntialiasedLineEnable); + r->lpVtbl->GetBackingStore(r, 1, &rast_desc); + ok(rast_desc.CullMode == D3D10_CULL_BACK, "Got unexpected CullMode %#x.\n", rast_desc.CullMode);
technique = effect->lpVtbl->GetTechniqueByName(effect, "tech0"); ok(technique->lpVtbl->IsValid(technique), "Expected valid technique.\n");