Skip to content

No-op: DxilCounters.cpp copy issue already fixed by #8296#8411

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-dxilcounters-copy-issue
Closed

No-op: DxilCounters.cpp copy issue already fixed by #8296#8411
Copilot wants to merge 1 commit intomainfrom
copilot/fix-dxilcounters-copy-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

DxilCounters.cpp was not being copied when HLSL_COPY_GENERATED_SOURCES=1, causing it to drift from its generated form.

Investigation

Root cause: add_hlsl_hctgen in cmake/modules/HCT.cmake registered the per-file custom target as add_custom_target(${mode} ...). Because DxilCounters is used as the mode for both include/dxc/DXIL/DxilCounters.h and lib/DXIL/DxilCounters.cpp, the second registration collided with the first, and the .cpp target was never wired into HCTGen.

This was already fixed on main by commit 745a694e5 (PR #8296), which:

  • Derives a unique target name per output extension in HCT.cmake:
    string(SUBSTRING ${output_extension} 1 -1 output_extension_no_dot)
    set(target_name "${mode}_${output_extension_no_dot}")
  • Adds the missing add_hlsl_hctgen(DxilCounters OUTPUT DxilCounters.cpp CODE_TAG) entry in lib/DXIL/CMakeLists.txt.
  • Updates tools/clang/lib/Sema/CMakeLists.txt to depend on DxilIntrinsicTables_h (the new naming).
  • Regenerates lib/DXIL/DxilCounters.cpp with its current correct content.

Changes in this PR

None. Verified that:

  • All four pieces of 745a694e5 are present in the current branch.
  • Re-running hctgen.py DxilCounters + clang-format on both lib/DXIL/DxilCounters.cpp and include/dxc/DXIL/DxilCounters.h produces output that exactly matches the committed files — no drift.

The referenced issue can be closed as already resolved by #8296.

Copilot AI linked an issue Apr 28, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix DXILCounters.cpp copy issue when HLSL_COPY_GENERATED_SOURCES is set No-op: DxilCounters.cpp copy issue already fixed by #8296 Apr 28, 2026
Copilot AI requested a review from damyanp April 28, 2026 03:52
@damyanp damyanp closed this Apr 28, 2026
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants