Fix: include NRIRayTracing.h in NRIWrapperVK.h - #260
Open
MaxFreedomPollard wants to merge 1 commit into
Open
MaxFreedomPollard wants to merge 1 commit into
MaxFreedomPollard wants to merge 1 commit into
Conversation
AccelerationStructureVKDesc uses AccelerationStructureBits, which is declared in NRIRayTracing.h, so the header only compiled when NRIRayTracing.h happened to be included first. Include it like NRIWrapperD3D12.h does, and drop the forward declaration that stood in for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NRIWrapperVK.hdoes not compile unlessNRIRayTracing.hwas included before it:AccelerationStructureVKDesc::flagsis anAccelerationStructureBits, which is declared inNRIRayTracing.h.NRIWrapperD3D12.halready includes that header, so this does the same for the VK wrapper. TheNriForwardStruct(AccelerationStructure)that stood in for the include is no longer needed. It was also a second typedef of the same name in C whenever both headers were included, which-std=c99 -pedanticwarns about.Checked with clang: the snippet above now compiles as C++17 and as C11 with
-Wall -Wextra -Werror, in either include order, and every header inInclude/Extensionscompiles on its own afterNRI.h.