Commit 212ee15b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Return D3DERR_INVALIDCALL when trying to delete an invalid pixel shader.

It appears this is fixed on Vista/Win7 to be consistent with DeleteVertexShader(). Match the more consistent behaviour of Vista/Win7 and mark the previous behaviour as broken.
parent 64e6e956
......@@ -2316,7 +2316,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i
{
WARN("Invalid handle (%#x) passed.\n", pShader);
wined3d_mutex_unlock();
return D3D_OK;
return D3DERR_INVALIDCALL;
}
IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &cur);
......
......@@ -1084,9 +1084,9 @@ static void test_shader(void)
/* Check for double delete. */
hr = IDirect3DDevice8_DeletePixelShader(pDevice, hPixelShader2);
ok(hr == D3D_OK, "IDirect3DDevice8_DeletePixelShader returned %#08x\n", hr);
ok(hr == D3DERR_INVALIDCALL || broken(hr == D3D_OK), "IDirect3DDevice8_DeletePixelShader returned %#08x\n", hr);
hr = IDirect3DDevice8_DeletePixelShader(pDevice, hPixelShader);
ok(hr == D3D_OK, "IDirect3DDevice8_DeletePixelShader returned %#08x\n", hr);
ok(hr == D3DERR_INVALIDCALL || broken(hr == D3D_OK), "IDirect3DDevice8_DeletePixelShader returned %#08x\n", hr);
}
else
{
......
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