microsoft / microsoft/DirectXShaderCompiler

Generating depfile fails with "Internal Compiler error"

Open
#8,115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug spirv
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

Description
Generating a depfile with the -MF flag fails with "Internal Compiler error".

Steps to Reproduce
Sample shader:

[shader("pixel")]
float4 PSMain() : SV_Target0
{
    return float4(0, 0, 0, 0);
}

Try to compile with the following command:
dxc.exe -T lib_6_6 -spirv -fspv-target-env=vulkan1.3 -Zi -Fo shader.spv -MF shader.spv.d shader.hlsl

Actual Behavior
dxc prints "Internal Compiler error:" and returns -2147024809.
Removing the -MF flag (and the following path) works fine.

Environment

  • DXC version: dxcompiler.dll: 1.9 - 1.8.2505.32 (b106a961d); dxil.dll: 1.9(1.8.2505.32)
  • Host Operating System: Windows 11 x64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dxc.exe command from the reproduction, comparing compilation with and without the -MF flag. Trace depfile generation for the shown HLSL shader and Vulkan 1.3 target. Done means the command completes without the internal compiler error and produces the requested shader and depfile outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.