DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Prevent duplication of argument defines

Open pow2clk opened this issue 5 years ago • 1 comments

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

pow2clk avatar Jan 31 '20 11:01 pow2clk

:white_check_mark: Build DirectXShaderCompiler 1.0.2675 completed (commit https://github.com/Microsoft/DirectXShaderCompiler/commit/3e396dacc6 by @pow2clk)

AppVeyorBot avatar Jan 31 '20 12:01 AppVeyorBot