-
Notifications
You must be signed in to change notification settings - Fork 56
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
[Bug] Hlsl.bytes no longer produced. #91
Comments
@thargy Sorry about that. It might be caused by the specific version of Windows you are on, or a dependency being missing. Even if SharpDx.D3DCompiler.dll is present, the native library that it calls into might be missing or in the wrong (or unexpected) location. Unfortunately, I don't have a ton of time to spend on a fix for this. Perhaps the simplest solution would be to keep around the old codepath (that #89 replaced) as a fallback? |
Hi @mellinoe, cc'ing @Jiuyong as the original dev, in case he has time to fix for you. Sorry, I don't have time to branch, fix, and test but a code review allowed me to spot the bug, and I've confirmed by noting that although The issue is that the original implementation (using FXC) updates the output parameter However, I would also say that this condition should probably add the condition |
@Jiuyong - here's my proposed changes for lines 381-388: // Ensure compilation result does not have errors
if (null == compilationResult.Bytecode && !compilationResult.HasErrors && compilationResult.ResultCode != 0)
{
Console.WriteLine($"Failed to compile HLSL: {compilationResult.Message}.");
}
else
{
// Ensure stream is correctly disposed.
using (FileStream fileStream = File.OpenWrite(outputPath))
{
compilationResult.Bytecode.Save(fileStream);
}
// Ensure path is updated to compiled output
path = outputPath;
} |
Upgrading ShaderGen to 1.2.0.beta-3 stops creation of "hlsl.bytes" which I suspect is due to #89, though no warnings or errors are produced. I can confirm from the Build logs that
SharpDx.D3DCompiler.dll
is being found.The text was updated successfully, but these errors were encountered: