Advertisement

IDxcUtils::CreateDefaultIncludeHandler

Started by May 18, 2020 06:48 PM
1 comment, last by matt77hias 4 years, 8 months ago

Does someone know whether it is possible to pass an “include directory” compiler argument (e.g., “-I directory”) to the DirectX Shader Compiler when the default include handler is used (i.e. IDxcUtils::CreateDefaultIncludeHandler)?

I have no problem passing such a compiler argument directly to dxc.exe, but when using the IDxcCompiler3 in code, I always fail on the first include. I already tried passing absolute and relative paths (with/without a terminating back slash, with/without quotes for the path) etc.

const wchar_t* arguments[] =
 {
  L"-I D:/Users/.../Engine",
  DXC_ARG_OPTIMIZATION_LEVEL3
 };

🧙

Apparently the path should be passed as a separate argument

const wchar_t* arguments[] =
 {
  L"-I", s_include_path.c_str(),
  DXC_ARG_OPTIMIZATION_LEVEL3
 };

¯\_(ツ)_/¯

🧙

This topic is closed to new replies.

Advertisement