Skip to content

Link fails when using -Fd with -Qstrip_debug #5737

Open

Description

@EricLasotaRSE

Description
Linking a compute shader with the command-line DXC will error out if using -Fd and -Qstrip_debug together. This is not consistent with the compiler, which will output a PDB even if debug info is stripped from the object file.

Steps to Reproduce
Create a file named test.hlsl:

RWTexture2D<uint> rwTexResource[] : register(u0, space2400);
[numthreads(8, 8, 1)]
void main(uint3 dtid : SV_DispatchThreadID, uint3 gtid : SV_GroupThreadID, uint3 gid : SV_GroupID, uint gindex : SV_GroupIndex)
{
    rwTexResource[0][dtid.xy] = texResource.Load(dtid.xyz);
}

Run these commands:

dxc.exe -T lib_6_3 -Zi -Qstrip_reflect -Qembed_debug -Fd testc.pdb -Fo test.lib test.hlsl
dxc.exe -link -T lib_6_3 -Zi -Qstrip_reflect -Qstrip_debug -Fd test.pdb -Fo test.bin test.lib

Actual Behavior
DXC fails with error:
dxc failed : DXIL container does not contain the given part.

Environment

  • DXC version dxcompiler.dll: 1.7 - 1.7.2207.3 (e9137cd); dxil.dll: 1.7(101.7.2207.10)
  • Host Operating System Windows 10

Activity

  1. added
    bug
    needs-triage
    on Sep 15, 2023
  2. added
    shader-linking
    and removed
    needs-triage
    on Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugshader-linking

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions