Commit 6c7c511a authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9: Do not fail effect creation if a shader cannot be created.

parent c3677ecf
......@@ -5938,7 +5938,7 @@ static HRESULT d3dx9_create_object(struct d3dx9_base_effect *base, struct d3dx_o
(IDirect3DVertexShader9 **)param->data)))
{
WARN("Failed to create vertex shader.\n");
return hr;
return D3D_OK;
}
break;
case D3DXPT_PIXELSHADER:
......@@ -5946,7 +5946,7 @@ static HRESULT d3dx9_create_object(struct d3dx9_base_effect *base, struct d3dx_o
(IDirect3DPixelShader9 **)param->data)))
{
WARN("Failed to create pixel shader.\n");
return hr;
return D3D_OK;
}
break;
default:
......
......@@ -7087,17 +7087,13 @@ static void test_effect_unsupported_shader(void)
hr = D3DXCreateEffectEx(device, test_effect_unsupported_shader_blob, sizeof(test_effect_unsupported_shader_blob),
NULL, NULL, NULL, 0, NULL, &effect, NULL);
todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
if (FAILED(hr))
{
skip("Failed to create effect, skipping test.\n");
goto cleanup;
}
hr = effect->lpVtbl->ValidateTechnique(effect, "missing_technique");
todo_wine
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
hr = effect->lpVtbl->ValidateTechnique(effect, "tech0");
todo_wine
ok(hr == E_FAIL, "Got result %#x.\n", hr);
hr = effect->lpVtbl->ValidateTechnique(effect, "tech1");
......@@ -7105,6 +7101,7 @@ static void test_effect_unsupported_shader(void)
effect->lpVtbl->SetInt(effect, "i", 1);
ok(hr == D3D_OK, "Got result %#x.\n", hr);
hr = effect->lpVtbl->ValidateTechnique(effect, "tech1");
todo_wine
ok(hr == E_FAIL, "Got result %#x.\n", hr);
effect->lpVtbl->SetInt(effect, "i", 0);
hr = effect->lpVtbl->ValidateTechnique(effect, "tech1");
......@@ -7158,7 +7155,7 @@ static void test_effect_unsupported_shader(void)
ok(!vshader, "Got non NULL vshader.\n");
effect->lpVtbl->Release(effect);
cleanup:
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
IDirect3D9_Release(d3d);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment