Module: wine Branch: master Commit: 546c55a09d77d197e3ca74426a2f329fad8bc8ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=546c55a09d77d197e3ca74426a...
Author: Paul Gofman gofmanp@gmail.com Date: Thu Feb 25 13:37:12 2016 +0300
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
---
dlls/d3dx9_36/texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 38349e2..27f08ad 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -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