-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New include path behaviour #6669
Comments
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jul 16, 2024
The behavior was changed with microsoft#6317 so that regardless of spelling in the shader, the include path will conform to the host OS style for the purposes of the include handler. This just adds a release note for that new behavior. Fixes microsoft#6669
pow2clk
added a commit
to pow2clk/DirectXShaderCompiler
that referenced
this issue
Jul 16, 2024
The behavior was changed with microsoft#6317 so that regardless of spelling in the shader, the include path will conform to the host OS style for the purposes of the include handler. This just adds a release note for that new behavior. Fixes microsoft#6669 (cherry picked from commit 9fa4618)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Due to #6317 include paths are now passed to
IDxcIncludeHandler::LoadSource
normalized to the operating system's path style. i.e. On Windows "/" is replaced with "\".The issue with this is that it likely breaks some implementations of
IDxcIncludeHandler
because users have been expecting the argument ofIDxcIncludeHandler::LoadSource
to be exactly what was in the include directive in the shader source. There are not many programmers who would prefer to write "\" over "/" in their header includes, so for some, upgrading to 1.8.2405.17 will have broken their include handler.Steps to Reproduce
Write a shader that has an include such as
#include "Mylibrary/MyHeader.hlsli"
and compile it with DXC using a customIDxcIncludeHandler
.Actual Behavior
Notice that the string passed to
IDxcIncludeHandler::LoadSource
is".\\MyLibrary\\Myheader.hlsli"
which is different from the string used in the#include
directiveEnvironment
The text was updated successfully, but these errors were encountered: