On 10/15/21 12:46 PM, Matteo Bruni wrote:
On Thu, Oct 14, 2021 at 8:42 AM Nikolay Sivov nsivov@codeweavers.com wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/d3d10/effect.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index bd104465222..a0bb859e535 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -8536,6 +8536,8 @@ HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT fl TRACE("data %p, data_size %lu, flags %#x, device %p, effect_pool %p, effect %p.\n", data, data_size, flags, device, effect_pool, effect);
- *effect = NULL;
- if (!(flags & D3D10_EFFECT_COMPILE_CHILD_EFFECT) != !effect_pool) return E_INVALIDARG;
@@ -8548,6 +8550,7 @@ HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT fl if (FAILED(hr = d3d10_create_effect(data, data_size, device, pool, 0, &object))) { WARN("Failed to create an effect, hr %#x.\n", hr);
return hr;
}
*effect = &object->ID3D10Effect_iface;
@@ -8598,6 +8601,8 @@ HRESULT WINAPI D3D10CreateEffectPoolFromMemory(void *data, SIZE_T data_size, UIN TRACE("data %p, data_size %lu, fx_flags %#x, device %p, effect_pool %p.\n", data, data_size, fx_flags, device, effect_pool);
- *effect_pool = NULL;
- if (FAILED(hr = d3d10_create_effect(data, data_size, device, NULL, D3D10_EFFECT_IS_POOL, &object))) {
Makes sense, sadly native seems to leave the pointer unchanged in those cases. We probably could use a few ok() calls in the tests checking for this.
I think we want the second hunk in any case.
Right, all of it was for this missing return.