How to choose DirectX 9 backend

978 views
Skip to first unread message

anatoly techtonik

unread,
Feb 16, 2016, 7:29:07 AM2/16/16
to angleproject
Looks like MinGW is not yet ready for DirectX 11.


How to try Angle build with DirectX 9 renderer?

Geoff Lang

unread,
Feb 16, 2016, 9:41:18 AM2/16/16
to tech...@gmail.com, angleproject
ANGLE builds with all renderers by default (see Choosing-a-D3D-Backend for how to select which one is used at runtime) but if you want to compile only one renderer, you can set the GYP_DEFINES environment variable to something like: "angle_enable_d3d9=1 angle_enable_d3d11=0 angle_enable_gl=0" before generating the project files using "gclient sync".

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

anatoly techtonik

unread,
Feb 16, 2016, 1:54:41 PM2/16/16
to Geoff Lang, angleproject
Thanks. Looks like "-DANDLE_ENABLE_D3D11=0" did the thing.
--
anatoly t.

anatoly techtonik

unread,
Feb 16, 2016, 2:33:45 PM2/16/16
to angleproject, geof...@google.com
On Tuesday, February 16, 2016 at 9:54:41 PM UTC+3, anatoly techtonik wrote:
Thanks. Looks like "-DANDLE_ENABLE_D3D11=0" did the thing. 

Actually, it didn't help, so now trying to remove that flag completely. 

anatoly techtonik

unread,
Feb 16, 2016, 2:42:04 PM2/16/16
to angleproject, geof...@google.com
Doesn't compile for some reason.

=====
In file included from drivers\angle/libANGLE/renderer/d3d/RendererD3D.h:21:0,
                 from drivers\angle/libANGLE/renderer/d3d/CompilerD3D.h:13,
                 from drivers\angle\libANGLE\renderer\d3d\CompilerD3D.cpp:10:
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:43:9: error: 'IDXGISwapChain' does not name a type
 typedef IDXGISwapChain DXGISwapChain;
         ^
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:44:9: error: 'IDXGIFactory' does not name a type
 typedef IDXGIFactory DXGIFactory;
         ^
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:67:29: error: 'ID3D11Device' has not been declared
     HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
                             ^
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:67:51: error: 'DXGIFactory' has not been declared
     HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
                                                   ^
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:68:29: error: 'DXGI_FORMAT' has not been declared
                             DXGI_FORMAT format, UINT width, UINT height,
                             ^
drivers\angle/libANGLE/renderer/d3d/d3d11/NativeWindow.h:69:29: error: 'DXGISwapChain' has not been declared
                             DXGISwapChain** swapChain);
                             ^

=====

Geoff Lang

unread,
Feb 16, 2016, 2:47:36 PM2/16/16
to anatoly techtonik, angleproject
Just setting the ANGLE_ENABLE_D3D11 compiler define won't stop of the compilation of the D3D11 code.  You need to generate the build files without any of the D3D11 source  using the GYP defines I mentioned above.

Ariel Manzur

unread,
Feb 17, 2016, 2:47:36 PM2/17/16
to geof...@google.com, anatoly techtonik, angleproject
We're not using the vs project files, we have an external build system.. Do you happen to know which files. @anatoly you probably need to separate the files that shouldnt' be compiled when d3d11 is not enabled, put them on a separate list like the others.

--

Geoff Lang

unread,
Feb 17, 2016, 3:29:48 PM2/17/16
to Ariel Manzur, anatoly techtonik, angleproject
Yep, take a look at src/libGLESv2.gypi, it groups the sources.  You should be able to remove everything from the libangle_d3d11_sources, libangle_d3d11_win32_sources and libangle_d3d11_winrt_sources lists along with defining ANGLE_ENABLE_D3D11 to 0.

anatoly techtonik

unread,
Feb 25, 2016, 7:14:27 AM2/25/16
to Geoff Lang, Ariel Manzur, angleproject
That .gypi file looks like an ordinary Python file, but I can't import
it, because it doesn't export any names. What is the proper way to use
it from Python?

Corentin Wallez

unread,
Feb 25, 2016, 10:45:42 AM2/25/16
to tech...@gmail.com, Geoff Lang, Ariel Manzur, angleproject
Gypi files are files containing a python dictionnary literal. They are used as the configuration for GYP that is part of gclient. You can guess what the syntax is from the content of libGLESv2.gypi otherwise the (lacking imo) GYP documentation is here.

anatoly techtonik

unread,
Feb 27, 2016, 7:53:48 AM2/27/16
to Corentin Wallez, Geoff Lang, Ariel Manzur, angleproject
On Thu, Feb 25, 2016 at 6:45 PM, Corentin Wallez <cwa...@google.com> wrote:
> Gypi files are files containing a python dictionnary literal. They are used
> as the configuration for GYP that is part of gclient. You can guess what the
> syntax is from the content of libGLESv2.gypi otherwise the (lacking imo) GYP
> documentation is here.

Yes. The syntax is pretty self-explanative. The problem is to how to read this
dictionary literal into my Python script? The dictionary is not assigned to any
symbol, so it is not clear how to access it after importing.

Mark Callow

unread,
Feb 28, 2016, 2:53:08 AM2/28/16
to tech...@gmail.com, Corentin Wallez, Geoff Lang, Ariel Manzur, angleproject
You have to use “gyp” which is a Python program. As mentioned upthread this is part of gclient or you can clone the git repo `git clone https://chromium.googlesource.com/external/gyp` and follow the installation instructions I added in my fork of the repo at https://github.com/msc-/gyp.  (When I first used GYP I was new to Python; the way of installing python applications was a mystery to me so I wrote instructions to help others in the same boat.)

Regards

    -Mark

Hire me!


anatoly techtonik

unread,
Mar 1, 2016, 8:07:51 AM3/1/16
to Mark Callow, Corentin Wallez, Geoff Lang, Ariel Manzur, angleproject
Godot uses Python-based build system (SCons), so instead of installing
a new dependency, I'd just parse the .gyp file to extract needed filenames
for my options.

--
anatoly t.

anatoly techtonik

unread,
Mar 24, 2016, 12:27:51 AM3/24/16
to angleproject, pun...@gmail.com, tech...@gmail.com
Removed all d3d11 files from file list, and still can't compile it with d3d9. Probably because libANGLE/renderer/d3d/d3d11/NativeWindow.h is unconditionally included from libANGLE\renderer\d3d\RendererD3D.h and gives error:

NativeWindow.h:69:29: error: 'DXGISwapChain' has not been declared

Geoff Lang

unread,
Mar 24, 2016, 9:49:21 AM3/24/16
to tech...@gmail.com, angleproject, pun...@gmail.com
Thanks, I would consider this a bug, RendererD3D should not be including D3D11 files.

anatoly techtonik

unread,
Mar 28, 2016, 6:14:04 AM3/28/16
to Geoff Lang, angleproject, Ariel Manzur
Good to hear that, because, well I am blocked right now - my compiler doesn't
ship with D3D11 headers, and even if it was, my graphic card + drivers are so
old that going D3D11 will probably make it even slower.

Is there anything I can do to track the progress of this bug?
--
anatoly t.

Geoff Lang

unread,
Mar 29, 2016, 9:15:29 AM3/29/16
to anatoly techtonik, angleproject, Ariel Manzur
I've filed http://anglebug.com/1345 I'll try to get to it this week.

anatoly techtonik

unread,
Mar 30, 2016, 10:01:58 AM3/30/16
to Geoff Lang, angleproject, Ariel Manzur
Great! Subscribed.
--
anatoly t.

anatoly techtonik

unread,
Apr 1, 2016, 9:20:08 PM4/1/16
to angleproject, geof...@google.com, pun...@gmail.com
I see that https://chromium-review.googlesource.com/#/c/336780/ got 1 LGTM.
Does it need another one to get it committed automatically? From
it looks like there are no automated commits.
Reply all
Reply to author
Forward
0 new messages