Some adjustments to vertex attributes

This commit is contained in:
CamilleLaVey
2026-09-17 06:55:48 -04:00
parent d633c43aae
commit 8cdf552c28
6 changed files with 52 additions and 10 deletions
@@ -1130,11 +1130,19 @@ bool Device::GetSuitability(bool requires_swapchain) {
SetNext(next, properties.custom_border_color);
}
if (extensions.vertex_attribute_divisor) {
properties.vertex_attribute_divisor.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT;
SetNext(next, properties.vertex_attribute_divisor);
}
// Perform the property fetch.
physical.GetProperties2(properties2);
// Store base properties
properties.properties = properties2.properties;
max_vertex_attrib_divisor =
(std::max)(1U, properties.vertex_attribute_divisor.maxVertexAttribDivisor);
// Unload extensions if feature support is insufficient.
RemoveUnsuitableExtensions();
@@ -984,6 +984,10 @@ FN_MAX_LIMIT_LIST
return properties.properties.limits.maxVertexInputBindings;
}
u32 GetMaxVertexAttribDivisor() const {
return max_vertex_attrib_divisor;
}
u32 GetMaxViewports() const {
return properties.properties.limits.maxViewports;
}
@@ -1188,6 +1192,7 @@ private:
VkPhysicalDeviceMaintenance5PropertiesKHR maintenance5{};
VkPhysicalDeviceDepthStencilResolveProperties depth_stencil_resolve{};
VkPhysicalDeviceCustomBorderColorPropertiesEXT custom_border_color{};
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT vertex_attribute_divisor{};
VkPhysicalDeviceProperties properties{};
};
@@ -1195,6 +1200,7 @@ private:
Extensions extensions{};
Features features{};
Properties properties{};
u32 max_vertex_attrib_divisor{1};
VkPhysicalDeviceFeatures2 features2{};
VkPhysicalDeviceProperties2 properties2{};