-
Notifications
You must be signed in to change notification settings - Fork 404
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
layer_chassis_dispatch.cpp attempts to unwrap output handles #4136
Comments
Thanks @pdaniell-nv, it seems like some additional annotation in the xml would be beneficial, but I'm not sure how realistic it would be to get something like an FYI @mikes-lunarg as he probably understands the code generation best. |
Yeah, treating |
Determine whether or not a command is expected to return a result in a pointer based on parameter type rather than a hard-coded list of command names. Closes KhronosGroup#4136.
@mikes-lunarg yes, that makes sense. I tried this out in #4138 and it seems to have the desired effect, but not sure if it's 100% correct (that code is still more mysterious to me than it should be). |
Hi, I'm the one who opened the original issue in CTS. To resolve this issue, I think we'll need we need to add this around here:
In addition to removing Unwrap() mentioned previously, we also need to add this on the line:
I notice that all other uses of Something like this was mentioned in #4138, and from my prototyping this outcome would satisfy the tests. |
So looking at this, the biggest issue is still trying to understand Uses the Display
Controls Display, but doesn't create/destroy it
Creates Display? (not sure)
@math4origami / @pdaniell-nv can someone help explain for |
VkDisplayKHR are static handles, they are created when the driver loads and persist throughout the lifetime of the VkPhysicalDevice.
The properties struct is:
The What functions like Then, the function returns the handle in the output From the user's perspective, they do not actually interact with the lifetime of these objects at all. They just ask for the handle of an existing one, then use it. |
@russellcnv thanks for this! So what I am concluding is In this case I think the answer is that there should be no Handle Wrapping on the Edit: I might be wrong, the handle wrapping is not the issue, it is just making sure it is "created" when we first see it in a call like |
As discussed in https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3685#note_360445, it appears some of the generated functions in layer_chassis_dispatch.cpp are treating parameters that are meant to output a handle as inputs, and attempts to Unwrap them, when it should be doing WrapNew().
It appears the bug is in
Vulkan-ValidationLayers/scripts/layer_chassis_dispatch_generator.py
Line 2077 in c935ec7
edit: CTS
The text was updated successfully, but these errors were encountered: