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

vk_sdk_platform.h should be removed #316

Closed
jeremyg-lunarg opened this issue Nov 4, 2022 · 8 comments · Fixed by #350
Closed

vk_sdk_platform.h should be removed #316

jeremyg-lunarg opened this issue Nov 4, 2022 · 8 comments · Fixed by #350
Assignees

Comments

@jeremyg-lunarg
Copy link

This file contains some very minor platform / compiler macro definitions that IMO don't belong in Vulkan-Headers at all. None of the macros in this file are used by any of the other headers in Vulkan-Headers. Applications that need them would be better served by defining what they need in their own cross platform code.

However, this header is included by several repositories on github, including some not part of KhronosGroup. There is likely other code not on github using this header. Any effort to remove the header file would probably need to be staged carefully, and include a phase where the header is marked deprecated somehow so that people have time to fix stuff before it is removed completely.

@jeremyg-lunarg
Copy link
Author

cc: @oddhack - your question in KhronosGroup/Vulkan-Docs#1975 lead to me having even more questions about this header.

@jeremyg-lunarg
Copy link
Author

@oddhack when you are updating Vulkan-Docs readmes, can you please recommend people to NOT use this header?

@oddhack
Copy link
Collaborator

oddhack commented Nov 4, 2022

Do you mean the Vulkan-Docs spec repository README, or the one here? Either way, please propose a PR/MR. Maybe having the header self-document that it's deprecated would be more likely to be seen, though?

@oddhack
Copy link
Collaborator

oddhack commented Nov 4, 2022

Re "marking deprecated" it comes up many times that we'd like to communicate something like this to "the developer community" but have no great channel for doing so. TDC seems diffused across many websites and channels.

@jeremyg-lunarg
Copy link
Author

Do you mean the Vulkan-Docs spec repository README, or the one here? Either way, please propose a PR/MR. Maybe having the header self-document that it's deprecated would be more likely to be seen, though?

I was referring to your comment here KhronosGroup/Vulkan-Docs#1975 (comment) and I thought you were already working a PR to update docs. But yes, having the header issue a warning or something is better and once we have an owner identified that should be part of the process for fixing this.

Also both VVL and Vulkan-Loader were including this header for no reason.

@oddhack
Copy link
Collaborator

oddhack commented Nov 4, 2022

I already committed a change to the Vulkan-Headers README which removed a comment telling people to report issues on these files to Vulkan-Loader. If we establish an owner for these headers, we should note that in the issue template for Vulkan-Headers, at least.

@oddhack
Copy link
Collaborator

oddhack commented Nov 4, 2022

Popping a #warning in seems plausible - it is a C99 construct and Vulkan is a C99 API by definition so that should just work everywhere, right? <crosses fingers>

@juan-lunarg
Copy link
Contributor

#warning isn't a C99 construct from what I can gather:

"A common non-standard extension is the directive #warning which emits a user-defined message during compilation. (until C23)" - https://en.cppreference.com/w/c/preprocessor

Based on both the C / C++ docs it does seem to be a common extension. However, it wasn't standardized until C23 / C++23 respectively.

"Before its standardization in C++23, #warning has been provided by many compilers in all modes as a conforming extension." - https://en.cppreference.com/w/cpp/preprocessor/error

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 a pull request may close this issue.

3 participants