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

Improve Layer Chassis Dispatch script #7740

Merged

Conversation

spencer-lunarg
Copy link
Contributor

closes #4136

I have gone over all the various edge cases in the layer_chassis_dispatch_generator.py and feel confident it is in a good state now

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner March 22, 2024 07:23
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 154931.

@@ -340,60 +340,6 @@ void DispatchDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const V
layer_data->renderpasses_states.erase(renderPass);
}

VkResult DispatchCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are handled correctly now in the code gen, they were on the top of the "no autogen" list so probably added well before the script was improved over the years

@@ -902,7 +848,7 @@ VkResult DispatchGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physical
if (!wrap_handles) return result;
if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) {
for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) {
pProperties[idx0].display = layer_data->MaybeWrapDisplay(pProperties[idx0].display, layer_data);
pProperties[idx0].display = layer_data->MaybeWrapDisplay(pProperties[idx0].display);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaned up MaybeWrapDisplay logic, it is called from layer_data so didn't need it passed in as well

@@ -1006,18 +951,6 @@ VkResult DispatchGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, V
return result;
}

VkResult DispatchEnumerateDeviceExtensionProperties(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generated the same, removed from no-autogen list

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16203 running.

@@ -1110,84 +1043,6 @@ VkResult DispatchGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice
return result;
}

bool NotDispatchableHandle(VkObjectType object_type) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only thing that SetPrivate/GetPrivate calls had different, this is not all auto-generated (since we have information about which handles are dispatchable now

@@ -1722,41 +1577,3 @@ VkResult DispatchReleasePerformanceConfigurationINTEL(

return result;
}

#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
VkResult DispatchGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these 3 VkDisplayKHR are now generated

@@ -33,15 +33,16 @@ def __init__(self):
'vkDestroyInstance',
'vkCreateDevice',
'vkDestroyDevice',
'vkCreateSwapchainKHR',
'vkCreateSharedSwapchainsKHR',
# Need to handle Acquired swapchain image handles
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally added a comment "why" we are not auto generating things

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16203 passed.

return (HandleType)unique_id;
}

// Specialized handling for VkDisplayKHR. Adds an entry to enable reverse-lookup.
VkDisplayKHR WrapDisplay(VkDisplayKHR newlyCreatedHandle, ValidationObject* map_data) {
// VkDisplayKHR objects are statically created in the driver at VkCreateInstance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great comment, makes clear how the things work.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 155016.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16207 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16207 passed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 155037.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16208 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 16208 passed.

@spencer-lunarg spencer-lunarg merged commit a7aa809 into KhronosGroup:main Mar 22, 2024
18 checks passed
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 this pull request may close these issues.

layer_chassis_dispatch.cpp attempts to unwrap output handles
3 participants