From: Connor McAdams cmcadams@codeweavers.com
This used to be handled by the calls to D3DXLoad{Surface,Volume}FromMemory, but now it needs to be handled inside of the texture from file functions themselves.
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/d3dx9_36/texture.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index a65a955cebf..3c0264cc6ce 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -603,6 +603,8 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi width = (width == D3DX_DEFAULT) ? make_pow2(imginfo.Width) : imginfo.Width; if (!height || height == D3DX_DEFAULT_NONPOW2 || height == D3DX_FROM_FILE || height == D3DX_DEFAULT) height = (height == D3DX_DEFAULT) ? make_pow2(imginfo.Height) : imginfo.Height; + if (filter == D3DX_DEFAULT) + filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER;
format_specified = (format != D3DFMT_UNKNOWN && format != D3DX_DEFAULT); if (format == D3DFMT_FROM_FILE || format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT) @@ -1133,6 +1135,8 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic height = (height == D3DX_DEFAULT) ? make_pow2(image_info.Height) : image_info.Height; if (!depth || depth == D3DX_DEFAULT_NONPOW2 || depth == D3DX_FROM_FILE || depth == D3DX_DEFAULT) depth = (depth == D3DX_DEFAULT) ? make_pow2(image_info.Depth) : image_info.Depth; + if (filter == D3DX_DEFAULT) + filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER;
format_specified = (format != D3DFMT_UNKNOWN && format != D3DX_DEFAULT); if (format == D3DFMT_FROM_FILE || format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT) @@ -1418,6 +1422,8 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, size = max(img_info.Width, img_info.Height); else if (size == D3DX_DEFAULT) size = make_pow2(max(img_info.Width, img_info.Height)); + if (filter == D3DX_DEFAULT) + filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER;
format_specified = (format != D3DFMT_UNKNOWN && format != D3DX_DEFAULT); if (format == D3DFMT_FROM_FILE || format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT)