Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSL

Aperta Adatta ai principianti
#9,087 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
compilers

Direzione di ricerca

Inizia leggendo CGDebugInfo::CreateCompileUnit(), dove, secondo l’issue, viene selezionato il linguaggio dell’unità di compilazione. Compila un qualsiasi shader HLSL valido con il comando mostrato nell’issue ed esamina la DICompileUnit nell’elenco testuale DXIL. Il lavoro è completato quando l’elenco identifica il linguaggio sorgente come DW_LANG_HLSL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug needs-triage

Description

In the tested DXC build, this appears to affect virtually any HLSL shader compiled with debug information: the emitted DICompileUnit identifies the source language as DW_LANG_C_plus_plus. The issue is independent of specific shader constructs; the compile-unit language selection in CGDebugInfo::CreateCompileUnit() uses the C++ language option without separately handling HLSL. The compile unit should identify the source language as DW_LANG_HLSL, so debug consumers can correctly identify HLSL shaders and downstream DWARF generators can preserve the correct DW_AT_language.

Steps to Reproduce

  1. Compile any valid HLSL shader with -Zi -Qembed_debug and emit a textual DXIL listing with -Fc. Use the shader's usual entry point, target profile, include paths, and defines. For example, for a compute shader with entry point main:

    dxc -T cs_6_0 -E main -Zi -Qembed_debug -Od -Fo shader.dxil -Fc shader.ll shader.hlsl
    
  2. Inspect the compile-unit metadata in the generated listing:

    findstr /C:"!DICompileUnit(" shader.ll
    

No particular shader source is required. The issue is visible directly in DXC's output; no GPU execution is needed.

Actual Behavior

The observed compilation succeeds with exit code 0 and no diagnostics. For example, the tested build emits:

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, ......)

Expected: language: DW_LANG_HLSL for this HLSL compilation unit.

Environment

  • Just an offline DXC compiler
Lingua principale
C++
Stelle
3.7k
Fork
912
Merge medio
2g 5h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/DirectXShaderCompiler

Tutte le issue di microsoft/DirectXShaderCompiler

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.