Commit a79da968 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9: Do not set active pass if BeginPass() failed.

parent 393ec970
......@@ -4071,10 +4071,14 @@ static HRESULT WINAPI ID3DXEffectImpl_BeginPass(ID3DXEffect *iface, UINT pass)
if (technique && pass < technique->pass_count && !effect->active_pass)
{
effect->active_pass = &technique->passes[pass];
HRESULT hr;
memset(effect->current_light, 0, sizeof(effect->current_light));
memset(&effect->current_material, 0, sizeof(effect->current_material));
return d3dx9_apply_pass_states(effect, effect->active_pass, TRUE);
if (SUCCEEDED(hr = d3dx9_apply_pass_states(effect, &technique->passes[pass], TRUE)))
effect->active_pass = &technique->passes[pass];
return hr;
}
WARN("Invalid argument supplied.\n");
......
......@@ -6019,6 +6019,7 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
"Unexpected vector %g, %g, %g, %g.\n", fvect.x, fvect.y, fvect.z, fvect.w);
hr = effect3->lpVtbl->EndPass(effect3);
todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
hr = effect3->lpVtbl->End(effect3);
......
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