-
Notifications
You must be signed in to change notification settings - Fork 475
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
Valid usage of pointer chains #929
Comments
No:
You have it other way around. What is not forbidden is allowed. E.g. if a struct is both topmost and extension e.g.
Yes and no. Per the above quote by default A must accept C, except if there was an explicit VU forbiding it. |
@MaikKlein have you referred to the "Valid Usage for Structure Pointer Chains" section of the Vulkan spec? Vulkan-Hpp is just a wrapper, and it doesn't determine what the Vulkan implementation accepts. It sounds like your issue might be with Vulkan-Hpp, not Vulkan itself. |
@oddhack I have read through the spec several times and I was unsure about the valid usage. I am one of the authors of ash another vulkan wrapper, and I want to implement pointer chains. I just had a look at VulkanHpp to see how they validate the pointer chains.
Is there already a case for this in the spec? If not how would something like this behave?
If |
I don't think so. The two debug creation structs are the only ones that come to mind, if they ever got extended.
That would became obvious from the hypothetical explicit VU wording forbidding it. |
If you have concrete suggestions on phrasing the fundamentals chapter / VU statements differently we will consider them. At present the VU statements for base structures enumerate all the possible valid extension structures in the pNext chain of the base structure, specify that they must be unique in the chain, and impose no further constraints on the chain. The fundamentals section states pretty much the same thing, in a generic fashion. |
Also, if B forbids C, the most likely way for that to be specified is a constraint that extension-that-defines C cannot be enabled if extension-that-defines B is enabled. In that case it would be invalid to pass B and C, because one or the other extension would always have to be disabled at runtime. If there are concrete examples of subsets of one extension's functionality being incompatible with another extension, they would be helpful to bring up (there might be, I doubt any of us has memorized all the interactions of a couple of hundred extensions - and if so, such an example will drive discussion better than hypotheticals). |
I think it is already worded pretty well. If anything I would add that the ordering is not important. I am a special kind of user as I generate everything from the
That is what I also assumed. And thank you for the quick responses, I think we can close this issue. |
Closing per OP. |
The spec is not completely clear on what is considered valid.
Is the order of
pNext
important? The spec says what is a validpNext
for a given struct but at one point this has to be broken.For example:
A pointer chain could look like
A -> B -> C
but the spec forB
didn't mention that it can point toC
.Looking at
VulkanHpp
, it appears that the order is somewhat relevant in that ifB extends A
then A has to come beforeB
.Will there ever be a case where
C extends B extends A
butC
doesn't extendA
?For example if I were to remove the following line from
vulkan.hpp
This would compile just fine
but this doesn't compile
The text was updated successfully, but these errors were encountered: