d3dx9: Don't pass usage flags when creating temporary texture

Some usage flags require D3DPOOL_DEFAULT (and not D3DPOOL_SYSTEMMEM),
and the usage of texture being created is overall not related to
intermediate buffer texture usage. If texture being created has
D3DUSAGE_AUTOGENMIPMAP, updating it from non autogenerated mipmap should
be fine according to MSDN (IDirect3DDevice9::UpdateTexture).

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2016-02-25 13:37:12 +03:00 committed by Alexandre Julliard
parent c0219a7384
commit 546c55a09d
1 changed files with 1 additions and 1 deletions

View File

@ -678,7 +678,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi
dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC);
if (pool == D3DPOOL_DEFAULT && !dynamic_texture)
{
hr = D3DXCreateTexture(device, width, height, miplevels, usage, format, D3DPOOL_SYSTEMMEM, &buftex);
hr = D3DXCreateTexture(device, width, height, miplevels, 0, format, D3DPOOL_SYSTEMMEM, &buftex);
texptr = &buftex;
}
else