mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 00:13:37 +00:00
d3dx9: Return D3DERR_INVALIDCALL from ID3DXEffect::BeginPass() if the effect is not started.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5041acfa2
commit
b6062279b8
|
@ -4001,6 +4001,12 @@ static HRESULT WINAPI d3dx_effect_BeginPass(ID3DXEffect *iface, UINT pass)
|
|||
|
||||
TRACE("iface %p, pass %u\n", effect, pass);
|
||||
|
||||
if (!effect->started)
|
||||
{
|
||||
WARN("Effect is not started, returning D3DERR_INVALIDCALL.\n");
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (technique && pass < technique->pass_count && !effect->active_pass)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
|
|
@ -3081,6 +3081,12 @@ static void test_effect_states(IDirect3DDevice9 *device)
|
|||
NULL, NULL, 0, NULL, &effect, NULL);
|
||||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
|
||||
|
||||
hr = effect->lpVtbl->End(effect);
|
||||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
|
||||
hr = effect->lpVtbl->BeginPass(effect, 0);
|
||||
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
|
||||
|
||||
/* State affected in passes saved/restored even if no pass
|
||||
was performed. States not present in passes are not saved &
|
||||
restored */
|
||||
|
|
Loading…
Reference in a new issue