Skip to content

Fix dxbcparser build failure: missing d3d12TokenizedProgramFormat.hpp include path#104

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-dxbcparser-header-issue
Draft

Fix dxbcparser build failure: missing d3d12TokenizedProgramFormat.hpp include path#104
Copilot wants to merge 4 commits intomainfrom
copilot/fix-dxbcparser-header-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

  • Pin CI runner to windows-2022 (has WDK pre-installed)
  • Fix dxbcparser missing d3d12TokenizedProgramFormat.hpp at build time by linking to Microsoft::DirectX-Headers
    • The previous fix used DEFINED directx-headers_SOURCE_DIR which is always false (variable is set in d3d12translationlayer's inner scope, not propagated to parent)
    • Correct fix: target_link_libraries(dxbcparser PRIVATE Microsoft::DirectX-Headers) — this target is already available after FetchContent_MakeAvailable(d3d12translationlayer) and correctly propagates the include path
Original prompt

This section details on the original issue you should resolve

<issue_title>Build failing due to d3d12TokenizedProgramFormat.hpp not found while building dxbcparser</issue_title>
<issue_description>https://github.com/microsoft/D3D9On12/actions/runs/13121201111/job/36607301553?pr=96

Cmake finds the header at configure time

Run cmake -B D:\a\D3D9On12\D3D9On12/build -DUSE_PIX=OFF -DCMAKE_SYSTEM_VERSION="10.0.22621.0"
-- Building for: Visual Studio 1[7](https://github.com/microsoft/D3D9On12/actions/runs/13121201111/job/36607301553?pr=96#step:4:8) 2022
-- The C compiler identification is MSVC 19.42.34436.0
-- The CXX compiler identification is MSVC 1[9](https://github.com/microsoft/D3D9On12/actions/runs/13121201111/job/36607301553?pr=96#step:4:10).42.34436.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_DXCORE_LIBRARY
-- Performing Test HAVE_DXCORE_LIBRARY - Success
-- Looking for C++ include d3d[12](https://github.com/microsoft/D3D9On12/actions/runs/13121201111/job/36607301553?pr=96#step:4:13)TokenizedProgramFormat.hpp
-- Looking for C++ include d3d12TokenizedProgramFormat.hpp - found
Adding WDK-dependent project.
-- Adding DxbcSigner NuGet package...
-- Configuring done (44.9s)
-- Generating done (0.1s)
-- Build files have been written to: D:/a/D3D9On12/D3D9On12/build

But then the file isn't found at build time:

1>Checking Build System
  Building Custom Rule D:/a/D3D9On12/D3D9On12/build/_deps/directx-headers-src/CMakeLists.txt
  d3dx[12](https://github.com/microsoft/D3D9On12/actions/runs/13121201111/job/36607301553?pr=96#step:6:13)_property_format_table.cpp
  DirectX-Headers.vcxproj -> D:\a\D3D9On12\D3D9On12\build\_deps\directx-headers-build\RelWithDebInfo\DirectX-Headers.lib
  Building Custom Rule D:/a/D3D9On12/D3D9On12/build/_deps/directx-headers-src/CMakeLists.txt
  dxguids.cpp
  DirectX-Guids.vcxproj -> D:\a\D3D9On12\D3D9On12\build\_deps\directx-headers-build\RelWithDebInfo\DirectX-Guids.lib
  Building Custom Rule D:/a/D3D9On12/D3D9On12/build/_deps/d3d12translationlayer-src/DxbcParser/CMakeLists.txt
  BlobContainer.cpp
  DXBCUtils.cpp
  Generating Code...
D:\a\D3D9On12\D3D9On12\build\_deps\d3d12translationlayer-src\DxbcParser\include\dxbcutils.h(5,10): error C1083: Cannot open include file: 'd3d12TokenizedProgramFormat.hpp': No such file or directory [D:\a\D3D9On12\D3D9On12\build\_deps\d3d12translationlayer-build\DxbcParser\dxbcparser.vcxproj]
  (compiling source file '../../d3d12translationlayer-src/DxbcParser/src/BlobContainer.cpp')
  
D:\a\D3D9On12\D3D9On12\build\_deps\d3d12translationlayer-src\DxbcParser\include\dxbcutils.h(5,10): error C1083: Cannot open include file: 'd3d12TokenizedProgramFormat.hpp': No such file or directory [D:\a\D3D9On12\D3D9On12\build\_deps\d3d12translationlayer-build\DxbcParser\dxbcparser.vcxproj]
  (compiling source file '../../d3d12translationlayer-src/DxbcParser/src/DXBCUtils.cpp')
```</issue_description>

<agent_instructions>Something seems misconfigured with the PR build. Please figure out what is wrong and propose a fix</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…rser target

Co-authored-by: vdwtanner <5782489+vdwtanner@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build failure due to missing d3d12TokenizedProgramFormat.hpp Fix dxbcparser build failure: missing d3d12TokenizedProgramFormat.hpp include path Mar 9, 2026
Co-authored-by: vdwtanner <5782489+vdwtanner@users.noreply.github.com>
…ad of using SOURCE_DIR variable

Co-authored-by: vdwtanner <5782489+vdwtanner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failing due to d3d12TokenizedProgramFormat.hpp not found while building dxbcparser

2 participants