Skip to content

[IMPL] Support IDxbcConverter from dxilconv.dll#417

Open
ds5678 wants to merge 3 commits intoterrafx:mainfrom
ds5678:idxbcconverter-support
Open

[IMPL] Support IDxbcConverter from dxilconv.dll#417
ds5678 wants to merge 3 commits intoterrafx:mainfrom
ds5678:idxbcconverter-support

Conversation

@ds5678
Copy link
Copy Markdown

@ds5678 ds5678 commented Nov 29, 2025

This implements support for IDxbcConverter from dxilconv.dll in C:\Windows\System32 using the header from DirectXShaderCompiler.

  • I created a new class DxilConv so that DxcCreateInstance and DxcCreateInstance2 wouldn't conflict with the ones in DirectX for dxcompiler.dll. Should I have renamed them to DxilConvCreateInstance / DxilConvCreateInstance2 and put them in the DirectX class?
  • Generated with ClangSharpPInvokeGenerator 20.1.8.2

Resolves #416

@@ -0,0 +1,62 @@
///////////////////////////////////////////////////////////////////////////////
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is notably in the "wrong" location, it should be somewhere under generation/include. It also, at minimum, requires updating the THIRD-PARTY-NOTICES.txt in the solution root and would be beneficial to know where it comes from.

That being said... typically the bindings in TerraFX.Interop.Windows are exclusive to what ships with Windows, the Windows SDK, or the DirectX Agility SDK. This header looks to be part of none of those and so is likely a "pit of failure" for users as it won't be usable "out of the box". The fact that it also creates a separate class to avoid conflicting with in-box APIs is problematic as well, because it creates a deviation from what users expect and where they're looking for APIs to be exposed.

This seems like something that should probably be its own repo/project, because its explicitly disconnected from what the DirectX SDK ships

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is notably in the "wrong" location, it should be somewhere under generation/include. It also, at minimum, requires updating the THIRD-PARTY-NOTICES.txt in the solution root and would be beneficial to know where it comes from.

My apologies for these things. I can fix them.

That being said... typically the bindings in TerraFX.Interop.Windows are exclusive to what ships with Windows, the Windows SDK, or the DirectX Agility SDK. This header looks to be part of none of those and so is likely a "pit of failure" for users as it won't be usable "out of the box".

It should be usable "out of the box" since dxilconv.dll is in C:\Windows\System32.

The fact that it also creates a separate class to avoid conflicting with in-box APIs is problematic as well, because it creates a deviation from what users expect and where they're looking for APIs to be exposed.

The DxilConv class indeed has a discovery issue. That's why I asked about renaming.

This seems like something that should probably be its own repo/project, because its explicitly disconnected from what the DirectX SDK ships

So should I close my issue and pull request, or make changes to this pull request?

@ds5678 ds5678 force-pushed the idxbcconverter-support branch from 2f9287c to f8efeb6 Compare February 23, 2026 21:22
@ds5678 ds5678 requested a review from tannergooding February 23, 2026 22:21
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.

[PROPOSAL]: IDxbcConverter Support

2 participants