Skip to content

Commit

Permalink
layers: Split up ValidatePnextStructContents
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg authored and papillo-smartdogsw committed Mar 14, 2024
1 parent aa7568c commit 8506077
Show file tree
Hide file tree
Showing 4 changed files with 7,085 additions and 6,974 deletions.
9 changes: 9 additions & 0 deletions layers/stateless/sl_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,15 @@ bool StatelessValidation::ValidateStructPnext(const Location &loc, const void *n
}
// Send Location without pNext field so the pNext() connector can be used
skip |= ValidatePnextStructContents(loc, current, pnext_vuid, caller_physical_device, is_const_param);
if (loc.function == Func::vkGetPhysicalDeviceProperties2 ||
loc.function == Func::vkGetPhysicalDeviceProperties2KHR) {
skip |= ValidatePnextPropertyStructContents(loc, current, pnext_vuid, caller_physical_device,
is_const_param);
} else if (loc.function == Func::vkGetPhysicalDeviceFeatures2 ||
loc.function == Func::vkGetPhysicalDeviceFeatures2KHR || loc.function == Func::vkCreateDevice) {
skip |= ValidatePnextFeatureStructContents(loc, current, pnext_vuid, caller_physical_device,
is_const_param);
}
}
}
current = reinterpret_cast<const VkBaseOutStructure *>(current->pNext);
Expand Down
6 changes: 6 additions & 0 deletions layers/stateless/stateless_validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ class StatelessValidation : public ValidationObject {
bool CheckPromotedApiAgainstVulkanVersion(VkPhysicalDevice pdev, const Location &loc, const uint32_t promoted_version) const;
bool SupportedByPdev(const VkPhysicalDevice physical_device, vvl::Extension extension) const;

bool ValidatePnextFeatureStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid,
VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE,
bool is_const_param = true) const;
bool ValidatePnextPropertyStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid,
VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE,
bool is_const_param = true) const;
bool ValidatePnextStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid,
VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE, bool is_const_param = true) const;

Expand Down
Loading

0 comments on commit 8506077

Please sign in to comment.