GNOME Bugzilla – Bug 765250
d3dvideosink includes deprecated and unused d3dx9tex.h header
Last modified: 2016-04-19 12:52:45 UTC
d3dvideosink uses Direct3D 9, and uses the D3DX9 API; specifically the D3DX9Tex (texture) API. 4 years ago Microsoft deprecated all of D3DX (D3DX9, D3DX10, D3DX11)[1]. The D3DX headers are no longer shipped with the Windows SDK (which is shipped with Visual Studio) since then (Windows 8 and later)[2]. 1. https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/ 2. https://msdn.microsoft.com/en-us/library/windows/desktop/bb172965%28v=vs.85%29.aspx The only way to access the required headers (unless you use Cerbero's Wine headers) is to download the June 2010 DirectX SDK (the last release ever made). We should continue using Direct3D 9 since it's still the most well-supported API out there, but we should move from D3DX9Tex to DirectXTex[3]. 3. https://blogs.msdn.microsoft.com/chuckw/2011/10/27/directxtex/ It actually doesn't look too difficult since our usage of d3dx9tex is very basic, so I'll give it a shot and report back.
Well, this is embarrassing. It includes that header but uses nothing from it on native windows. Attaching a patch that fixes this.
Created attachment 326315 [details] [review] Don't include deprecated and unavailable d3dx9tex.h on native Windows
Review of attachment 326315 [details] [review]: ::: sys/d3dvideosink/d3dhelpers.h @@ +47,3 @@ + +/* Deprecated and unneeded on native Windows */ +#if defined(__MINGW32__) We should check if this is actually needed with MINGW :)
Removing the d3dx9tex.h include works fine with mingw (cross-build on linux) as well for me?.
Let's remove it unconditionally then
Modified to just remove and pushed: commit 6472482680e3adfd1c03798e9b9f74a280e2bbe4 Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Tue Apr 19 14:57:22 2016 +0530 d3dvideosink: Don't include deprecated and unavailable d3dx9tex.h It's not needed, not on native Windows nor with mingw, and we don't use anything from it anyway https://bugzilla.gnome.org/show_bug.cgi?id=765250
Comment on attachment 326315 [details] [review] Don't include deprecated and unavailable d3dx9tex.h on native Windows pushed modified.