Re: [v3 6/7] d3dx9: implement state save and restore in effect.
2016-03-03 13:22 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> ---
For your next submissions, can you please write a short changelog of the differences with the previous version(s) of the same patch? Ideally that goes after the '---'.
@@ -3493,18 +3501,34 @@ static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DW if (flags & ~(D3DXFX_DONOTSAVESTATE | D3DXFX_DONOTSAVESAMPLERSTATE | D3DXFX_DONOTSAVESHADERSTATE)) WARN("Invalid flags (%#x) specified.\n", flags);
- if (This->manager || flags & D3DXFX_DONOTSAVESTATE) + if (effect->manager || flags & D3DXFX_DONOTSAVESTATE) { TRACE("State capturing disabled.\n"); } else { - FIXME("State capturing not supported, yet!\n"); + HRESULT hr; + unsigned int i; + + if (!technique->saved_state) + { + hr = IDirect3DDevice9_BeginStateBlock(effect->device); + if (FAILED(hr)) + ERR("BeginStateBlock failed, hr %#x.\n", hr); + for (i = 0; i < technique->pass_count; i++) + d3dx9_apply_pass_states(effect, &technique->passes[i]);
This is likely correct but testing it with a technique with at least 2 passes would be nice.
participants (1)
-
Matteo Bruni