d3dx9: Do not set active pass if BeginPass() failed.
Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
393ec970c8
commit
a79da9689d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue