Closed hujiajie closed 3 years ago
Dawn provides GN args like dawn_enable_d3d12 to control if a certain backend will be compiled, and AGNLE has similar flexibility. Note these variables are meant to be customized by users since they are in the declare_args()
block, so it sounds like an Aquarium bug if the following won't work:
gn gen out --args="dawn_enable_d3d12=false"
ninja -C out
I'm not worried about the readability / maintenance burden at the moment, but @gyagp has a different opinion. Thoughts? @Jiawei-Shao @shaoboyan
The benefit of this can be binary size, which is not a big concern of Aquarium. But the price is readability, maintenance and testability. I don't think we ever tested all these combinations, and I don't think we will have bandwidth to do this in near future. ANGLE and Dawn have many other GN args we don't need to bring into Aquarium.
This PR LGTM, so let me merge it to unblock your work at hand. We can continue to discuss GN args.
This is a preparation for deprecating the usage of dawn_bindings, and a following patch will implement the complexity of window system binding. Depending on the backend, ContextDawn will be sub-classed in a .cpp or .mm file, and instantiated with the factory pattern.