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:
parent
c0219a7384
commit
546c55a09d
|
@ -678,7 +678,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi
|
||||||
dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC);
|
dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC);
|
||||||
if (pool == D3DPOOL_DEFAULT && !dynamic_texture)
|
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;
|
texptr = &buftex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue