-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add VK_KHR_maintenance5 support #3251
base: v1.x
Are you sure you want to change the base?
Conversation
a49e3d1
to
e63c3b7
Compare
There is some things I do not know where to implement:
Also the point
is implemented as somewhat of a hack (though it makes this feature zero-maintainable). I could change it to make version annotations in the |
Can you clarify how you want to handle this PR? Do you want this partial support as-is reviewed and merged while you investigate the remaining issues, and then you'll PR those and enable the extension? Or are you wanting to continue working on this and complete it before you get a review? |
685bde6
to
da299d4
Compare
I have finished all parts of this extension, so this PR is ready for review. |
It looks like setting PointSize to 1.0f where I tried doesn't work... IDK how to do it |
I would like it merged even if partially. |
Default 1.0f for PointSize now works (everything is implemented). |
96aa7e4
to
47b5ade
Compare
Just checking - is this PR ready for review? I've noticed you pushed and commented several times since you said it was complete. If you'd rather wait if you're still working on it, please mark it as draft or close and re-open it. |
Yes, those were some code style changes. Sorry for the confusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some notes on some things, but this PR also seems to be missing some parts - at least one is crucial.
There's no handling of the new structures defined in the extension, the standard features struct but also the new extended usage and pipeline create flags structs which must be used in preference to the normal enums if present. These structs aren't serialised or handled in next chains. I would also expect to see new handling for the new format enums.
Most importantly though the extension isn't whitelisted, so no application will be able to use it. Maybe that's deliberate if this is intended to be unfinished/unused, but you said the PR and extension support was complete so I'm assuming it's an omission.
On the last point, how did you test this code and the extension? Did you allow use of it locally and then remove that for this PR? I'm a little unclear on what the status of this is still.
renderdoc/driver/vulkan/vk_layer.cpp
Outdated
// if GPA returns NULL, that means that the standard prohibits non-NULL values for this pName | ||
// or that the return value is undefined | ||
if(!gpa || !gpa(Unwrap(device), pName)) | ||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems wrong to me as we should not rely on upstream layers/loader to define our correctness. Aside from that the loader interface document says that layers must not call down the chain inside vkGetDeviceProcAddr
.
What is the problem you're trying to solve here? The behaviour difference defined in KHR_maintenance5
should already be correctly handled by RenderDoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it so functions explicitly say in which version of vulkan they were integrated into core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version gating is already handled per extension by the condition, so I still don't see the purpose of this code change.
I asked above what the problem is that you're trying to solve, and you've not answered that question. Changing the code without answering the question or explaining yourself doesn't address this feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. It is just if for example VK_KHR_dynamic_rendering
is enabled with requested instance version of 1.2. RenderDoc will resolve vkCmdBeginRendering
but it was not core in version 1.3 so it should be NULL. (https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceProcAddr.html 2nd annotation of Table 1.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK I see what you mean. That's not really the problem case that the spec was clarifying, but you're right in that technically speaking this is wrong according to the letter of the spec although it shouldn't cause any problems in practice.
You don't need to manually annotate every function like this, it can be handled with the existing CheckExt
macros which already annotate promotions. It just needs to be changed to not merge the check down to a single condition.
Oh... as I am not using this part of the extension I hadn't noticed the lack of support. I will look into it.
Strange. When I build it locally and run my program that enables this extension it works just fine (it enumerates the extension and enabling it works). I do test it with my program, but It doesn't use all of the features. I should probably make a test program that uses everything from this extension. Anyways I have changed the parts You have commented upon but am yet to add support for new usage/flags, so when that will be done I will message You. |
I don't see any way that that is possible, unless you have local changes to RenderDoc that are not present in the PR here. Not only will RenderDoc only enumerate supported device extensions, but at The only possibilities I can see is that your application does not hard-require KHR_maintenance5 and when run under RenderDoc it is running the same as it would on any driver that didn't support the extension, or else it is not written legally and is relying on/using functionality from the extension without either enabling it or passing the feature struct. |
my bad. I forgot to uncomment the extension string, but it was still passing the features struct to create device. Now I have added it to whitelisted extensions. |
70aaf3f
to
21710b9
Compare
I have since tested this PR and found one problem with it (I am not sure how should I fix those): https://github.com/qbojj/vk_khr_maintenance5_test/tree/master Also https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceProcAddr.html states that it should resolve (for a valid device handle) only for: "requested core version device-level dispatchable commands" and On the other hand it looks like vertex buffer robustness is not working (even when not using it on the index buffer so unrelated to this PR): |
As a heads up for you, once the review process has completed I'm going to keep this PR on hold until I can find the time to test this and make sure everything is working solidly. |
071e612
to
9833b87
Compare
If you want to keep prototyping or iterating on this code that's fine but can you please either close this PR or do all of the work locally, make sure you are satisfied with it, and only push when it is finalised and ready for review? Having an ever moving target is not easy to know that it's ready for review and getting email notification spam is not very pleasant either. |
It is just that I have found a bug in my code, so I fixed it. Other than that I am satisfied with the state of this PR |
a11b81f
to
897eda8
Compare
Rebased to resolve conflicts |
eb7c362
to
11ca89f
Compare
Description
This PR adds
VK_KHR_maintenance5
support. (resolve #3244)Spec: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_maintenance5.html
Proposal: https://github.com/KhronosGroup/Vulkan-Docs/blob/main/proposals/VK_KHR_maintenance5.adoc
Here are features that are added in
VK_KHR_maintenance5
and this PR should support (features that I am unsure of are not set):