d3dx9: Allow passes argument to Begin() to be NULL.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7a50abd894
commit
f956200775
|
@ -4202,7 +4202,7 @@ static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DW
|
|||
|
||||
TRACE("iface %p, passes %p, flags %#x.\n", iface, passes, flags);
|
||||
|
||||
if (passes && technique)
|
||||
if (technique)
|
||||
{
|
||||
if (flags & ~(D3DXFX_DONOTSAVESTATE | D3DXFX_DONOTSAVESAMPLERSTATE | D3DXFX_DONOTSAVESHADERSTATE))
|
||||
WARN("Invalid flags (%#x) specified.\n", flags);
|
||||
|
@ -4234,7 +4234,8 @@ static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DW
|
|||
ERR("StateBlock Capture failed, hr %#x.\n", hr);
|
||||
}
|
||||
|
||||
*passes = technique->pass_count;
|
||||
if (passes)
|
||||
*passes = technique->pass_count;
|
||||
effect->started = TRUE;
|
||||
effect->begin_flags = flags;
|
||||
|
||||
|
|
|
@ -3081,7 +3081,7 @@ static void test_effect_states(IDirect3DDevice9 *device)
|
|||
ok(!bval, "Got result %u, expected 0.\n", bval);
|
||||
|
||||
hr = IDirect3DDevice9_SetTransform(device, D3DTS_WORLDMATRIX(1), &test_mat);
|
||||
hr = effect->lpVtbl->Begin(effect, &npasses, 0);
|
||||
hr = effect->lpVtbl->Begin(effect, NULL, 0);
|
||||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_GetTransform(device, D3DTS_WORLDMATRIX(1), &mat);
|
||||
|
|
Loading…
Reference in New Issue