DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
Prevent duplication of argument defines
When defines are specified through the command line of dxc using -D flags, they are added to a vector of defines passed into WrapCompile as part of the adaptor of the Compiler3 interface to the old interface. WrapCompile then packages them up into an argument list for the Compiler3 interface, but since the argument list already contains the defines, adding them from the define vector duplicates them.
This problem was solved for -E entry points and -T target profiles by adding optional skipping of these arguments when they are found to be present by another means. This mechanism is here extended to account for defines as well.
Fixes #2673
:white_check_mark: Build DirectXShaderCompiler 1.0.2675 completed (commit https://github.com/Microsoft/DirectXShaderCompiler/commit/3e396dacc6 by @pow2clk)