This also relates a bit to the `D3DXIMAGE_FILEFORMAT` translation I'm doing here, in my later patches I have the image file formats unsupported by d3dx9 gated behind an API check, e.g you don't need a conversion function because calling into d3dx_helpers from d3dx9 would never successfully return a `D3DX10_IFF_GIF` for example.
Right, I was imagining something like this, which is why I put it like "a conversion function allows validation, even if we don't actually need it". For this hunk specifically I think a trivial conversion function with no checks would still look nicer than a cast.
In general I think what you're doing is fine. We can always add abstraction afterwards as needed if we're going to add more users or move the whole thing out of Wine. Not including d3dx*.h from d3dx_helpers.h would be helpful even besides those additional use cases, but it's probably not worth it if it makes things too convoluted **now**.