Skip to content

No way to remove struct names from shaders #7627

@GlassBeaver

Description

@GlassBeaver

Description
Struct names are left in shaders even when using -Qstrip_debug -Qstrip_priv -Qstrip_reflect
IDxcContainerBuilder::RemovePart also fails to remove them.

Steps to Reproduce
Compile any shader that's using a structured buffer with a named struct e.g. struct CSomething { ... } using the following command line arguments:

"-T"
"ps_6_6"
"-Zpr"
"-Qstrip_debug"
"-Qstrip_priv"
"-Qstrip_reflect"
"-E"
"BlackholePS"
"-Ges"
"-Wshadow"
"-WX"
"-Fo"
"out.cso"
"test.hlsl"

Make sure to run IDxcContainerBuilder::RemovePart with all the removable fourcc codes ("ILDB", "ILDN", "PRIV", etc.)

Actual Behavior
PIX is still able to detect struct names in the stripped DXIL, e.g.:
%ResourceIndexRootConstants = type { %struct.CResourceIndexRootConstants }

Environment

  • DXC version 1.8.2505.28
  • Host Operating System Windows 11 x64 24H2 26100.4349

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crash

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions