d3dx9: Fix D3DXFilterTexture return value.
This commit is contained in:
parent
ebbf519b78
commit
550abd41a2
|
@ -359,11 +359,10 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
|
|||
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDB_BITMAP_1x1), &texture);
|
||||
ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
|
||||
|
||||
}
|
||||
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), &texture);
|
||||
ok(hr == D3D_OK, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
|
||||
}
|
||||
|
||||
hr = D3DXCreateTextureFromResourceA(device, NULL, MAKEINTRESOURCEA(IDS_STRING), &texture);
|
||||
ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA);
|
||||
|
@ -379,11 +378,9 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
|
|||
|
||||
|
||||
/* D3DXCreateTextureFromResourceEx */
|
||||
todo_wine {
|
||||
hr = D3DXCreateTextureFromResourceExA(device, NULL, MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture);
|
||||
ok(hr == D3D_OK, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
|
||||
}
|
||||
|
||||
hr = D3DXCreateTextureFromResourceExA(device, NULL, MAKEINTRESOURCEA(IDS_STRING), D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &texture);
|
||||
ok(hr == D3DXERR_INVALIDDATA, "D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA);
|
||||
|
@ -413,10 +410,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device)
|
|||
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 0, D3DX_FILTER_BOX + 1); /* Invalid filter */
|
||||
ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
||||
|
||||
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 5, D3DX_FILTER_NONE); /* Last miplevel */
|
||||
ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
||||
|
||||
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 20, D3DX_FILTER_NONE); /* Invalid miplevel */
|
||||
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, NULL, 5, D3DX_FILTER_NONE); /* Invalid miplevel */
|
||||
ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -99,9 +99,6 @@ HRESULT WINAPI D3DXFilterTexture(LPDIRECT3DBASETEXTURE9 texture,
|
|||
|
||||
IDirect3DSurface9_Release(topsurf);
|
||||
|
||||
if (level == srclevel + 1)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue