Paul Gofman : d3dx9: Don' t pass usage flags when creating temporary texture
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 25 10:56:04 CST 2016
Module: wine
Branch: master
Commit: 546c55a09d77d197e3ca74426a2f329fad8bc8ce
URL: http://source.winehq.org/git/wine.git/?a=commit;h=546c55a09d77d197e3ca74426a2f329fad8bc8ce
Author: Paul Gofman <gofmanp at 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 at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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
More information about the wine-cvs
mailing list