safe: Fix VK_EXT_sample_locations

This commit is contained in:
sjfricke 2024-09-09 14:47:19 -07:00 committed by Spencer Fricke
parent fbb4db92c6
commit ea5774a13e
3 changed files with 153 additions and 52 deletions

View file

@ -107,6 +107,9 @@ class SafeStructOutputGenerator(BaseGenerator):
for member in struct.members:
if member.pointer:
return True
# The VK_EXT_sample_locations design created edge case, easiest to handle here
if struct.name == 'VkAttachmentSampleLocationsEXT' or struct.name == 'VkSubpassSampleLocationsEXT':
return True
return False
def containsObjectHandle(self, member: Member) -> bool:
@ -170,7 +173,7 @@ class SafeStructOutputGenerator(BaseGenerator):
#include <vulkan/utility/vk_safe_struct_utils.hpp>
namespace vku {
// Mapping of unknown stype codes to structure lengths. This should be set up by the application
// before vkCreateInstance() and not modified afterwards.
std::vector<std::pair<uint32_t, uint32_t>>& GetCustomStypeInfo();