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.
This commit is contained in:
Henri Verbeet 2009-12-01 11:27:47 +01:00 committed by Alexandre Julliard
parent 64e6e956e5
commit 212ee15bd7
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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
{