Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/texture.c:
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;
So this is effectively a `Fixes: 1215ee024148952525317cc104ce91e650f21ca3`, right?
I'd make use of this occasion to introduce a tiny helper like `d3dx9_validate_filter()` for this, even if it's just two lines (but copied around now a handful of times). Also, while thinking of a name for the helper, I started to wonder whether we should actually validate the `filter` value. As it turns out, that's very much the case (e.g. try to use `6`.)
Actual validation should be its own patch, probably, but I guess this is one more reason for introducing the helper.