Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D_COMPILE_STANDARD_FILE_INCLUDE, incorrect constant type #1797

Open
riverar opened this issue Jan 6, 2024 · 0 comments
Open

D3D_COMPILE_STANDARD_FILE_INCLUDE, incorrect constant type #1797

riverar opened this issue Jan 6, 2024 · 0 comments

Comments

@riverar
Copy link
Collaborator

riverar commented Jan 6, 2024

Metadata currently has

public const uint D3D_COMPILE_STANDARD_FILE_INCLUDE = 1u;

Headers (d3dcompiler.h):

// D3D_COMPILE_STANDARD_FILE_INCLUDE can be passed for pInclude in any
// API and indicates that a simple default include handler should be
// used.  The include handler will include files relative to the
// current directory and files relative to the directory of the initial source
// file.  When used with APIs like D3DCompile pSourceName must be a
// file name and the initial relative directory will be derived from it.
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((ID3DInclude*)(UINT_PTR)1)

UINT_PTR is 32-bit/64-bit depending on target arch.

We could probably do better and associate it with (ID3DInclude*)1 and it should slot in nicely with existing D3DCompileFromFile(..., _In_opt_ ID3DInclude* pInclude, ...)

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

No branches or pull requests

1 participant